You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltan Haindrich (Jira)" <ji...@apache.org> on 2021/11/18 07:23:00 UTC
[jira] [Resolved] (HIVE-25095) Beeline/hive -e command can't deal with query with trailing quote
[ https://issues.apache.org/jira/browse/HIVE-25095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zoltan Haindrich resolved HIVE-25095.
-------------------------------------
Fix Version/s: 4.0.0
Resolution: Fixed
merged into master. Thank you [~robbiezhang]!
> Beeline/hive -e command can't deal with query with trailing quote
> -----------------------------------------------------------------
>
> Key: HIVE-25095
> URL: https://issues.apache.org/jira/browse/HIVE-25095
> Project: Hive
> Issue Type: Bug
> Reporter: Robbie Zhang
> Assignee: Robbie Zhang
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> The command
> {code:java}
> hive -e 'select "hive"'{code}
> and
> {code:java}
> beeline -e 'select "hive"'{code}
> fail with such error:
> {code:java}
> Error: Error while compiling statement: FAILED: ParseException line 1:12 character '<EOF>' not supported here (state=42000,code=40000){code}
> The reason is that org.apache.commons.cli.Util.stripLeadingAndTrailingQuotes in commons-cli-1.2.jar strips the trailing quote so the query string is changed to
> {code:java}
> select "hive{code}
> This bug is fixed in commons-cli-1.3.1 and commons-cli-1.4.jar. The workaround is to overwrite commons-cli-1.2.jar with commons-cli-1.3.1 or commons-cli-1.4.jar.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)