-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39626/#review103971
-----------------------------------------------------------


Thank you for working on this. I have a comment left.


beeline/src/java/org/apache/hive/beeline/BeeLine.java (line 1111)
<https://reviews.apache.org/r/39626/#comment162086>

    Method `exeCommandWithPrefix` failed to handle the commands like `!sh 
test.sql;show\n tables;`. For connect command, it's possible to contain 
semicolon in the connection string. So I am thinking about whether we can 
escape connect command. How about the following code?
    ```
    if 
(!line.startsWith(COMMAND_PREFIX)&&line.contains(";")&&!line.startWith("!connect"))
 {
            return commands.sql(line, getOpts().getEntireLineAsCommand());
          } else {
            // handle SQLLine command in beeline which starts with ! and does 
not end with ;
            return execCommandWithPrefix(line);
          }
    ```


- cheng xu


On Oct. 25, 2015, 7:13 a.m., Chaoyu Tang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39626/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2015, 7:13 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-12259
>     https://issues.apache.org/jira/browse/HIVE-12259
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> The SQLLine commands (!cmd) and Connection URLs are broken if they contain 
> the ";"
> 
> 
> Diffs
> -----
> 
>   beeline/src/java/org/apache/hive/beeline/BeeLine.java 69e9418 
>   
> itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java
>  0465ef3 
> 
> Diff: https://reviews.apache.org/r/39626/diff/
> 
> 
> Testing
> -------
> 
> New unit tests passed
> Submitted precommit tests
> 
> 
> Thanks,
> 
> Chaoyu Tang
> 
>

Reply via email to