FAQ
[ https://issues.apache.org/jira/browse/HIVE-8538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14237863#comment-14237863 ]

haison commented on HIVE-8538:
------------------------------

I use hive 0.12 and I also get the same messages like those above.

What I run and it returns like this:

hive> ALTER TABLE project.hive3 ADD PARTITION (fcol1='fenqu2');

MismatchedTokenException(27!=90)
         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:11492)
         at org.apache.hadoop.hive.ql.parse.HiveParser.alterTableStatementSuffix(HiveParser.java:6507)
         at org.apache.hadoop.hive.ql.parse.HiveParser.alterStatement(HiveParser.java:6210)
         at org.apache.hadoop.hive.ql.parse.HiveParser.ddlStatement(HiveParser.java:2061)
         at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1298)
         at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:938)
         at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:190)
         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:424)
         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:342)
         at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:977)
         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:888)
         at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
         at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:781)
         at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
         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:601)
         at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
FAILED: ParseException line 1:26 mismatched input 'ADD' expecting KW_EXCHANGE near 'hive3' in alter exchange partition

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)

Search Discussions

  • Navis (JIRA) at Dec 9, 2014 at 4:55 am
    [ 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)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieshive, hadoop
postedDec 8, '14 at 1:33p
activeDec 9, '14 at 4:55a
posts2
users1
websitehive.apache.org

1 user in discussion

Navis (JIRA): 2 posts

People

Translate

site design / logo © 2022 Grokbase