Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BBFDD17732 for ; Wed, 11 Mar 2015 02:45:15 +0000 (UTC) Received: (qmail 19669 invoked by uid 500); 11 Mar 2015 02:45:14 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 19594 invoked by uid 500); 11 Mar 2015 02:45:14 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 19564 invoked by uid 99); 11 Mar 2015 02:45:14 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2015 02:45:14 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B94531D3AA5; Wed, 11 Mar 2015 02:45:12 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1382284175386347194==" MIME-Version: 1.0 Subject: Re: Review Request 31825: HIVE-9877:Beeline cannot run multiple statements in the same row From: "Xuefu Zhang" To: "Szehon Ho" , "Brock Noland" , "Xuefu Zhang" Cc: "hive" , "Chaoyu Tang" , "Xuefu Zhang" Date: Wed, 11 Mar 2015 02:45:12 -0000 Message-ID: <20150311024512.17900.75301@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Xuefu Zhang" X-ReviewGroup: hive X-ReviewRequest-URL: https://reviews.apache.org/r/31825/ X-Sender: "Xuefu Zhang" References: <20150307065336.12263.80608@reviews.apache.org> In-Reply-To: <20150307065336.12263.80608@reviews.apache.org> Reply-To: "Xuefu Zhang" X-ReviewRequest-Repository: hive-git --===============1382284175386347194== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31825/#review76036 ----------------------------------------------------------- Ship it! Ship It! - Xuefu Zhang On March 7, 2015, 6:53 a.m., Chaoyu Tang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31825/ > ----------------------------------------------------------- > > (Updated March 7, 2015, 6:53 a.m.) > > > 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 > > --===============1382284175386347194==--