You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/05/07 03:59:00 UTC

[jira] [Work logged] (HIVE-25095) Beeline/hive -e command can't deal with query with trailing quote

     [ https://issues.apache.org/jira/browse/HIVE-25095?focusedWorklogId=593139&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-593139 ]

ASF GitHub Bot logged work on HIVE-25095:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/May/21 03:58
            Start Date: 07/May/21 03:58
    Worklog Time Spent: 10m 
      Work Description: ujc714 opened a new pull request #2255:
URL: https://github.com/apache/hive/pull/2255


   …### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   Upgrade commons-cli to 1.4.
   
   ### Why are the changes needed?
   There is a bug in commons-cli-1.2 which trips trailing quote improperly.
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   mvn test -Dtest=org.apache.hive.beeline.cli.TestHiveCli
   mvn test -Dtest=org.apache.hive.beeline.TestBeelineArgParsing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 593139)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>          Time Spent: 10m
>  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.3.4#803005)