Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.12.0
-
None
-
None
-
Cloudera Hadoop distribution CDH5.1.3
Description
The following appears to fail due to an input parsing error
ALTER TABLE database.table SET FILEFORMAT RCFile;
but can be worked around by using the database so it does not need to be explicitly specified in the command at the hive interpreter.
USE database;
ALTER TABLE table SET FILEFORMAT RCFile;
See below for stack trace followed by successful workaround.
hive> ALTER TABLE dev.bk_smp_advertiser_events_rcfile SET FILEFORMAT RCFile;
MismatchedTokenException(220!=93)
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:12896)
at org.apache.hadoop.hive.ql.parse.HiveParser.alterTableStatementSuffix(HiveParser.java:6744)
at org.apache.hadoop.hive.ql.parse.HiveParser.alterStatement(HiveParser.java:6447)
at org.apache.hadoop.hive.ql.parse.HiveParser.ddlStatement(HiveParser.java:2129)
at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1344)
at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:983)
at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:190)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:434)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:352)
at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:995)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1038)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:931)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:921)
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:422)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:790)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:684)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:623)
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:48 mismatched input 'SET' expecting KW_EXCHANGE near 'bk_smp_advertiser_events_rcfile' in alter exchange partition
hive> use dev;
OK
Time taken: 0.033 seconds
hive> ALTER TABLE bk_smp_advertiser_events_rcfile SET FILEFORMAT RCFile;
OK
Time taken: 0.299 seconds
hive>
Attachments
Issue Links
- duplicates
-
HIVE-7681 qualified tablenames usage does not work with several alter-table commands
- Closed