hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaoyu Tang" <ctang...@gmail.com>
Subject Review Request 31825: HIVE-9877:Beeline cannot run multiple statements in the same row
Date Sat, 07 Mar 2015 06:53:36 GMT

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

Review request for hive, Brock Noland, Szehon Ho, and Xuefu Zhang.


Bugs: HIVE-9877
    https://issues.apache.org/jira/browse/HIVE-9877


Repository: hive-git


Description
-------

This patch is to enhance Beeline to be able to run multiple commands from a line which is
passed in via beeline console, -e or -f. In addition, it also fixes an NPE when reading command
from a file (via -f) if that line of command is not terminated by ";"


Diffs
-----

  beeline/src/java/org/apache/hive/beeline/Commands.java 291adbab3b5fcb2335679a32b1f812f12358a491


Diff: https://reviews.apache.org/r/31825/diff/


Testing
-------

Manual tests have been done and all passed.
1. Beeline console for following commands:
 a. use a ; show tables; -- beeline executes two commands and its console displays all tables
under db a 
 b. use a ; show tables -- beeline console prompts for more input, after typing in ";" it
executes two commands and displays tables under db a
 c. use a ;  show databases; show tables;"   -- beeline executes all three commands and its
console displays all databases, and tables under db a
 d. use a ;  #show databases; show tables;"  -- beeline only executes "use a" command and
skip rest cmds like "show databases" and "show tables"
 
2. commands passed in via -e option:
 a. -e "use a ; show tables; "
 b. -e "use a ; show tables" -- display tables under db a even without ; at the end of line
 c. -e "use a ;  show databases; show tables"   -- display all databases, and display tables
under db a
 d. -e "use a ;  #show databases; show tables"  -- skip cmds show databases; show tables

3. commands read from a file via -f option, file includes following commands:
{code}
show databases; #display all databases;
use a; show tables;
use a; show databases; #show tables; #do not show databases;
#do not have the ; at the end of following cmd
show databases
{code}


Thanks,

Chaoyu Tang


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message