[ https://issues.apache.org/jira/browse/HIVE-1498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Sichi updated HIVE-1498: ----------------------------- Status: Open (was: Patch Available) Since you've opened a followup HIVE-1746 for ALTER, could you back out that part of the code and move it to the other JIRA issue? It's best to keep the patch for each JIRA issue limited to the relevant piece unless they are inseparable. Anyway, regarding the ALTER grammar... After reading the statement "This is essentially a rapid prototyping mode" in the link below, I don't think we want to set backtrack=true unless there's no alternative. http://www.antlr.org/wiki/display/ANTLR3/Grammar+options In this case, there is an alternative, which is to combine the two rules as below. It's imperfect in that it would be nicer to keep the two productions separate; that could probably be accomplished by building up more AST nodes. But I think the code below would be good enough until we have many more ALTER INDEX options. {noformat} alterIndexStatementSuffix @init { msgs.push("alter index statement"); } @after { msgs.pop(); } : indexName=Identifier (KW_ON tableName=Identifier) partitionSpec? ( KW_REBUILD ->^(TOK_ALTERINDEX_REBUILD $tableName $indexName partitionSpec?) | KW_SET KW_IDXPROPERTIES indexProperties ->^(TOK_ALTERINDEX_PROPERTIES $tableName $indexName partitionSpec? indexProperties) ) ; {noformat} Also, I don't think we want to accept a partition spec when setting index properties; they are global to the index, at least for now. > support IDXPROPERTIES on CREATE INDEX > ------------------------------------- > > Key: HIVE-1498 > URL: https://issues.apache.org/jira/browse/HIVE-1498 > Project: Hive > Issue Type: Improvement > Components: Indexing > Affects Versions: 0.7.0 > Reporter: John Sichi > Assignee: Marquis Wang > Fix For: 0.7.0 > > Attachments: 1498.patch, hive-1498.prelim.patch > > > It's partially there in the grammar but not hooked in; should work pretty > much the same as TBLPROPERTIES. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.