[ https://issues.apache.org/jira/browse/HIVE-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913723#action_12913723 ]
John Sichi commented on HIVE-1501: ---------------------------------- Example: create table `_t`(`_i` int, `_j` int); create index x on table `_t`(`_j`) as 'compact' with deferred rebuild; alter index x on `_t` rebuild; gives FAILED: Parse Error: line 1:48 mismatched input ',' expecting CharSetLiteral in character string literal To see why, look at org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler, method getIndexBuilderMapRedTask. It constructs an internal SQL statement (INSERT) which populates the index table structure. However, it neglects to quote the table/column names, leading to invalid syntax. (Hive uses backticks to quote identifiers with special characters--I think this currently only applies to leading underscores, but later we'll support arbitrary identifiers.) HiveUtils.unparseIdentifier should be used for quoting. > when generating reentrant INSERT for index rebuild, quote identifiers using > backticks > ------------------------------------------------------------------------------------- > > Key: HIVE-1501 > URL: https://issues.apache.org/jira/browse/HIVE-1501 > Project: Hadoop Hive > Issue Type: Bug > Components: Indexing > Affects Versions: 0.7.0 > Reporter: John Sichi > Assignee: He Yongqiang > Fix For: 0.7.0 > > > Yongqiang, you mentioned that you weren't able to do this due to SORT BY not > accepting them. The SORT BY is gone now as of HIVE-1494 (and SORT BY needs > to be fixed anyway). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.