hive git commit: HIVE-20507: Beeline: Add a utility command to retrieve all uris from beeline-site.xml (Vaibhav Gumashta, reviewed by Daniel Dai)

2018-09-20 Thread vgumashta
Repository: hive
Updated Branches:
  refs/heads/master 208e202f5 -> 3635c4dba


HIVE-20507: Beeline: Add a utility command to retrieve all uris from 
beeline-site.xml (Vaibhav Gumashta, reviewed by Daniel Dai)


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

Branch: refs/heads/master
Commit: 3635c4dba1613f0aef697b652dbe9e45bb64cb33
Parents: 208e202f
Author: Vaibhav Gumashta 
Authored: Thu Sep 20 15:23:12 2018 -0700
Committer: Vaibhav Gumashta 
Committed: Thu Sep 20 15:23:12 2018 -0700

--
 .../java/org/apache/hive/beeline/BeeLine.java   | 57 ++-
 .../org/apache/hive/beeline/BeeLineOpts.java| 10 +++
 beeline/src/main/resources/BeeLine.properties   |  1 +
 .../org/apache/hive/jdbc/HiveConnection.java| 73 
 jdbc/src/java/org/apache/hive/jdbc/Utils.java   |  2 +-
 5 files changed, 141 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/3635c4db/beeline/src/java/org/apache/hive/beeline/BeeLine.java
--
diff --git a/beeline/src/java/org/apache/hive/beeline/BeeLine.java 
b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
index 29ec2de..e54e818 100644
--- a/beeline/src/java/org/apache/hive/beeline/BeeLine.java
+++ b/beeline/src/java/org/apache/hive/beeline/BeeLine.java
@@ -65,6 +65,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.ResourceBundle;
 import java.util.ServiceLoader;
@@ -94,6 +95,7 @@ import 
org.apache.hive.beeline.hs2connection.HS2ConnectionFileUtils;
 import org.apache.hive.beeline.hs2connection.HiveSiteHS2ConnectionFileParser;
 import org.apache.hive.beeline.hs2connection.UserHS2ConnectionFileParser;
 import org.apache.hive.common.util.ShutdownHookManager;
+import org.apache.hive.jdbc.HiveConnection;
 import org.apache.hive.jdbc.JdbcUriParseException;
 import org.apache.hive.jdbc.Utils;
 import org.apache.hive.jdbc.Utils.JdbcConnectionParams;
@@ -389,6 +391,12 @@ public class BeeLine implements Closeable {
 .withLongOpt("help")
 .withDescription("Display this message")
 .create('h'));
+
+// -getUrlsFromBeelineSite
+options.addOption(OptionBuilder
+.withLongOpt("getUrlsFromBeelineSite")
+.withDescription("Print all urls from beeline-site.xml, if it is 
present in the classpath")
+.create());
 
 // Substitution option --hivevar
 options.addOption(OptionBuilder
@@ -712,7 +720,7 @@ public class BeeLine implements Closeable {
 
 private boolean isBeeLineOpt(String arg) {
   return arg.startsWith("--") && !(HIVE_VAR_PREFIX.equals(arg) || 
(HIVE_CONF_PREFIX.equals(arg))
-  || "--help".equals(arg) || PROP_FILE_PREFIX.equals(arg));
+  || "--help".equals(arg) || PROP_FILE_PREFIX.equals(arg) || 
"--getUrlsFromBeelineSite".equals(arg));
 }
   }
 
@@ -846,6 +854,12 @@ public class BeeLine implements Closeable {
   getOpts().setHelpAsked(true);
   return true;
 }
+
+if (cl.hasOption("getUrlsFromBeelineSite")) {
+  printBeelineSiteUrls();
+  getOpts().setBeelineSiteUrlsAsked(true);
+  return true;
+}
 
 Properties hiveVars = cl.getOptionProperties("hivevar");
 for (String key : hiveVars.stringPropertyNames()) {
@@ -922,6 +936,44 @@ public class BeeLine implements Closeable {
 return false;
   }
 
+  private void printBeelineSiteUrls() {
+BeelineSiteParser beelineSiteParser = getUserBeelineSiteParser();
+if (!beelineSiteParser.configExists()) {
+  output("No beeline-site.xml in the path", true);
+}
+if (beelineSiteParser.configExists()) {
+  // Get the named url from user specific config file if present
+  try {
+Properties userNamedConnectionURLs = 
beelineSiteParser.getConnectionProperties();
+
userNamedConnectionURLs.remove(BeelineSiteParser.DEFAULT_NAMED_JDBC_URL_PROPERTY_KEY);
+StringBuilder sb = new StringBuilder("urls: ");
+for (Entry entry : userNamedConnectionURLs.entrySet()) 
{
+  String urlFromBeelineSite = (String) entry.getValue();
+  if (isZkBasedUrl(urlFromBeelineSite)) {
+List jdbcUrls = 
HiveConnection.getAllUrlStrings(urlFromBeelineSite);
+for (String jdbcUrl : jdbcUrls) {
+  sb.append(jdbcUrl + ", ");
+}
+  } else {
+sb.append(urlFromBeelineSite + ", ");
+  }
+}
+output(sb.toString(), true);
+  } catch (Exception e) {
+output(e.getMessage(), true);
+

[1/2] hive git commit: HIVE-19166: TestMiniLlapLocalCliDriver sysdb failure (Daniel Dai, reviewed by Vaibhav Gumashta)

2018-09-20 Thread daijy
Repository: hive
Updated Branches:
  refs/heads/branch-3 c0a9d3ba1 -> 6a3d42b3b


http://git-wip-us.apache.org/repos/asf/hive/blob/6a3d42b3/ql/src/test/results/clientpositive/llap/sysdb.q.out
--
diff --git a/ql/src/test/results/clientpositive/llap/sysdb.q.out 
b/ql/src/test/results/clientpositive/llap/sysdb.q.out
index 109fca6..e7df1ef 100644
--- a/ql/src/test/results/clientpositive/llap/sysdb.q.out
+++ b/ql/src/test/results/clientpositive/llap/sysdb.q.out
@@ -58,10 +58,34 @@ default alltypesorc hive_test_user  
USERDELETE  true-1  hive_test_user
 defaultalltypesorc hive_test_user  USERINSERT  
true-1  hive_test_user
 defaultalltypesorc hive_test_user  USERSELECT  
true-1  hive_test_user
 defaultalltypesorc hive_test_user  USERUPDATE  
true-1  hive_test_user
+defaultalltypesparquet hive_test_user  USERDELETE  
true-1  hive_test_user
+defaultalltypesparquet hive_test_user  USERINSERT  
true-1  hive_test_user
+defaultalltypesparquet hive_test_user  USERSELECT  
true-1  hive_test_user
+defaultalltypesparquet hive_test_user  USERUPDATE  
true-1  hive_test_user
+defaultcbo_t1  hive_test_user  USERDELETE  true
-1  hive_test_user
+defaultcbo_t1  hive_test_user  USERINSERT  true
-1  hive_test_user
+defaultcbo_t1  hive_test_user  USERSELECT  true
-1  hive_test_user
+defaultcbo_t1  hive_test_user  USERUPDATE  true
-1  hive_test_user
+defaultcbo_t2  hive_test_user  USERDELETE  true
-1  hive_test_user
+defaultcbo_t2  hive_test_user  USERINSERT  true
-1  hive_test_user
+defaultcbo_t2  hive_test_user  USERSELECT  true
-1  hive_test_user
+defaultcbo_t2  hive_test_user  USERUPDATE  true
-1  hive_test_user
+defaultcbo_t3  hive_test_user  USERDELETE  true
-1  hive_test_user
+defaultcbo_t3  hive_test_user  USERINSERT  true
-1  hive_test_user
+defaultcbo_t3  hive_test_user  USERSELECT  true
-1  hive_test_user
+defaultcbo_t3  hive_test_user  USERUPDATE  true
-1  hive_test_user
+defaultlineitemhive_test_user  USERDELETE  
true-1  hive_test_user
+defaultlineitemhive_test_user  USERINSERT  
true-1  hive_test_user
+defaultlineitemhive_test_user  USERSELECT  
true-1  hive_test_user
+defaultlineitemhive_test_user  USERUPDATE  
true-1  hive_test_user
 defaultmoretypes   hive_test_user  USERDELETE  
true-1  hive_test_user
 defaultmoretypes   hive_test_user  USERINSERT  
true-1  hive_test_user
 defaultmoretypes   hive_test_user  USERSELECT  
true-1  hive_test_user
 defaultmoretypes   hive_test_user  USERUPDATE  
true-1  hive_test_user
+defaultparthive_test_user  USERDELETE  true
-1  hive_test_user
+defaultparthive_test_user  USERINSERT  true
-1  hive_test_user
+defaultparthive_test_user  USERSELECT  true
-1  hive_test_user
+defaultparthive_test_user  USERUPDATE  true
-1  hive_test_user
 defaultscr_txn hive_test_user  USERDELETE  true
-1  hive_test_user
 defaultscr_txn hive_test_user  USERINSERT  true
-1  hive_test_user
 defaultscr_txn hive_test_user  USERSELECT  true
-1  hive_test_user
@@ -70,22 +94,50 @@ default src hive_test_user  USER
DELETE  true-1  hive_test_user
 defaultsrc hive_test_user  USERINSERT  true
-1  hive_test_user
 defaultsrc hive_test_user  USERSELECT  true
-1  hive_test_user
 defaultsrc hive_test_user  USERUPDATE  true
-1  hive_test_user
+defaultsrc1hive_test_user  USERDELETE  true
-1  hive_test_user
+defaultsrc1hive_test_user  USERINSERT  true
-1  hive_test_user
+defaultsrc1

[2/2] hive git commit: HIVE-19166: TestMiniLlapLocalCliDriver sysdb failure (Daniel Dai, reviewed by Vaibhav Gumashta)

2018-09-20 Thread daijy
HIVE-19166: TestMiniLlapLocalCliDriver sysdb failure (Daniel Dai, reviewed by 
Vaibhav Gumashta)


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

Branch: refs/heads/branch-3
Commit: 6a3d42b3b9d032b771aa0ebcb9f0cb1b4f1af309
Parents: c0a9d3b
Author: Daniel Dai 
Authored: Thu Sep 20 14:32:06 2018 -0700
Committer: Daniel Dai 
Committed: Thu Sep 20 14:32:36 2018 -0700

--
 .../TestInformationSchemaWithPrivilege.java |8 +-
 .../hadoop/hive/cli/control/CliConfigs.java |1 -
 .../upgrade/hive/hive-schema-3.1.0.hive.sql |   78 +-
 ql/src/test/queries/clientpositive/sysdb.q  |   12 +-
 .../clientpositive/llap/resourceplan.q.out  |  156 +--
 .../llap/strict_managed_tables_sysdb.q.out  |  156 +--
 .../results/clientpositive/llap/sysdb.q.out | 1250 +-
 7 files changed, 1075 insertions(+), 586 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/6a3d42b3/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
--
diff --git 
a/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
 
b/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
index 610e646..18b0b13 100644
--- 
a/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
+++ 
b/itests/hive-unit/src/test/java/org/apache/hive/service/server/TestInformationSchemaWithPrivilege.java
@@ -581,20 +581,20 @@ public class TestInformationSchemaWithPrivilege {
 
 opHandle = serviceClient.executeStatement(sessHandle, "select * from 
INFORMATION_SCHEMA.SCHEMATA", confOverlay);
 rowSet = serviceClient.fetchResults(opHandle);
-Assert.assertTrue(rowSet.numRows() > 2);
+Assert.assertEquals(rowSet.numRows(), 5);
 
 opHandle = serviceClient.executeStatement(sessHandle, "select * from 
INFORMATION_SCHEMA.TABLES", confOverlay);
 rowSet = serviceClient.fetchResults(opHandle);
-Assert.assertTrue(rowSet.numRows() > 10);
+Assert.assertTrue(rowSet.numRows() > 50);
 
 opHandle = serviceClient.executeStatement(sessHandle, "select * from 
INFORMATION_SCHEMA.TABLE_PRIVILEGES",
 confOverlay);
 rowSet = serviceClient.fetchResults(opHandle);
-Assert.assertEquals(rowSet.numRows(), 7);
+Assert.assertTrue(rowSet.numRows() > 200);
 
 opHandle = serviceClient.executeStatement(sessHandle, "select * from 
INFORMATION_SCHEMA.COLUMNS", confOverlay);
 rowSet = serviceClient.fetchResults(opHandle);
-Assert.assertTrue(rowSet.numRows() > 10);
+Assert.assertTrue(rowSet.numRows() > 350);
 
 opHandle = serviceClient.executeStatement(sessHandle, "select * from 
INFORMATION_SCHEMA.COLUMN_PRIVILEGES",
 confOverlay);

http://git-wip-us.apache.org/repos/asf/hive/blob/6a3d42b3/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
--
diff --git 
a/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java 
b/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
index c9ae676..fb7062f 100644
--- 
a/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
+++ 
b/itests/util/src/main/java/org/apache/hadoop/hive/cli/control/CliConfigs.java
@@ -223,7 +223,6 @@ public class CliConfigs {
 includesFrom(testConfigProps, "minillaplocal.shared.query.files");
 excludeQuery("bucket_map_join_tez1.q"); // Disabled in HIVE-19509
 excludeQuery("special_character_in_tabnames_1.q"); // Disabled in 
HIVE-19509
-excludeQuery("sysdb.q"); // Disabled in HIVE-19509
 excludeQuery("tez_smb_1.q"); // Disabled in HIVE-19509
 excludeQuery("union_fast_stats.q"); // Disabled in HIVE-19509
 excludeQuery("schema_evol_orc_acidvec_part.q"); // Disabled in 
HIVE-19509

http://git-wip-us.apache.org/repos/asf/hive/blob/6a3d42b3/metastore/scripts/upgrade/hive/hive-schema-3.1.0.hive.sql
--
diff --git a/metastore/scripts/upgrade/hive/hive-schema-3.1.0.hive.sql 
b/metastore/scripts/upgrade/hive/hive-schema-3.1.0.hive.sql
index f98894f..2d67242 100644
--- a/metastore/scripts/upgrade/hive/hive-schema-3.1.0.hive.sql
+++ b/metastore/scripts/upgrade/hive/hive-schema-3.1.0.hive.sql
@@ -1080,11 +1080,10 @@ SELECT DISTINCT
   cast(null as string),
   `DB_LOCATION_URI`
 FROM
-  `sys`.`DBS` D, `sys`.`TBLS` T, `sys`.`TBL_PRIVS` P
+  `sys`.`DBS` D LEFT JOIN 

hive git commit: HIVE-20267: Expanding WebUI to include form to dynamically config log levels (Zoltan Chovan reviewed by Prasanth Jayachandran)

2018-09-20 Thread prasanthj
Repository: hive
Updated Branches:
  refs/heads/master 9b376a7b0 -> 208e202f5


HIVE-20267: Expanding WebUI to include form to dynamically config log levels 
(Zoltan Chovan reviewed by Prasanth Jayachandran)


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

Branch: refs/heads/master
Commit: 208e202f5b849ce62a12434da3ec648d949d40d6
Parents: 9b376a7
Author: Zoltan Chovan 
Authored: Wed Sep 19 09:57:52 2018 -0700
Committer: Prasanth Jayachandran 
Committed: Thu Sep 20 12:09:36 2018 -0700

--
 .../hive-webapps/hiveserver2/hiveserver2.jsp|   1 +
 .../hive-webapps/hiveserver2/llap.html  |   1 +
 .../hive-webapps/hiveserver2/logconf.jsp| 140 +++
 .../resources/hive-webapps/static/js/logconf.js |  40 ++
 4 files changed, 182 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/208e202f/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp
--
diff --git a/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp 
b/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp
index 5d82029..c238369 100644
--- a/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp
+++ b/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp
@@ -79,6 +79,7 @@ String remoteUser = request.getRemoteUser();
 Hive Configuration
 Stack Trace
 Llap Daemons
+Configure logging
 
   
 

http://git-wip-us.apache.org/repos/asf/hive/blob/208e202f/service/src/resources/hive-webapps/hiveserver2/llap.html
--
diff --git a/service/src/resources/hive-webapps/hiveserver2/llap.html 
b/service/src/resources/hive-webapps/hiveserver2/llap.html
index e1424b8..62ac1b0 100644
--- a/service/src/resources/hive-webapps/hiveserver2/llap.html
+++ b/service/src/resources/hive-webapps/hiveserver2/llap.html
@@ -37,6 +37,7 @@
 Hive Configuration
 Stack Trace
 Llap Daemons
+Configure logging
 
   
 

http://git-wip-us.apache.org/repos/asf/hive/blob/208e202f/service/src/resources/hive-webapps/hiveserver2/logconf.jsp
--
diff --git a/service/src/resources/hive-webapps/hiveserver2/logconf.jsp 
b/service/src/resources/hive-webapps/hiveserver2/logconf.jsp
new file mode 100644
index 000..a5747c0
--- /dev/null
+++ b/service/src/resources/hive-webapps/hiveserver2/logconf.jsp
@@ -0,0 +1,140 @@
+<%--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+--%>
+<%@ page contentType="text/html;charset=UTF-8"
+ import="org.apache.hadoop.conf.Configuration"
+ import="org.apache.hadoop.hive.conf.HiveConf"
+ import="org.apache.hadoop.hive.conf.HiveConf.ConfVars"
+ import="org.apache.hive.common.util.HiveVersionInfo"
+ import="org.apache.hive.http.HttpServer"
+ import="org.apache.hive.service.cli.operation.Operation"
+ import="org.apache.hive.service.cli.operation.SQLOperation"
+ import="org.apache.hadoop.hive.ql.QueryInfo"
+ import="org.apache.hive.service.cli.session.SessionManager"
+ import="org.apache.hive.service.cli.session.HiveSession"
+ import="javax.servlet.ServletContext"
+ import="java.util.Collection"
+ import="java.util.Date"
+ import="java.util.List"
+ import="jodd.util.HtmlEncoder"
+%>
+
+<%
+ServletContext ctx = getServletContext();
+Configuration conf = (Configuration)ctx.getAttribute("hive.conf");
+long startcode = conf.getLong("startcode", System.currentTimeMillis());
+SessionManager sessionManager =
+(SessionManager)ctx.getAttribute("hive.sm");
+String 

hive git commit: HIVE-20267: Expanding WebUI to include form to dynamically config log levels (Zoltan Chovan reviewed by Prasanth Jayachandran)

2018-09-20 Thread prasanthj
Repository: hive
Updated Branches:
  refs/heads/branch-3 36c33ca06 -> c0a9d3ba1


HIVE-20267: Expanding WebUI to include form to dynamically config log levels 
(Zoltan Chovan reviewed by Prasanth Jayachandran)


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

Branch: refs/heads/branch-3
Commit: c0a9d3ba18dd42f315d001daa5f99b5e1aedfa52
Parents: 36c33ca
Author: Zoltan Chovan 
Authored: Wed Sep 19 09:57:52 2018 -0700
Committer: Prasanth Jayachandran 
Committed: Thu Sep 20 12:10:06 2018 -0700

--
 .../hive-webapps/hiveserver2/hiveserver2.jsp|   1 +
 .../hive-webapps/hiveserver2/llap.html  |   1 +
 .../hive-webapps/hiveserver2/logconf.jsp| 140 +++
 .../resources/hive-webapps/static/js/logconf.js |  40 ++
 4 files changed, 182 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/c0a9d3ba/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp
--
diff --git a/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp 
b/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp
index 5d82029..c238369 100644
--- a/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp
+++ b/service/src/resources/hive-webapps/hiveserver2/hiveserver2.jsp
@@ -79,6 +79,7 @@ String remoteUser = request.getRemoteUser();
 Hive Configuration
 Stack Trace
 Llap Daemons
+Configure logging
 
   
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c0a9d3ba/service/src/resources/hive-webapps/hiveserver2/llap.html
--
diff --git a/service/src/resources/hive-webapps/hiveserver2/llap.html 
b/service/src/resources/hive-webapps/hiveserver2/llap.html
index e1424b8..62ac1b0 100644
--- a/service/src/resources/hive-webapps/hiveserver2/llap.html
+++ b/service/src/resources/hive-webapps/hiveserver2/llap.html
@@ -37,6 +37,7 @@
 Hive Configuration
 Stack Trace
 Llap Daemons
+Configure logging
 
   
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c0a9d3ba/service/src/resources/hive-webapps/hiveserver2/logconf.jsp
--
diff --git a/service/src/resources/hive-webapps/hiveserver2/logconf.jsp 
b/service/src/resources/hive-webapps/hiveserver2/logconf.jsp
new file mode 100644
index 000..a5747c0
--- /dev/null
+++ b/service/src/resources/hive-webapps/hiveserver2/logconf.jsp
@@ -0,0 +1,140 @@
+<%--
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+--%>
+<%@ page contentType="text/html;charset=UTF-8"
+ import="org.apache.hadoop.conf.Configuration"
+ import="org.apache.hadoop.hive.conf.HiveConf"
+ import="org.apache.hadoop.hive.conf.HiveConf.ConfVars"
+ import="org.apache.hive.common.util.HiveVersionInfo"
+ import="org.apache.hive.http.HttpServer"
+ import="org.apache.hive.service.cli.operation.Operation"
+ import="org.apache.hive.service.cli.operation.SQLOperation"
+ import="org.apache.hadoop.hive.ql.QueryInfo"
+ import="org.apache.hive.service.cli.session.SessionManager"
+ import="org.apache.hive.service.cli.session.HiveSession"
+ import="javax.servlet.ServletContext"
+ import="java.util.Collection"
+ import="java.util.Date"
+ import="java.util.List"
+ import="jodd.util.HtmlEncoder"
+%>
+
+<%
+ServletContext ctx = getServletContext();
+Configuration conf = (Configuration)ctx.getAttribute("hive.conf");
+long startcode = conf.getLong("startcode", System.currentTimeMillis());
+SessionManager sessionManager =
+(SessionManager)ctx.getAttribute("hive.sm");
+String 

[4/6] hive git commit: HIVE-20498: Support date type for column stats autogather (Zoltan Haindrich reviewed by Prasanth Jayachandran)

2018-09-20 Thread kgyrtkirk
http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive.q.out
--
diff --git 
a/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive.q.out
 
b/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive.q.out
index a838d6f..6aaf494 100644
--- 
a/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive.q.out
@@ -638,14 +638,14 @@ STAGE PLANS:
 Map Operator Tree:
 TableScan
   alias: part_change_various_various_timestamp_n6
-  Statistics: Num rows: 6 Data size: 6973 Basic stats: 
COMPLETE Column stats: PARTIAL
+  Statistics: Num rows: 6 Data size: 840 Basic stats: COMPLETE 
Column stats: PARTIAL
   Select Operator
 expressions: insert_num (type: int), part (type: int), c1 
(type: timestamp), c2 (type: timestamp), c3 (type: timestamp), c4 (type: 
timestamp), c5 (type: timestamp), c6 (type: timestamp), c7 (type: timestamp), 
c8 (type: timestamp), c9 (type: timestamp), c10 (type: timestamp), c11 (type: 
timestamp), c12 (type: timestamp), b (type: string)
 outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14
-Statistics: Num rows: 6 Data size: 4032 Basic stats: 
COMPLETE Column stats: PARTIAL
+Statistics: Num rows: 6 Data size: 840 Basic stats: 
COMPLETE Column stats: PARTIAL
 File Output Operator
   compressed: false
-  Statistics: Num rows: 6 Data size: 4032 Basic stats: 
COMPLETE Column stats: PARTIAL
+  Statistics: Num rows: 6 Data size: 840 Basic stats: 
COMPLETE Column stats: PARTIAL
   table:
   input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
   output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive_llap_io.q.out
--
diff --git 
a/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive_llap_io.q.out
 
b/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive_llap_io.q.out
index 9bb5648..4ff233d 100644
--- 
a/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive_llap_io.q.out
+++ 
b/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_all_primitive_llap_io.q.out
@@ -640,14 +640,14 @@ STAGE PLANS:
 Map Operator Tree:
 TableScan
   alias: part_change_various_various_timestamp_n5
-  Statistics: Num rows: 6 Data size: 6973 Basic stats: 
COMPLETE Column stats: PARTIAL
+  Statistics: Num rows: 6 Data size: 840 Basic stats: COMPLETE 
Column stats: PARTIAL
   Select Operator
 expressions: insert_num (type: int), part (type: int), c1 
(type: timestamp), c2 (type: timestamp), c3 (type: timestamp), c4 (type: 
timestamp), c5 (type: timestamp), c6 (type: timestamp), c7 (type: timestamp), 
c8 (type: timestamp), c9 (type: timestamp), c10 (type: timestamp), c11 (type: 
timestamp), c12 (type: timestamp), b (type: string)
 outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14
-Statistics: Num rows: 6 Data size: 4032 Basic stats: 
COMPLETE Column stats: PARTIAL
+Statistics: Num rows: 6 Data size: 840 Basic stats: 
COMPLETE Column stats: PARTIAL
 File Output Operator
   compressed: false
-  Statistics: Num rows: 6 Data size: 4032 Basic stats: 
COMPLETE Column stats: PARTIAL
+  Statistics: Num rows: 6 Data size: 840 Basic stats: 
COMPLETE Column stats: PARTIAL
   table:
   input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
   output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat

http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_llap_io.q.out
--
diff --git 
a/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_llap_io.q.out
 
b/ql/src/test/results/clientpositive/llap/schema_evol_orc_nonvec_part_llap_io.q.out
index 

[2/6] hive git commit: HIVE-20498: Support date type for column stats autogather (Zoltan Haindrich reviewed by Prasanth Jayachandran)

2018-09-20 Thread kgyrtkirk
http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/test/results/clientpositive/llap/vector_interval_2.q.out
--
diff --git a/ql/src/test/results/clientpositive/llap/vector_interval_2.q.out 
b/ql/src/test/results/clientpositive/llap/vector_interval_2.q.out
index a74023f..0c47829 100644
--- a/ql/src/test/results/clientpositive/llap/vector_interval_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_interval_2.q.out
@@ -126,7 +126,7 @@ STAGE PLANS:
 Map Operator Tree:
 TableScan
   alias: vector_interval_2
-  Statistics: Num rows: 2 Data size: 736 Basic stats: COMPLETE 
Column stats: NONE
+  Statistics: Num rows: 2 Data size: 348 Basic stats: COMPLETE 
Column stats: COMPLETE
   TableScan Vectorization:
   native: true
   Select Operator
@@ -137,7 +137,7 @@ STAGE PLANS:
 native: true
 projectedOutputColumnNums: [2, 9, 10, 11, 12, 13, 14, 
15, 16, 8, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]
 selectExpressions: LongColEqualLongColumn(col 
7:interval_year_month, col 8:interval_year_month)(children: 
CastStringToIntervalYearMonth(col 2:string) -> 7:interval_year_month, 
CastStringToIntervalYearMonth(col 2:string) -> 8:interval_year_month) -> 
9:boolean, LongColLessEqualLongColumn(col 7:interval_year_month, col 
8:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 
7:interval_year_month, CastStringToIntervalYearMonth(col 2:string) -> 
8:interval_year_month) -> 10:boolean, LongColLessEqualLongColumn(col 
7:interval_year_month, col 8:interval_year_month)(children: 
CastStringToIntervalYearMonth(col 2:string) -> 7:interval_year_month, 
CastStringToIntervalYearMonth(col 3:string) -> 8:interval_year_month) -> 
11:boolean, LongColLessLongColumn(col 7:interval_year_month, col 
8:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 
7:interval_year_month, CastStringToIntervalYearMonth(col 3:string) -> 
8:interval_year_mo
 nth) -> 12:boolean, LongColGreaterEqualLongColumn(col 7:interval_year_month, 
col 8:interval_year_month)(children: CastStringToIntervalYearMonth(col 
2:string) -> 7:interval_year_month, CastStringToIntervalYearMonth(col 2:string) 
-> 8:interval_year_month) -> 13:boolean, LongColGreaterEqualLongColumn(col 
7:interval_year_month, col 8:interval_year_month)(children: 
CastStringToIntervalYearMonth(col 3:string) -> 7:interval_year_month, 
CastStringToIntervalYearMonth(col 2:string) -> 8:interval_year_month) -> 
14:boolean, LongColGreaterLongColumn(col 7:interval_year_month, col 
8:interval_year_month)(children: CastStringToIntervalYearMonth(col 3:string) -> 
7:interval_year_month, CastStringToIntervalYearMonth(col 2:string) -> 
8:interval_year_month) -> 15:boolean, LongColNotEqualLongColumn(col 
7:interval_year_month, col 8:interval_year_month)(children: 
CastStringToIntervalYearMonth(col 2:string) -> 7:interval_year_month, 
CastStringToIntervalYearMonth(col 3:string) -> 8:interval_year_month) -> 16
 :boolean, IntervalYearMonthColEqualIntervalYearMonthScalar(col 
7:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 
2:string) -> 7:interval_year_month) -> 8:boolean, 
IntervalYearMonthColLessEqualIntervalYearMonthScalar(col 7:interval_year_month, 
val 14)(children: CastStringToIntervalYearMonth(col 2:string) -> 
7:interval_year_month) -> 17:boolean, 
IntervalYearMonthColLessEqualIntervalYearMonthScalar(col 7:interval_year_month, 
val 15)(children: CastStringToIntervalYearMonth(col 2:string) -> 
7:interval_year_month) -> 18:boolean, 
IntervalYearMonthColLessIntervalYearMonthScalar(col 7:interval_year_month, val 
15)(children: CastStringToIntervalYearMonth(col 2:string) -> 
7:interval_year_month) -> 19:boolean, 
IntervalYearMonthColGreaterEqualIntervalYearMonthScalar(col 
7:interval_year_month, val 14)(children: CastStringToIntervalYearMonth(col 
2:string) -> 7:interval_year_month) -> 20:boolean, 
IntervalYearMonthColGreaterEqualIntervalYearMonthScalar(col 7:interval_year_mon
 th, val 14)(children: CastStringToIntervalYearMonth(col 3:string) -> 
7:interval_year_month) -> 21:boolean, 
IntervalYearMonthColGreaterIntervalYearMonthScalar(col 7:interval_year_month, 
val 14)(children: CastStringToIntervalYearMonth(col 3:string) -> 
7:interval_year_month) -> 22:boolean, 
IntervalYearMonthColNotEqualIntervalYearMonthScalar(col 7:interval_year_month, 
val 15)(children: CastStringToIntervalYearMonth(col 2:string) -> 
7:interval_year_month) -> 23:boolean, 
IntervalYearMonthScalarEqualIntervalYearMonthColumn(val 14, col 
7:interval_year_month)(children: CastStringToIntervalYearMonth(col 2:string) -> 
7:interval_year_month) -> 24:boolean, 
IntervalYearMonthScalarLessEqualIntervalYearMonthColumn(val 14, col 
7:interval_year_month)(children: 

[6/6] hive git commit: HIVE-20498: Support date type for column stats autogather (Zoltan Haindrich reviewed by Prasanth Jayachandran)

2018-09-20 Thread kgyrtkirk
HIVE-20498: Support date type for column stats autogather (Zoltan Haindrich 
reviewed by Prasanth Jayachandran)

Signed-off-by: Zoltan Haindrich 


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

Branch: refs/heads/master
Commit: 9b376a7b040f99aa9f894343537584d19ab45056
Parents: ee5566b
Author: Zoltan Haindrich 
Authored: Thu Sep 20 08:14:29 2018 +0200
Committer: Zoltan Haindrich 
Committed: Thu Sep 20 08:15:34 2018 +0200

--
 .../ql/parse/ColumnStatsAutoGatherContext.java  |   2 +-
 .../queries/clientpositive/autoColumnStats_11.q |  28 ++
 .../alter_table_update_status.q.out | 358 +-
 ..._table_update_status_disable_bitvector.q.out | 288 +++
 .../clientpositive/autoColumnStats_11.q.out | 362 +++
 .../results/clientpositive/constprog_type.q.out |  31 +-
 .../extrapolate_part_stats_date.q.out   |   2 +-
 .../clientpositive/llap/orc_llap_counters.q.out |   2 +-
 .../llap/orc_llap_counters1.q.out   |   2 +-
 .../clientpositive/llap/orc_ppd_date.q.out  |  28 +-
 .../llap/schema_evol_orc_nonvec_part.q.out  |   6 +-
 ...ema_evol_orc_nonvec_part_all_primitive.q.out |   6 +-
 ..._orc_nonvec_part_all_primitive_llap_io.q.out |   6 +-
 .../schema_evol_orc_nonvec_part_llap_io.q.out   |   6 +-
 .../llap/schema_evol_orc_vec_part.q.out |   6 +-
 ...schema_evol_orc_vec_part_all_primitive.q.out |   6 +-
 ...vol_orc_vec_part_all_primitive_llap_io.q.out |   6 +-
 .../llap/schema_evol_text_nonvec_part.q.out |   6 +-
 ...ma_evol_text_nonvec_part_all_primitive.q.out |   6 +-
 ...text_nonvec_part_all_primitive_llap_io.q.out |  12 +-
 .../schema_evol_text_nonvec_part_llap_io.q.out  |   6 +-
 .../llap/schema_evol_text_vec_part.q.out|   6 +-
 ...chema_evol_text_vec_part_all_primitive.q.out |   6 +-
 ...ol_text_vec_part_all_primitive_llap_io.q.out |  12 +-
 .../schema_evol_text_vec_part_llap_io.q.out |   6 +-
 .../schema_evol_text_vec_table_llap_io.q.out|   6 +-
 .../llap/schema_evol_text_vecrow_part.q.out |   6 +-
 ...ma_evol_text_vecrow_part_all_primitive.q.out |   6 +-
 ...text_vecrow_part_all_primitive_llap_io.q.out |  12 +-
 .../schema_evol_text_vecrow_part_llap_io.q.out  |  12 +-
 .../schema_evol_text_vecrow_table_llap_io.q.out |  12 +-
 .../clientpositive/llap/subquery_scalar.q.out   |  68 ++--
 .../llap/vector_aggregate_9.q.out   |  42 +--
 .../llap/vector_case_when_2.q.out   |  30 +-
 .../clientpositive/llap/vector_date_1.q.out |  68 ++--
 .../clientpositive/llap/vector_distinct_2.q.out |  14 +-
 .../clientpositive/llap/vector_groupby_3.q.out  |  14 +-
 .../clientpositive/llap/vector_interval_1.q.out |  80 ++--
 .../clientpositive/llap/vector_interval_2.q.out | 112 +++---
 .../llap/vector_interval_arithmetic.q.out   |  60 +--
 .../clientpositive/llap/vector_orderby_5.q.out  |  16 +-
 .../llap/vector_partitioned_date_time.q.out |  48 +--
 .../clientpositive/llap/vector_reduce1.q.out|  10 +-
 .../clientpositive/llap/vector_reduce2.q.out|  10 +-
 .../clientpositive/llap/vector_reduce3.q.out|  10 +-
 .../llap/vector_string_concat.q.out |  20 +-
 .../llap/vectorized_date_funcs.q.out|  42 +--
 .../test_teradatabinaryfile.q.out   |   2 +-
 .../merge/DateColumnStatsMerger.java|  33 +-
 .../merge/DateColumnStatsMergerTest.java| 108 ++
 .../merge/DecimalColumnStatsMergerTest.java |   2 -
 51 files changed, 1297 insertions(+), 751 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
--
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
index de0282f..11ccff4 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/parse/ColumnStatsAutoGatherContext.java
@@ -277,7 +277,7 @@ public class ColumnStatsAutoGatherContext {
 case VARCHAR:
 case BINARY:
 case DECIMAL:
-  // TODO: Support case DATE:
+case DATE:
   break;
 default:
   return false;

http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/test/queries/clientpositive/autoColumnStats_11.q
--
diff --git a/ql/src/test/queries/clientpositive/autoColumnStats_11.q 

[1/6] hive git commit: HIVE-20498: Support date type for column stats autogather (Zoltan Haindrich reviewed by Prasanth Jayachandran)

2018-09-20 Thread kgyrtkirk
Repository: hive
Updated Branches:
  refs/heads/master ee5566b75 -> 9b376a7b0


http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/test/results/clientpositive/llap/vector_interval_arithmetic.q.out
--
diff --git 
a/ql/src/test/results/clientpositive/llap/vector_interval_arithmetic.q.out 
b/ql/src/test/results/clientpositive/llap/vector_interval_arithmetic.q.out
index 9e59594..07616bb 100644
--- a/ql/src/test/results/clientpositive/llap/vector_interval_arithmetic.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_interval_arithmetic.q.out
@@ -80,7 +80,7 @@ STAGE PLANS:
 Map Operator Tree:
 TableScan
   alias: interval_arithmetic_1
-  Statistics: Num rows: 50 Data size: 2744 Basic stats: 
COMPLETE Column stats: NONE
+  Statistics: Num rows: 50 Data size: 2800 Basic stats: 
COMPLETE Column stats: COMPLETE
   TableScan Vectorization:
   native: true
   Select Operator
@@ -91,7 +91,7 @@ STAGE PLANS:
 native: true
 projectedOutputColumnNums: [0, 3, 4, 5, 6, 7, 8]
 selectExpressions: 
DateColSubtractIntervalYearMonthScalar(col 0:date, val 2-2) -> 3:date, 
DateColSubtractIntervalYearMonthScalar(col 0:date, val -2-2) -> 4:date, 
DateColAddIntervalYearMonthScalar(col 0:date, val 2-2) -> 5:date, 
DateColAddIntervalYearMonthScalar(col 0:date, val -2-2) -> 6:date, 
IntervalYearMonthScalarAddDateColumn(val -2-2, col 0:interval_year_month) -> 
7:date, IntervalYearMonthScalarAddDateColumn(val 2-2, col 
0:interval_year_month) -> 8:date
-Statistics: Num rows: 50 Data size: 2744 Basic stats: 
COMPLETE Column stats: NONE
+Statistics: Num rows: 50 Data size: 19600 Basic stats: 
COMPLETE Column stats: COMPLETE
 Reduce Output Operator
   key expressions: _col0 (type: date)
   sort order: +
@@ -99,7 +99,7 @@ STAGE PLANS:
   className: VectorReduceSinkObjectHashOperator
   native: true
   nativeConditionsMet: 
hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine 
tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, 
BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
-  Statistics: Num rows: 50 Data size: 2744 Basic stats: 
COMPLETE Column stats: NONE
+  Statistics: Num rows: 50 Data size: 19600 Basic stats: 
COMPLETE Column stats: COMPLETE
   value expressions: _col1 (type: date), _col2 (type: 
date), _col3 (type: date), _col4 (type: date), _col5 (type: date), _col6 (type: 
date)
 Execution mode: vectorized, llap
 LLAP IO: all inputs
@@ -128,13 +128,13 @@ STAGE PLANS:
 className: VectorSelectOperator
 native: true
 projectedOutputColumnNums: [0, 1, 2, 3, 4, 5, 6]
-Statistics: Num rows: 50 Data size: 2744 Basic stats: COMPLETE 
Column stats: NONE
+Statistics: Num rows: 50 Data size: 19600 Basic stats: 
COMPLETE Column stats: COMPLETE
 File Output Operator
   compressed: false
   File Sink Vectorization:
   className: VectorFileSinkOperator
   native: false
-  Statistics: Num rows: 50 Data size: 2744 Basic stats: 
COMPLETE Column stats: NONE
+  Statistics: Num rows: 50 Data size: 19600 Basic stats: 
COMPLETE Column stats: COMPLETE
   table:
   input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
   output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -262,7 +262,7 @@ STAGE PLANS:
 Map Operator Tree:
 TableScan
   alias: interval_arithmetic_1
-  Statistics: Num rows: 50 Data size: 2744 Basic stats: 
COMPLETE Column stats: NONE
+  Statistics: Num rows: 50 Data size: 2800 Basic stats: 
COMPLETE Column stats: COMPLETE
   TableScan Vectorization:
   native: true
   Select Operator
@@ -273,7 +273,7 @@ STAGE PLANS:
 native: true
 projectedOutputColumnNums: [0, 3, 4, 5]
 selectExpressions: DateColSubtractDateScalar(col 
0:date, val 1999-06-07) -> 3:interval_day_time, 
DateScalarSubtractDateColumn(val 1999-06-07, col 0:date) -> 
4:interval_day_time, DateColSubtractDateColumn(col 0:date, col 0:date) -> 
5:interval_day_time
-Statistics: Num rows: 50 Data size: 2744 Basic stats: 
COMPLETE Column stats: NONE
+   

[3/6] hive git commit: HIVE-20498: Support date type for column stats autogather (Zoltan Haindrich reviewed by Prasanth Jayachandran)

2018-09-20 Thread kgyrtkirk
http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out
--
diff --git a/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out 
b/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out
index 781f990..243e55e 100644
--- a/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_case_when_2.q.out
@@ -135,15 +135,15 @@ STAGE PLANS:
 Map Operator Tree:
 TableScan
   alias: timestamps
-  Statistics: Num rows: 51 Data size: 16000 Basic stats: 
COMPLETE Column stats: NONE
+  Statistics: Num rows: 51 Data size: 12597 Basic stats: 
COMPLETE Column stats: COMPLETE
   Select Operator
 expressions: ctimestamp1 (type: timestamp), ctimestamp2 
(type: timestamp), CASE WHEN ((ctimestamp2 <= TIMESTAMP'1800-12-31 00:00:00')) 
THEN ('1800s or Earlier') WHEN ((ctimestamp2 < TIMESTAMP'1900-01-01 00:00:00')) 
THEN ('1900s') WHEN (ctimestamp2 BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND 
TIMESTAMP'2010-12-31 23:59:59.9') THEN ('Late 2000s') WHEN 
((ctimestamp2 <= TIMESTAMP'2015-12-31 23:59:59.9')) THEN ('Early 
2010s') ELSE ('Unknown') END (type: string), CASE WHEN ((ctimestamp2 <= 
TIMESTAMP'2000-12-31 23:59:59.9')) THEN ('Old') WHEN ((ctimestamp2 < 
TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 BETWEEN 
TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 23:59:59.9') 
THEN ('Late 2000s') WHEN ((ctimestamp2 <= TIMESTAMP'2015-12-31 
23:59:59.9')) THEN ('Early 2010s') ELSE (null) END (type: string), CASE 
WHEN ((ctimestamp2 <= TIMESTAMP'2000-12-31 23:59:59.9')) THEN ('Old') 
WHEN ((ctimestamp2 
 < TIMESTAMP'2006-01-01 00:00:00')) THEN ('Early 2000s') WHEN (ctimestamp2 
BETWEEN TIMESTAMP'2006-01-01 00:00:00' AND TIMESTAMP'2010-12-31 
23:59:59.9') THEN ('Late 2000s') WHEN ((ctimestamp2 <= 
TIMESTAMP'2015-12-31 23:59:59.9')) THEN (null) ELSE (null) END (type: 
string), if((ctimestamp1 < TIMESTAMP'1974-10-04 17:21:03.989'), 
year(ctimestamp1), year(ctimestamp2)) (type: int), CASE WHEN ((stimestamp1 like 
'%19%')) THEN (stimestamp1) ELSE (TIMESTAMP'2018-03-08 23:04:59') END (type: 
string), if((ctimestamp1 = TIMESTAMP'2021-09-24 03:18:32.413655165'), null, 
minute(ctimestamp1)) (type: int), if(((ctimestamp2 >= TIMESTAMP'5344-10-04 
18:40:08.165') and (ctimestamp2 < TIMESTAMP'6631-11-13 16:31:29.702202248')), 
minute(ctimestamp1), null) (type: int), if(((UDFToDouble(ctimestamp1) % 500.0D) 
> 100.0D), date_add(cdate, 1), date_add(cdate, 365)) (type: date), stimestamp1 
(type: string)
 outputColumnNames: _col0, _col1, _col2, _col3, _col4, 
_col5, _col6, _col7, _col8, _col9, _col10
-Statistics: Num rows: 51 Data size: 16000 Basic stats: 
COMPLETE Column stats: NONE
+Statistics: Num rows: 51 Data size: 50745 Basic stats: 
COMPLETE Column stats: COMPLETE
 Reduce Output Operator
   key expressions: _col0 (type: timestamp), _col10 (type: 
string), _col1 (type: timestamp)
   sort order: +++
-  Statistics: Num rows: 51 Data size: 16000 Basic stats: 
COMPLETE Column stats: NONE
+  Statistics: Num rows: 51 Data size: 50745 Basic stats: 
COMPLETE Column stats: COMPLETE
   value expressions: _col2 (type: string), _col3 (type: 
string), _col4 (type: string), _col5 (type: int), _col6 (type: string), _col7 
(type: int), _col8 (type: int), _col9 (type: date)
 Execution mode: llap
 LLAP IO: all inputs
@@ -176,13 +176,13 @@ STAGE PLANS:
 className: VectorSelectOperator
 native: true
 projectedOutputColumnNums: [0, 2, 3, 4, 5, 6, 7, 8, 9, 10]
-Statistics: Num rows: 51 Data size: 16000 Basic stats: 
COMPLETE Column stats: NONE
+Statistics: Num rows: 51 Data size: 45084 Basic stats: 
COMPLETE Column stats: COMPLETE
 File Output Operator
   compressed: false
   File Sink Vectorization:
   className: VectorFileSinkOperator
   native: false
-  Statistics: Num rows: 51 Data size: 16000 Basic stats: 
COMPLETE Column stats: NONE
+  Statistics: Num rows: 51 Data size: 45084 Basic stats: 
COMPLETE Column stats: COMPLETE
   table:
   input format: 
org.apache.hadoop.mapred.SequenceFileInputFormat
   output format: 
org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
@@ -397,7 +397,7 @@ STAGE PLANS:
 Map Operator Tree:
 TableScan
   alias: 

[5/6] hive git commit: HIVE-20498: Support date type for column stats autogather (Zoltan Haindrich reviewed by Prasanth Jayachandran)

2018-09-20 Thread kgyrtkirk
http://git-wip-us.apache.org/repos/asf/hive/blob/9b376a7b/ql/src/test/results/clientpositive/alter_table_update_status_disable_bitvector.q.out
--
diff --git 
a/ql/src/test/results/clientpositive/alter_table_update_status_disable_bitvector.q.out
 
b/ql/src/test/results/clientpositive/alter_table_update_status_disable_bitvector.q.out
index fd4bb7b..1b787af 100644
--- 
a/ql/src/test/results/clientpositive/alter_table_update_status_disable_bitvector.q.out
+++ 
b/ql/src/test/results/clientpositive/alter_table_update_status_disable_bitvector.q.out
@@ -339,17 +339,17 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@datatype_stats
 col_name   s   
 
 data_type  smallint
 
-min
 
-max
 
-num_nulls  
 
-distinct_count 
 
+min0   
 
+max3   
 
+num_nulls  1   
 
+distinct_count 1   
 
 avg_col_len
 
 max_col_len
 
 num_trues  
 
 num_falses 
 
 bitVector  
 
 commentfrom deserializer   
 
-COLUMN_STATS_ACCURATE  {\"BASIC_STATS\":\"true\"}  
 
+COLUMN_STATS_ACCURATE  
{\"BASIC_STATS\":\"true\",\"COLUMN_STATS\":{\"b\":\"true\",\"bin\":\"true\",\"bl\":\"true\",\"c\":\"true\",\"d\":\"true\",\"dem\":\"true\",\"dt\":\"true\",\"f\":\"true\",\"i\":\"true\",\"s\":\"true\",\"str\":\"true\",\"t\":\"true\",\"ts\":\"true\",\"v\":\"true\"}}

 
 PREHOOK: query: DESC FORMATTED datatype_stats i
 PREHOOK: type: DESCTABLE
 PREHOOK: Input: default@datatype_stats
@@ -358,17 +358,17 @@ POSTHOOK: type: DESCTABLE
 POSTHOOK: Input: default@datatype_stats
 col_name   i   
 
 data_type  int 
 
-min
 
-max
 
-num_nulls  
 
-distinct_count 
 
+min0   
 
+max45  
 
+num_nulls  1   
 
+distinct_count 1   
 
 avg_col_len
 
 max_col_len
 
 num_trues  
 
 num_falses