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

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

                Author: ASF GitHub Bot
            Created on: 16/Nov/21 16:15
            Start Date: 16/Nov/21 16:15
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on a change in pull request #2542:
URL: https://github.com/apache/hive/pull/2542#discussion_r750438348



##########
File path: cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
##########
@@ -499,7 +499,10 @@ public CommandProcessorResponse 
processReader(BufferedReader r) throws IOExcepti
     while ((line = r.readLine()) != null) {
       // Skipping through comments
       if (! line.startsWith("--")) {
-        qsb.append(line + "\n");
+        if (line.contains("--") && line.endsWith(";")) {

Review comment:
       I'm wondering what will happen with:
   ```
   select 'hello -- there' ;
   ```
   I think we only use the `cli` stuff during testing - the `hive` command is 
launching a `beeline` shell;
   can a user still launch the `hive` cli?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 682083)
    Time Spent: 20m  (was: 10m)

> Make command splitting consistent between beeline and hive cli
> --------------------------------------------------------------
>
>                 Key: HIVE-25399
>                 URL: https://issues.apache.org/jira/browse/HIVE-25399
>             Project: Hive
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 3.1.2
>            Reporter: Xuedong Luan
>            Assignee: Xuedong Luan
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Make command splitting consistent between beeline and hive cli
> below sql can execute by beeline ,but  hive cli will throw exception:
> select 
> 1 as a, -- hello; 
> 2 as b;
> hive> 
>  > 
>  > 
>  > 
>  > 
>  > 
>  > select
>  > 1 as a, -- hello;
> select
> 1 as a, -- hello
> FAILED: ParseException line 2:6 extraneous input ',' expecting EOF near 
> '<EOF>'
> hive> 2 as b;
> 2 as b



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to