You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by an...@apache.org on 2020/10/29 09:41:20 UTC
[hive] branch master updated: HIVE-24307:Beeline with property-file
and -e parameter is failing (Ayush Saxena, reviewed by Aasha Medhi)
This is an automated email from the ASF dual-hosted git repository.
anishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 10236b5 HIVE-24307:Beeline with property-file and -e parameter is failing (Ayush Saxena, reviewed by Aasha Medhi)
10236b5 is described below
commit 10236b5f6f0c6d54d18c972b561824364f634c3b
Author: Anishek Agarwal <an...@gmail.com>
AuthorDate: Thu Oct 29 15:11:06 2020 +0530
HIVE-24307:Beeline with property-file and -e parameter is failing (Ayush Saxena, reviewed by Aasha Medhi)
---
beeline/src/java/org/apache/hive/beeline/BeeLine.java | 2 ++
.../test/org/apache/hive/beeline/TestBeelineArgParsing.java | 13 +++++++++++++
2 files changed, 15 insertions(+)
diff --git a/beeline/src/java/org/apache/hive/beeline/BeeLine.java b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
index a86fe5c..6e6f5cb 100644
--- a/beeline/src/java/org/apache/hive/beeline/BeeLine.java
+++ b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
@@ -933,6 +933,8 @@ public class BeeLine implements Closeable {
if (!dispatch("!properties " + propertyFile)) {
exit = true;
return false;
+ } else {
+ return true;
}
}
return false;
diff --git a/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java b/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java
index db0cba3..cd730fb 100644
--- a/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java
+++ b/beeline/src/test/org/apache/hive/beeline/TestBeelineArgParsing.java
@@ -412,4 +412,17 @@ public class TestBeelineArgParsing {
bl.close();
}
+ /**
+ * Test property file option with query.
+ */
+ @Test
+ public void testPropertyFileWithQuery() throws Exception {
+ TestBeeline bl = new TestBeeline();
+ String args[] =
+ new String[] {"--property-file", "props", "-e", "show tables"};
+ Assert.assertEquals(0, bl.initArgs(args));
+ Assert.assertEquals("props", bl.properties.get(0));
+ Assert.assertEquals("show tables", bl.queries.get(0));
+ bl.close();
+ }
}