You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Brian Kessler (JIRA)" <ji...@apache.org> on 2014/12/20 01:37:13 UTC

[jira] [Created] (HIVE-9180) Input parsing failing for ALTER TABLE when database and table are specified

Brian Kessler created HIVE-9180:
-----------------------------------

             Summary: Input parsing failing for ALTER TABLE when database and table are specified
                 Key: HIVE-9180
                 URL: https://issues.apache.org/jira/browse/HIVE-9180
             Project: Hive
          Issue Type: Bug
          Components: CLI
    Affects Versions: 0.12.0
         Environment: Cloudera Hadoop distribution CDH5.1.3
            Reporter: Brian Kessler
            Priority: Minor


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>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)