You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by at...@apache.org on 2009/06/03 22:14:02 UTC
svn commit: r781530 - in /hadoop/hive/trunk: CHANGES.txt
cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
Author: athusoo
Date: Wed Jun 3 20:14:01 2009
New Revision: 781530
URL: http://svn.apache.org/viewvc?rev=781530&view=rev
Log:
HIVE-534. Fix in the cli so that it does not ignore the first
newline character. (Raghotham Murthy via athusoo)
Modified:
hadoop/hive/trunk/CHANGES.txt
hadoop/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=781530&r1=781529&r2=781530&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Wed Jun 3 20:14:01 2009
@@ -206,6 +206,9 @@
HIVE-532. Predicates not pushed above limit
(Prasad Chakka via namit)
+ HIVE-534. Fix in the cli so that it does not ignore the first
+ newline character. (Raghotham Murthy via athusoo)
+
Release 0.3.1 - Unreleased
INCOMPATIBLE CHANGES
Modified: hadoop/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java?rev=781530&r1=781529&r2=781530&view=diff
==============================================================================
--- hadoop/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java (original)
+++ hadoop/hive/trunk/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java Wed Jun 3 20:14:01 2009
@@ -301,13 +301,16 @@
String prefix = "";
String curPrompt = prompt;
while ((line = reader.readLine(curPrompt+"> ")) != null) {
+ if (!prefix.equals("")) {
+ prefix += '\n';
+ }
if(line.trim().endsWith(";")) {
- line = prefix + "\n" + line;
+ line = prefix + line;
ret = cli.processLine(line);
prefix = "";
curPrompt = prompt;
} else {
- prefix = prefix + "\n" + line;
+ prefix = prefix + line;
curPrompt = prompt2;
continue;
}