[ https://issues.apache.org/jira/browse/HIVE-8538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14238982#comment-14238982 ]
Navis commented on HIVE-8538: ----------------------------- This is fixed in hive-0.14, by HIVE-4064, HIVE-7681, etc. Could you check that? > Fully qualified table error when adding partition > ------------------------------------------------- > > Key: HIVE-8538 > URL: https://issues.apache.org/jira/browse/HIVE-8538 > Project: Hive > Issue Type: Improvement > Affects Versions: 0.13.0 > Environment: HDP 2.1 > Reporter: Hari Sekhon > Priority: Minor > > When adding a partition using a fully qualified table name I get the > following error, works fine if I use database and then re-issue the query > with a non-qualified table name. Other queries such as select do work with > fully qualified table names so should make this allow qualified table names > for convenience and consistency. > {code} > hive> alter table myDB.myTable add partition (log_date='xxxx-xx-xx'); > MismatchedTokenException(27!=96) > at > org.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(BaseRecognizer.java:617) > at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115) > at > org.apache.hadoop.hive.ql.parse.HiveParser.alterStatementSuffixExchangePartition(HiveParser.java:13264) > at > org.apache.hadoop.hive.ql.parse.HiveParser.alterTableStatementSuffix(HiveParser.java:6851) > at > org.apache.hadoop.hive.ql.parse.HiveParser.alterStatement(HiveParser.java:6552) > at > org.apache.hadoop.hive.ql.parse.HiveParser.ddlStatement(HiveParser.java:2189) > at > org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1398) > at > org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1036) > at > org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:199) > at > org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:409) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:323) > at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:980) > at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1045) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:916) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:906) > at > org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:268) > at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:220) > at > org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:423) > at > org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:793) > at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:686) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.apache.hadoop.util.RunJar.main(RunJar.java:212) > FAILED: ParseException line 1:32 mismatched input 'add' expecting KW_EXCHANGE > near 'myTable' in alter exchange partition > hive> use myDB; > OK > Time taken: 0.009 seconds > hive> alter table myTable add partition (log_date='xxxx-xx-xx'); > OK > Time taken: 0.157 seconds > {code} > Thanks > Hari Sekhon > http://www.linkedin.com/in/harisekhon -- This message was sent by Atlassian JIRA (v6.3.4#6332)