hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject hive git commit: HIVE-8396 : Hive CliDriver command splitting can be broken when comments are present (Elliot West, reviewed by Sergey Shelukhin)
Date Wed, 25 Nov 2015 23:13:40 GMT
Repository: hive
Updated Branches:
  refs/heads/master 454c2cae4 -> 0ae374a32


HIVE-8396 : Hive CliDriver command splitting can be broken when comments are present (Elliot
West, reviewed by Sergey Shelukhin)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/0ae374a3
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/0ae374a3
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/0ae374a3

Branch: refs/heads/master
Commit: 0ae374a320d1cae523ba2b434800e97692507db8
Parents: 454c2ca
Author: Sergey Shelukhin <sershe@apache.org>
Authored: Wed Nov 25 15:13:27 2015 -0800
Committer: Sergey Shelukhin <sershe@apache.org>
Committed: Wed Nov 25 15:13:27 2015 -0800

----------------------------------------------------------------------
 cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/0ae374a3/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
----------------------------------------------------------------------
diff --git a/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java b/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
index e04f247..e77b7f1 100644
--- a/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
+++ b/cli/src/java/org/apache/hadoop/hive/cli/CliDriver.java
@@ -770,6 +770,9 @@ public class CliDriver {
       if (!prefix.equals("")) {
         prefix += '\n';
       }
+      if (line.trim().startsWith("--")) {
+        continue;
+      }
       if (line.trim().endsWith(";") && !line.trim().endsWith("\\;")) {
         line = prefix + line;
         ret = cli.processLine(line, true);


Mime
View raw message