hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vihan...@apache.org
Subject [29/29] hive git commit: HIVE-17528 : Add more q-tests for Hive-on-Spark with Parquet vectorized reader (Ferdinand Xu, reviewed by Vihang Karajgaonkar)
Date Wed, 29 Nov 2017 18:01:43 GMT
HIVE-17528 : Add more q-tests for Hive-on-Spark with Parquet vectorized reader (Ferdinand Xu, reviewed by Vihang Karajgaonkar)


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

Branch: refs/heads/master
Commit: 9a59592e5e483a9472771ec8cb0104764bdfcc9d
Parents: 65cd866
Author: Vihang Karajgaonkar <vihang@cloudera.com>
Authored: Wed Nov 29 09:49:39 2017 -0800
Committer: Vihang Karajgaonkar <vihang@cloudera.com>
Committed: Wed Nov 29 10:00:46 2017 -0800

----------------------------------------------------------------------
 data/scripts/q_test_cleanup.sql                 |     1 +
 data/scripts/q_test_init.sql                    |    26 +
 .../test/resources/testconfiguration.properties |    28 +
 .../org/apache/hadoop/hive/ql/QTestUtil.java    |     4 +-
 pom.xml                                         |     2 +-
 .../parquet_read_backward_compatible_files.q    |     6 +-
 .../clientpositive/parquet_vectorization_0.q    |   276 +
 .../clientpositive/parquet_vectorization_1.q    |    47 +
 .../clientpositive/parquet_vectorization_10.q   |    52 +
 .../clientpositive/parquet_vectorization_11.q   |    34 +
 .../clientpositive/parquet_vectorization_12.q   |    69 +
 .../clientpositive/parquet_vectorization_13.q   |   137 +
 .../clientpositive/parquet_vectorization_14.q   |    72 +
 .../clientpositive/parquet_vectorization_15.q   |    71 +
 .../clientpositive/parquet_vectorization_16.q   |    46 +
 .../clientpositive/parquet_vectorization_17.q   |    53 +
 .../clientpositive/parquet_vectorization_2.q    |    50 +
 .../clientpositive/parquet_vectorization_3.q    |    55 +
 .../clientpositive/parquet_vectorization_4.q    |    50 +
 .../clientpositive/parquet_vectorization_5.q    |    44 +
 .../clientpositive/parquet_vectorization_6.q    |    46 +
 .../clientpositive/parquet_vectorization_7.q    |   115 +
 .../clientpositive/parquet_vectorization_8.q    |   107 +
 .../clientpositive/parquet_vectorization_9.q    |    46 +
 .../parquet_vectorization_decimal_date.q        |     7 +
 .../clientpositive/parquet_vectorization_div0.q |    27 +
 .../parquet_vectorization_limit.q               |    43 +
 .../parquet_vectorization_nested_udf.q          |     5 +
 .../clientpositive/parquet_vectorization_not.q  |    30 +
 .../parquet_vectorization_offset_limit.q        |    11 +
 .../clientpositive/parquet_vectorization_part.q |    10 +
 .../parquet_vectorization_part_project.q        |    11 +
 .../parquet_vectorization_part_varchar.q        |    10 +
 .../parquet_vectorization_pushdown.q            |     8 +
 .../results/clientpositive/add_part_exist.q.out |     1 +
 ql/src/test/results/clientpositive/alter1.q.out |     1 +
 ql/src/test/results/clientpositive/alter2.q.out |     1 +
 ql/src/test/results/clientpositive/alter3.q.out |     1 +
 ql/src/test/results/clientpositive/alter4.q.out |     1 +
 ql/src/test/results/clientpositive/alter5.q.out |     1 +
 .../results/clientpositive/alter_index.q.out    |     1 +
 .../clientpositive/alter_rename_partition.q.out |     2 +
 .../clientpositive/authorization_9.q.out        |    12 +
 .../authorization_show_grant.q.out              |     4 +
 ql/src/test/results/clientpositive/cte_5.q.out  |     1 +
 .../test/results/clientpositive/cte_mat_4.q.out |     4 +
 .../test/results/clientpositive/cte_mat_5.q.out |     1 +
 .../clientpositive/describe_table_json.q.out    |     2 +-
 .../clientpositive/drop_table_with_index.q.out  |     1 +
 .../results/clientpositive/index_creation.q.out |     1 +
 ql/src/test/results/clientpositive/input2.q.out |     2 +
 ql/src/test/results/clientpositive/input3.q.out |     2 +
 .../results/clientpositive/llap/cte_5.q.out     |     1 +
 .../results/clientpositive/llap/cte_mat_4.q.out |     4 +
 .../results/clientpositive/llap/cte_mat_5.q.out |     1 +
 .../clientpositive/llap/jdbc_handler.q.out      |     3 +
 .../clientpositive/llap/resourceplan.q.out      |     4 +
 .../results/clientpositive/llap/sysdb.q.out     |    29 +-
 .../clientpositive/llap/temp_table.q.out        |     1 +
 ...parquet_read_backward_compatible_files.q.out |    24 +-
 .../parquet_vectorization_0.q.out               | 31543 ++++++++++++++++
 .../parquet_vectorization_1.q.out               |   185 +
 .../parquet_vectorization_10.q.out              |   409 +
 .../parquet_vectorization_11.q.out              |   173 +
 .../parquet_vectorization_12.q.out              |   815 +
 .../parquet_vectorization_13.q.out              |   646 +
 .../parquet_vectorization_14.q.out              |   910 +
 .../parquet_vectorization_15.q.out              |   324 +
 .../parquet_vectorization_16.q.out              |   707 +
 .../parquet_vectorization_17.q.out              |   536 +
 .../parquet_vectorization_2.q.out               |   193 +
 .../parquet_vectorization_3.q.out               |   203 +
 .../parquet_vectorization_4.q.out               |   193 +
 .../parquet_vectorization_5.q.out               |   181 +
 .../parquet_vectorization_6.q.out               |  1729 +
 .../parquet_vectorization_7.q.out               |   435 +
 .../parquet_vectorization_8.q.out               |   409 +
 .../parquet_vectorization_9.q.out               |   707 +
 .../parquet_vectorization_decimal_date.q.out    |   101 +
 .../parquet_vectorization_div0.q.out            |   569 +
 .../parquet_vectorization_limit.q.out           |   782 +
 .../parquet_vectorization_nested_udf.q.out      |     9 +
 .../parquet_vectorization_not.q.out             |    58 +
 .../parquet_vectorization_offset_limit.q.out    |   163 +
 .../parquet_vectorization_part.q.out            |    72 +
 .../parquet_vectorization_part_project.q.out    |   134 +
 .../parquet_vectorization_part_varchar.q.out    |    72 +
 .../parquet_vectorization_pushdown.q.out        |    81 +
 .../results/clientpositive/rename_column.q.out  |     1 +
 .../results/clientpositive/show_tables.q.out    |     2 +
 .../spark/parquet_vectorization_0.q.out         | 31602 +++++++++++++++++
 .../spark/parquet_vectorization_1.q.out         |   217 +
 .../spark/parquet_vectorization_10.q.out        |   412 +
 .../spark/parquet_vectorization_11.q.out        |   176 +
 .../spark/parquet_vectorization_12.q.out        |   835 +
 .../spark/parquet_vectorization_13.q.out        |   679 +
 .../spark/parquet_vectorization_14.q.out        |   929 +
 .../spark/parquet_vectorization_15.q.out        |   299 +
 .../spark/parquet_vectorization_16.q.out        |   740 +
 .../spark/parquet_vectorization_17.q.out        |   560 +
 .../spark/parquet_vectorization_2.q.out         |   225 +
 .../spark/parquet_vectorization_3.q.out         |   235 +
 .../spark/parquet_vectorization_4.q.out         |   225 +
 .../spark/parquet_vectorization_5.q.out         |   213 +
 .../spark/parquet_vectorization_6.q.out         |  1732 +
 .../spark/parquet_vectorization_7.q.out         |   480 +
 .../spark/parquet_vectorization_8.q.out         |   454 +
 .../spark/parquet_vectorization_9.q.out         |   740 +
 .../parquet_vectorization_decimal_date.q.out    |   104 +
 .../spark/parquet_vectorization_div0.q.out      |   608 +
 .../spark/parquet_vectorization_limit.q.out     |   932 +
 .../parquet_vectorization_nested_udf.q.out      |     9 +
 .../spark/parquet_vectorization_not.q.out       |    58 +
 .../parquet_vectorization_offset_limit.q.out    |   184 +
 .../spark/parquet_vectorization_part.q.out      |    72 +
 .../parquet_vectorization_part_project.q.out    |   143 +
 .../parquet_vectorization_part_varchar.q.out    |    72 +
 .../spark/parquet_vectorization_pushdown.q.out  |    90 +
 .../clientpositive/spark/temp_table.q.out       |     1 +
 .../clientpositive/temp_table_truncate.q.out    |     1 +
 120 files changed, 87044 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/data/scripts/q_test_cleanup.sql
----------------------------------------------------------------------
diff --git a/data/scripts/q_test_cleanup.sql b/data/scripts/q_test_cleanup.sql
index 4620dcd..1c59381 100644
--- a/data/scripts/q_test_cleanup.sql
+++ b/data/scripts/q_test_cleanup.sql
@@ -17,6 +17,7 @@ DROP TABLE IF EXISTS dest_g1;
 DROP TABLE IF EXISTS dest_g2;
 DROP TABLE IF EXISTS fetchtask_ioexception;
 DROP TABLE IF EXISTS alltypesorc;
+DROP TABLE IF EXISTS alltypesparquet;
 DROP TABLE IF EXISTS cbo_t1;
 DROP TABLE IF EXISTS cbo_t2;
 DROP TABLE IF EXISTS cbo_t3;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/data/scripts/q_test_init.sql
----------------------------------------------------------------------
diff --git a/data/scripts/q_test_init.sql b/data/scripts/q_test_init.sql
index f763c12..01d6d4c 100644
--- a/data/scripts/q_test_init.sql
+++ b/data/scripts/q_test_init.sql
@@ -161,6 +161,32 @@ ANALYZE TABLE alltypesorc COMPUTE STATISTICS;
 ANALYZE TABLE alltypesorc COMPUTE STATISTICS FOR COLUMNS ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2;
 
 --
+-- Table alltypesparquet
+--
+DROP TABLE IF EXISTS alltypesparquet;
+CREATE TABLE alltypesparquet(
+    ctinyint TINYINT,
+    csmallint SMALLINT,
+    cint INT,
+    cbigint BIGINT,
+    cfloat FLOAT,
+    cdouble DOUBLE,
+    cstring1 STRING,
+    cstring2 STRING,
+    ctimestamp1 TIMESTAMP,
+    ctimestamp2 TIMESTAMP,
+    cboolean1 BOOLEAN,
+    cboolean2 BOOLEAN)
+    STORED AS PARQUET;
+
+INSERT OVERWRITE TABLE alltypesparquet SELECT * FROM alltypesorc;
+
+ANALYZE TABLE alltypesparquet COMPUTE STATISTICS;
+
+ANALYZE TABLE alltypesparquet COMPUTE STATISTICS FOR COLUMNS ctinyint,csmallint,cint,cbigint,cfloat,cdouble,cstring1,cstring2,ctimestamp1,ctimestamp2,cboolean1,cboolean2;
+
+
+--
 -- Table primitives
 --
 DROP TABLE IF EXISTS primitives;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/itests/src/test/resources/testconfiguration.properties
----------------------------------------------------------------------
diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties
index c564e33..eabe67f 100644
--- a/itests/src/test/resources/testconfiguration.properties
+++ b/itests/src/test/resources/testconfiguration.properties
@@ -861,6 +861,34 @@ spark.query.files=add_part_multiple.q, \
   alter_merge_orc.q, \
   alter_merge_stats_orc.q, \
   annotate_stats_join.q, \
+  parquet_vectorization_0.q ,\
+  parquet_vectorization_10.q ,\
+  parquet_vectorization_11.q ,\
+  parquet_vectorization_12.q ,\
+  parquet_vectorization_13.q ,\
+  parquet_vectorization_14.q ,\
+  parquet_vectorization_15.q ,\
+  parquet_vectorization_16.q ,\
+  parquet_vectorization_17.q ,\
+  parquet_vectorization_1.q ,\
+  parquet_vectorization_2.q ,\
+  parquet_vectorization_3.q ,\
+  parquet_vectorization_4.q ,\
+  parquet_vectorization_5.q ,\
+  parquet_vectorization_6.q ,\
+  parquet_vectorization_7.q ,\
+  parquet_vectorization_8.q ,\
+  parquet_vectorization_9.q ,\
+  parquet_vectorization_decimal_date.q ,\
+  parquet_vectorization_div0.q ,\
+  parquet_vectorization_limit.q ,\
+  parquet_vectorization_nested_udf.q ,\
+  parquet_vectorization_not.q ,\
+  parquet_vectorization_offset_limit.q ,\
+  parquet_vectorization_part_project.q ,\
+  parquet_vectorization_part.q ,\
+  parquet_vectorization_part_varchar.q ,\
+  parquet_vectorization_pushdown.q ,\
   auto_join0.q, \
   auto_join1.q, \
   auto_join10.q, \

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
----------------------------------------------------------------------
diff --git a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
index f1d90ff..36ad581 100644
--- a/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
+++ b/itests/util/src/main/java/org/apache/hadoop/hive/ql/QTestUtil.java
@@ -209,7 +209,9 @@ public class QTestUtil {
     HashSet<String> srcTables = new HashSet<String>();
     // FIXME: moved default value to here...for now
     // i think this features is never really used from the command line
-    String defaultTestSrcTables = "src,src1,srcbucket,srcbucket2,src_json,src_thrift,src_sequencefile,srcpart,alltypesorc,src_hbase,cbo_t1,cbo_t2,cbo_t3,src_cbo,part,lineitem";
+    String defaultTestSrcTables = "src,src1,srcbucket,srcbucket2,src_json,src_thrift," +
+        "src_sequencefile,srcpart,alltypesorc,src_hbase,cbo_t1,cbo_t2,cbo_t3,src_cbo,part," +
+        "lineitem,alltypesparquet";
     for (String srcTable : System.getProperty("test.src.tables", defaultTestSrcTables).trim().split(",")) {
       srcTable = srcTable.trim();
       if (!srcTable.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index edb38c9..1682f47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1259,7 +1259,7 @@
             <test.warehouse.dir>${test.warehouse.scheme}${test.warehouse.dir}</test.warehouse.dir>
             <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
             <!-- EnforceReadOnlyTables hook and QTestUtil -->
-            <test.src.tables>src,src1,srcbucket,srcbucket2,src_json,src_thrift,src_sequencefile,srcpart,alltypesorc,src_hbase,cbo_t1,cbo_t2,cbo_t3,src_cbo,part,lineitem</test.src.tables>
+            <test.src.tables>src,src1,srcbucket,srcbucket2,src_json,src_thrift,src_sequencefile,srcpart,alltypesorc,alltypesparquet,src_hbase,cbo_t1,cbo_t2,cbo_t3,src_cbo,part,lineitem</test.src.tables>
             <java.security.krb5.conf>${test.conf.dir}/krb5.conf</java.security.krb5.conf>
             <!-- Required by spark to work around SPARK-14958 -->
             <antlr.version>${antlr.version}</antlr.version>

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_read_backward_compatible_files.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_read_backward_compatible_files.q b/ql/src/test/queries/clientpositive/parquet_read_backward_compatible_files.q
index 0abbc2f..f4928c7 100644
--- a/ql/src/test/queries/clientpositive/parquet_read_backward_compatible_files.q
+++ b/ql/src/test/queries/clientpositive/parquet_read_backward_compatible_files.q
@@ -1,7 +1,7 @@
 -- This test makes sure that parquet can read older parquet files written by Hive <= 0.12
 -- alltypesparquet is a files written by older version of Hive
 
-CREATE TABLE alltypesparquet (
+CREATE TABLE alltypesparquet_old (
     bo1 boolean,
     ti1 tinyint,
     si1 smallint,
@@ -15,6 +15,6 @@ CREATE TABLE alltypesparquet (
     st1 struct<c1:int,c2:string>
 ) STORED AS PARQUET;
 
-LOAD DATA LOCAL INPATH '../../data/files/alltypesparquet' OVERWRITE INTO TABLE alltypesparquet;
+LOAD DATA LOCAL INPATH '../../data/files/alltypesparquet' OVERWRITE INTO TABLE alltypesparquet_old;
 
-SELECT * FROM alltypesparquet;
\ No newline at end of file
+SELECT * FROM alltypesparquet_old;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_0.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_0.q b/ql/src/test/queries/clientpositive/parquet_vectorization_0.q
new file mode 100644
index 0000000..69628b8
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_0.q
@@ -0,0 +1,276 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.vectorized.execution.reduce.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+-- Use ORDER BY clauses to generate 2 stages.
+EXPLAIN VECTORIZATION DETAIL
+SELECT MIN(ctinyint) as c1,
+       MAX(ctinyint),
+       COUNT(ctinyint),
+       COUNT(*)
+FROM   alltypesparquet
+ORDER BY c1;
+
+SELECT MIN(ctinyint) as c1,
+       MAX(ctinyint),
+       COUNT(ctinyint),
+       COUNT(*)
+FROM   alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT SUM(ctinyint) as c1
+FROM   alltypesparquet
+ORDER BY c1;
+
+SELECT SUM(ctinyint) as c1
+FROM   alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION
+SELECT
+  avg(ctinyint) as c1,
+  variance(ctinyint),
+  var_pop(ctinyint),
+  var_samp(ctinyint),
+  std(ctinyint),
+  stddev(ctinyint),
+  stddev_pop(ctinyint),
+  stddev_samp(ctinyint)
+FROM alltypesparquet
+ORDER BY c1;
+
+SELECT
+  avg(ctinyint) as c1,
+  variance(ctinyint),
+  var_pop(ctinyint),
+  var_samp(ctinyint),
+  std(ctinyint),
+  stddev(ctinyint),
+  stddev_pop(ctinyint),
+  stddev_samp(ctinyint)
+FROM alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT MIN(cbigint) as c1,
+       MAX(cbigint),
+       COUNT(cbigint),
+       COUNT(*)
+FROM   alltypesparquet
+ORDER BY c1;
+
+SELECT MIN(cbigint) as c1,
+       MAX(cbigint),
+       COUNT(cbigint),
+       COUNT(*)
+FROM   alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT SUM(cbigint) as c1
+FROM   alltypesparquet
+ORDER BY c1;
+
+SELECT SUM(cbigint) as c1
+FROM   alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION
+SELECT
+  avg(cbigint) as c1,
+  variance(cbigint),
+  var_pop(cbigint),
+  var_samp(cbigint),
+  std(cbigint),
+  stddev(cbigint),
+  stddev_pop(cbigint),
+  stddev_samp(cbigint)
+FROM alltypesparquet
+ORDER BY c1;
+
+SELECT
+  avg(cbigint) as c1,
+  variance(cbigint),
+  var_pop(cbigint),
+  var_samp(cbigint),
+  std(cbigint),
+  stddev(cbigint),
+  stddev_pop(cbigint),
+  stddev_samp(cbigint)
+FROM alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT MIN(cfloat) as c1,
+       MAX(cfloat),
+       COUNT(cfloat),
+       COUNT(*)
+FROM   alltypesparquet
+ORDER BY c1;
+
+SELECT MIN(cfloat) as c1,
+       MAX(cfloat),
+       COUNT(cfloat),
+       COUNT(*)
+FROM   alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT SUM(cfloat) as c1
+FROM   alltypesparquet
+ORDER BY c1;
+
+SELECT SUM(cfloat) as c1
+FROM   alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION
+SELECT
+  avg(cfloat) as c1,
+  variance(cfloat),
+  var_pop(cfloat),
+  var_samp(cfloat),
+  std(cfloat),
+  stddev(cfloat),
+  stddev_pop(cfloat),
+  stddev_samp(cfloat)
+FROM alltypesparquet
+ORDER BY c1;
+
+SELECT
+  avg(cfloat) as c1,
+  variance(cfloat),
+  var_pop(cfloat),
+  var_samp(cfloat),
+  std(cfloat),
+  stddev(cfloat),
+  stddev_pop(cfloat),
+  stddev_samp(cfloat)
+FROM alltypesparquet
+ORDER BY c1;
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT AVG(cbigint),
+       (-(AVG(cbigint))),
+       (-6432 + AVG(cbigint)),
+       STDDEV_POP(cbigint),
+       (-((-6432 + AVG(cbigint)))),
+       ((-((-6432 + AVG(cbigint)))) + (-6432 + AVG(cbigint))),
+       VAR_SAMP(cbigint),
+       (-((-6432 + AVG(cbigint)))),
+       (-6432 + (-((-6432 + AVG(cbigint))))),
+       (-((-6432 + AVG(cbigint)))),
+       ((-((-6432 + AVG(cbigint)))) / (-((-6432 + AVG(cbigint))))),
+       COUNT(*),
+       SUM(cfloat),
+       (VAR_SAMP(cbigint) % STDDEV_POP(cbigint)),
+       (-(VAR_SAMP(cbigint))),
+       ((-((-6432 + AVG(cbigint)))) * (-(AVG(cbigint)))),
+       MIN(ctinyint),
+       (-(MIN(ctinyint)))
+FROM   alltypesparquet
+WHERE  (((cstring2 LIKE '%b%')
+         OR ((79.553 != cint)
+             OR (cbigint < cdouble)))
+        OR ((ctinyint >= csmallint)
+            AND ((cboolean2 = 1)
+                 AND (3569 = ctinyint))));
+
+SELECT AVG(cbigint),
+       (-(AVG(cbigint))),
+       (-6432 + AVG(cbigint)),
+       STDDEV_POP(cbigint),
+       (-((-6432 + AVG(cbigint)))),
+       ((-((-6432 + AVG(cbigint)))) + (-6432 + AVG(cbigint))),
+       VAR_SAMP(cbigint),
+       (-((-6432 + AVG(cbigint)))),
+       (-6432 + (-((-6432 + AVG(cbigint))))),
+       (-((-6432 + AVG(cbigint)))),
+       ((-((-6432 + AVG(cbigint)))) / (-((-6432 + AVG(cbigint))))),
+       COUNT(*),
+       SUM(cfloat),
+       (VAR_SAMP(cbigint) % STDDEV_POP(cbigint)),
+       (-(VAR_SAMP(cbigint))),
+       ((-((-6432 + AVG(cbigint)))) * (-(AVG(cbigint)))),
+       MIN(ctinyint),
+       (-(MIN(ctinyint)))
+FROM   alltypesparquet
+WHERE  (((cstring2 LIKE '%b%')
+         OR ((79.553 != cint)
+             OR (cbigint < cdouble)))
+        OR ((ctinyint >= csmallint)
+            AND ((cboolean2 = 1)
+                 AND (3569 = ctinyint))));
+
+EXPLAIN extended
+select count(*) from alltypesparquet
+                     where (((cstring1 LIKE 'a%') or ((cstring1 like 'b%') or (cstring1 like 'c%'))) or
+                           ((length(cstring1) < 50 ) and ((cstring1 like '%n') and (length(cstring1) > 0))));
+
+select count(*) from alltypesparquet
+                     where (((cstring1 LIKE 'a%') or ((cstring1 like 'b%') or (cstring1 like 'c%'))) or
+                           ((length(cstring1) < 50 ) and ((cstring1 like '%n') and (length(cstring1) > 0))));
+
+set hive.vectorized.execution.enabled=true;
+set hive.compute.query.using.stats=false;
+
+select min(ctinyint), max(ctinyint), sum(ctinyint), avg(ctinyint) from alltypesparquet;
+select min(csmallint), max(csmallint), sum(csmallint), avg(csmallint) from alltypesparquet;
+select min(cint), max(cint), sum(cint), avg(cint) from alltypesparquet;
+select min(cbigint), max(cbigint), sum(cbigint), avg(cbigint) from alltypesparquet;
+select min(cdouble), max(cdouble), sum(cdouble), avg(cdouble) from alltypesparquet;
+select distinct cstring1 from alltypesparquet;
+select distinct cstring1, ctinyint from alltypesparquet;
+select cstring1, max(cbigint) from alltypesparquet
+                          group by cstring1
+                          order by cstring1 desc;
+
+set hive.vectorized.execution.reduce.enabled=true;
+set hive.vectorized.execution.reduce.groupby.enabled=true;
+select cstring1, cint, ctinyint from alltypesparquet
+                           where cstring1 > 'religion';
+select cstring1, cint, ctinyint from alltypesparquet where cstring1 <> 'religion';
+
+select ctinyint, csmallint, cint, cbigint, cdouble, cdouble, cstring1 from alltypesparquet
+                           where ctinyint > 0 and csmallint > 0 and cint > 0 and cbigint > 0 and
+                                 cfloat > 0.0 and cdouble > 0.0 and cstring1 > 'm';
+
+set hive.optimize.point.lookup=false;
+--test to make sure multi and/or expressions are being vectorized
+explain extended select * from alltypesparquet where
+                     (cint=49 and  cfloat=3.5) or
+                     (cint=47  and  cfloat=2.09) or
+                     (cint=45  and  cfloat=3.02);
+
+set hive.optimize.point.lookup=true;
+set hive.optimize.point.lookup.min=1;
+
+explain extended select * from alltypesparquet where
+                                (cint=49 and  cfloat=3.5) or
+                                (cint=47  and  cfloat=2.09) or
+                                (cint=45  and  cfloat=3.02);
+
+explain extended select * from alltypesparquet where
+                     (cint=49 or  cfloat=3.5) and
+                     (cint=47 or  cfloat=2.09) and
+                     (cint=45 or  cfloat=3.02);
+
+explain extended select count(*),cstring1 from alltypesparquet where cstring1='biology'
+                                                    or cstring1='history'
+                                                    or cstring1='topology' group by cstring1 order by cstring1;
+
+
+drop table if exists cast_string_to_int_1;
+drop table if exists cast_string_to_int_2;
+
+create table cast_string_to_int_1 as select CAST(CAST(key as float) as string),value from srcbucket;
+create table cast_string_to_int_2(i int,s string);
+insert overwrite table cast_string_to_int_2 select * from cast_string_to_int_1;
+
+--moving ALL_1 system test here
+select all key from src;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_1.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_1.q b/ql/src/test/queries/clientpositive/parquet_vectorization_1.q
new file mode 100644
index 0000000..95b2c9e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_1.q
@@ -0,0 +1,47 @@
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+set hive.vectorized.execution.reduce.enabled=true;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT VAR_POP(ctinyint),
+       (VAR_POP(ctinyint) / -26.28),
+       SUM(cfloat),
+       (-1.389 + SUM(cfloat)),
+       (SUM(cfloat) * (-1.389 + SUM(cfloat))),
+       MAX(ctinyint),
+       (-((SUM(cfloat) * (-1.389 + SUM(cfloat))))),
+       MAX(cint),
+       (MAX(cint) * 79.553),
+       VAR_SAMP(cdouble),
+       (10.175 % (-((SUM(cfloat) * (-1.389 + SUM(cfloat)))))),
+       COUNT(cint),
+       (-563 % MAX(cint))
+FROM   alltypesparquet
+WHERE  (((cdouble > ctinyint)
+         AND (cboolean2 > 0))
+        OR ((cbigint < ctinyint)
+            OR ((cint > cbigint)
+                OR (cboolean1 < 0))));
+
+SELECT VAR_POP(ctinyint),
+       (VAR_POP(ctinyint) / -26.28),
+       SUM(cfloat),
+       (-1.389 + SUM(cfloat)),
+       (SUM(cfloat) * (-1.389 + SUM(cfloat))),
+       MAX(ctinyint),
+       (-((SUM(cfloat) * (-1.389 + SUM(cfloat))))),
+       MAX(cint),
+       (MAX(cint) * 79.553),
+       VAR_SAMP(cdouble),
+       (10.175 % (-((SUM(cfloat) * (-1.389 + SUM(cfloat)))))),
+       COUNT(cint),
+       (-563 % MAX(cint))
+FROM   alltypesparquet
+WHERE  (((cdouble > ctinyint)
+         AND (cboolean2 > 0))
+        OR ((cbigint < ctinyint)
+            OR ((cint > cbigint)
+                OR (cboolean1 < 0))));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_10.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_10.q b/ql/src/test/queries/clientpositive/parquet_vectorization_10.q
new file mode 100644
index 0000000..14077e3
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_10.q
@@ -0,0 +1,52 @@
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT cdouble,
+       ctimestamp1,
+       ctinyint,
+       cboolean1,
+       cstring1,
+       (-(cdouble)),
+       (cdouble + csmallint),
+       ((cdouble + csmallint) % 33),
+       (-(cdouble)),
+       (ctinyint % cdouble),
+       (ctinyint % csmallint),
+       (-(cdouble)),
+       (cbigint * (ctinyint % csmallint)),
+       (9763215.5639 - (cdouble + csmallint)),
+       (-((-(cdouble))))
+FROM   alltypesparquet
+WHERE  (((cstring2 <= '10')
+         OR ((ctinyint > cdouble)
+             AND (-5638.15 >= ctinyint)))
+        OR ((cdouble > 6981)
+            AND ((csmallint = 9763215.5639)
+                 OR (cstring1 LIKE '%a'))));
+
+SELECT cdouble,
+       ctimestamp1,
+       ctinyint,
+       cboolean1,
+       cstring1,
+       (-(cdouble)),
+       (cdouble + csmallint),
+       ((cdouble + csmallint) % 33),
+       (-(cdouble)),
+       (ctinyint % cdouble),
+       (ctinyint % csmallint),
+       (-(cdouble)),
+       (cbigint * (ctinyint % csmallint)),
+       (9763215.5639 - (cdouble + csmallint)),
+       (-((-(cdouble))))
+FROM   alltypesparquet
+WHERE  (((cstring2 <= '10')
+         OR ((ctinyint > cdouble)
+             AND (-5638.15 >= ctinyint)))
+        OR ((cdouble > 6981)
+            AND ((csmallint = 9763215.5639)
+                 OR (cstring1 LIKE '%a'))));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_11.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_11.q b/ql/src/test/queries/clientpositive/parquet_vectorization_11.q
new file mode 100644
index 0000000..48ddecf
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_11.q
@@ -0,0 +1,34 @@
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT cstring1,
+       cboolean1,
+       cdouble,
+       ctimestamp1,
+       (-3728 * csmallint),
+       (cdouble - 9763215.5639),
+       (-(cdouble)),
+       ((-(cdouble)) + 6981),
+       (cdouble * -5638.15)
+FROM   alltypesparquet
+WHERE  ((cstring2 = cstring1)
+        OR ((ctimestamp1 IS NULL)
+            AND (cstring1 LIKE '%a')));
+
+SELECT cstring1,
+       cboolean1,
+       cdouble,
+       ctimestamp1,
+       (-3728 * csmallint),
+       (cdouble - 9763215.5639),
+       (-(cdouble)),
+       ((-(cdouble)) + 6981),
+       (cdouble * -5638.15)
+FROM   alltypesparquet
+WHERE  ((cstring2 = cstring1)
+        OR ((ctimestamp1 IS NULL)
+            AND (cstring1 LIKE '%a')));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_12.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_12.q b/ql/src/test/queries/clientpositive/parquet_vectorization_12.q
new file mode 100644
index 0000000..e3606e6
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_12.q
@@ -0,0 +1,69 @@
+set hive.mapred.mode=nonstrict;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT   cbigint,
+         cboolean1,
+         cstring1,
+         ctimestamp1,
+         cdouble,
+         (-6432 * cdouble),
+         (-(cbigint)),
+         COUNT(cbigint),
+         (cbigint * COUNT(cbigint)),
+         STDDEV_SAMP(cbigint),
+         ((-6432 * cdouble) / -6432),
+         (-(((-6432 * cdouble) / -6432))),
+         AVG(cdouble),
+         (-((-6432 * cdouble))),
+         (-5638.15 + cbigint),
+         SUM(cbigint),
+         (AVG(cdouble) / (-6432 * cdouble)),
+         AVG(cdouble),
+         (-((-(((-6432 * cdouble) / -6432))))),
+         (((-6432 * cdouble) / -6432) + (-((-6432 * cdouble)))),
+         STDDEV_POP(cdouble)
+FROM     alltypesparquet
+WHERE    (((ctimestamp1 IS NULL)
+           AND ((cboolean1 >= cboolean2)
+                OR (ctinyint != csmallint)))
+          AND ((cstring1 LIKE '%a')
+              OR ((cboolean2 <= 1)
+                  AND (cbigint >= csmallint))))
+GROUP BY cbigint, cboolean1, cstring1, ctimestamp1, cdouble
+ORDER BY ctimestamp1, cdouble, cbigint, cstring1;
+
+SELECT   cbigint,
+         cboolean1,
+         cstring1,
+         ctimestamp1,
+         cdouble,
+         (-6432 * cdouble),
+         (-(cbigint)),
+         COUNT(cbigint),
+         (cbigint * COUNT(cbigint)),
+         STDDEV_SAMP(cbigint),
+         ((-6432 * cdouble) / -6432),
+         (-(((-6432 * cdouble) / -6432))),
+         AVG(cdouble),
+         (-((-6432 * cdouble))),
+         (-5638.15 + cbigint),
+         SUM(cbigint),
+         (AVG(cdouble) / (-6432 * cdouble)),
+         AVG(cdouble),
+         (-((-(((-6432 * cdouble) / -6432))))),
+         (((-6432 * cdouble) / -6432) + (-((-6432 * cdouble)))),
+         STDDEV_POP(cdouble)
+FROM     alltypesparquet
+WHERE    (((ctimestamp1 IS NULL)
+           AND ((cboolean1 >= cboolean2)
+                OR (ctinyint != csmallint)))
+          AND ((cstring1 LIKE '%a')
+              OR ((cboolean2 <= 1)
+                  AND (cbigint >= csmallint))))
+GROUP BY cbigint, cboolean1, cstring1, ctimestamp1, cdouble
+ORDER BY ctimestamp1, cdouble, cbigint, cstring1;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_13.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_13.q b/ql/src/test/queries/clientpositive/parquet_vectorization_13.q
new file mode 100644
index 0000000..0763330
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_13.q
@@ -0,0 +1,137 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT   cboolean1,
+         ctinyint,
+         ctimestamp1,
+         cfloat,
+         cstring1,
+         (-(ctinyint)) as c1,
+         MAX(ctinyint) as c2,
+         ((-(ctinyint)) + MAX(ctinyint)) as c3,
+         SUM(cfloat) as c4,
+         (SUM(cfloat) * ((-(ctinyint)) + MAX(ctinyint))) as c5,
+         (-(SUM(cfloat))) as c6,
+         (79.553 * cfloat) as c7,
+         STDDEV_POP(cfloat) as c8,
+         (-(SUM(cfloat))) as c9,
+         STDDEV_POP(ctinyint) as c10,
+         (((-(ctinyint)) + MAX(ctinyint)) - 10.175) as c11,
+         (-((-(SUM(cfloat))))) as c12,
+         (-26.28 / (-((-(SUM(cfloat)))))) as c13,
+         MAX(cfloat) as c14,
+         ((SUM(cfloat) * ((-(ctinyint)) + MAX(ctinyint))) / ctinyint) as c15,
+         MIN(ctinyint) as c16
+FROM     alltypesparquet
+WHERE    (((cfloat < 3569)
+           AND ((10.175 >= cdouble)
+                AND (cboolean1 != 1)))
+          OR ((ctimestamp1 > 11)
+              AND ((ctimestamp2 != 12)
+                   AND (ctinyint < 9763215.5639))))
+GROUP BY cboolean1, ctinyint, ctimestamp1, cfloat, cstring1
+ORDER BY cboolean1, ctinyint, ctimestamp1, cfloat, cstring1, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16
+LIMIT 40;
+
+SELECT   cboolean1,
+         ctinyint,
+         ctimestamp1,
+         cfloat,
+         cstring1,
+         (-(ctinyint)) as c1,
+         MAX(ctinyint) as c2,
+         ((-(ctinyint)) + MAX(ctinyint)) as c3,
+         SUM(cfloat) as c4,
+         (SUM(cfloat) * ((-(ctinyint)) + MAX(ctinyint))) as c5,
+         (-(SUM(cfloat))) as c6,
+         (79.553 * cfloat) as c7,
+         STDDEV_POP(cfloat) as c8,
+         (-(SUM(cfloat))) as c9,
+         STDDEV_POP(ctinyint) as c10,
+         (((-(ctinyint)) + MAX(ctinyint)) - 10.175) as c11,
+         (-((-(SUM(cfloat))))) as c12,
+         (-26.28 / (-((-(SUM(cfloat)))))) as c13,
+         MAX(cfloat) as c14,
+         ((SUM(cfloat) * ((-(ctinyint)) + MAX(ctinyint))) / ctinyint) as c15,
+         MIN(ctinyint) as c16
+FROM     alltypesparquet
+WHERE    (((cfloat < 3569)
+           AND ((10.175 >= cdouble)
+                AND (cboolean1 != 1)))
+          OR ((ctimestamp1 > 11)
+              AND ((ctimestamp2 != 12)
+                   AND (ctinyint < 9763215.5639))))
+GROUP BY cboolean1, ctinyint, ctimestamp1, cfloat, cstring1
+ORDER BY cboolean1, ctinyint, ctimestamp1, cfloat, cstring1, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16
+LIMIT 40;
+
+-- double compare timestamp
+EXPLAIN VECTORIZATION EXPRESSION
+SELECT   cboolean1,
+         ctinyint,
+         ctimestamp1,
+         cfloat,
+         cstring1,
+         (-(ctinyint)) as c1,
+         MAX(ctinyint) as c2,
+         ((-(ctinyint)) + MAX(ctinyint)) as c3,
+         SUM(cfloat) as c4,
+         (SUM(cfloat) * ((-(ctinyint)) + MAX(ctinyint))) as c5,
+         (-(SUM(cfloat))) as c6,
+         (79.553 * cfloat) as c7,
+         STDDEV_POP(cfloat) as c8,
+         (-(SUM(cfloat))) as c9,
+         STDDEV_POP(ctinyint) as c10,
+         (((-(ctinyint)) + MAX(ctinyint)) - 10.175) as c11,
+         (-((-(SUM(cfloat))))) as c12,
+         (-26.28 / (-((-(SUM(cfloat)))))) as c13,
+         MAX(cfloat) as c14,
+         ((SUM(cfloat) * ((-(ctinyint)) + MAX(ctinyint))) / ctinyint) as c15,
+         MIN(ctinyint) as c16
+FROM     alltypesparquet
+WHERE    (((cfloat < 3569)
+           AND ((10.175 >= cdouble)
+                AND (cboolean1 != 1)))
+          OR ((ctimestamp1 > -1.388)
+              AND ((ctimestamp2 != -1.3359999999999999)
+                   AND (ctinyint < 9763215.5639))))
+GROUP BY cboolean1, ctinyint, ctimestamp1, cfloat, cstring1
+ORDER BY cboolean1, ctinyint, ctimestamp1, cfloat, cstring1, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16
+LIMIT 40;
+
+SELECT   cboolean1,
+         ctinyint,
+         ctimestamp1,
+         cfloat,
+         cstring1,
+         (-(ctinyint)) as c1,
+         MAX(ctinyint) as c2,
+         ((-(ctinyint)) + MAX(ctinyint)) as c3,
+         SUM(cfloat) as c4,
+         (SUM(cfloat) * ((-(ctinyint)) + MAX(ctinyint))) as c5,
+         (-(SUM(cfloat))) as c6,
+         (79.553 * cfloat) as c7,
+         STDDEV_POP(cfloat) as c8,
+         (-(SUM(cfloat))) as c9,
+         STDDEV_POP(ctinyint) as c10,
+         (((-(ctinyint)) + MAX(ctinyint)) - 10.175) as c11,
+         (-((-(SUM(cfloat))))) as c12,
+         (-26.28 / (-((-(SUM(cfloat)))))) as c13,
+         MAX(cfloat) as c14,
+         ((SUM(cfloat) * ((-(ctinyint)) + MAX(ctinyint))) / ctinyint) as c15,
+         MIN(ctinyint) as c16
+FROM     alltypesparquet
+WHERE    (((cfloat < 3569)
+           AND ((10.175 >= cdouble)
+                AND (cboolean1 != 1)))
+          OR ((ctimestamp1 > -1.388)
+              AND ((ctimestamp2 != -1.3359999999999999)
+                   AND (ctinyint < 9763215.5639))))
+GROUP BY cboolean1, ctinyint, ctimestamp1, cfloat, cstring1
+ORDER BY cboolean1, ctinyint, ctimestamp1, cfloat, cstring1, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16
+LIMIT 40;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_14.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_14.q b/ql/src/test/queries/clientpositive/parquet_vectorization_14.q
new file mode 100644
index 0000000..ac8eecc
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_14.q
@@ -0,0 +1,72 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT   ctimestamp1,
+         cfloat,
+         cstring1,
+         cboolean1,
+         cdouble,
+         (-26.28 + cdouble),
+         (-((-26.28 + cdouble))),
+         STDDEV_SAMP((-((-26.28 + cdouble)))),
+         (cfloat * -26.28),
+         MAX(cfloat),
+         (-(cfloat)),
+         (-(MAX(cfloat))),
+         ((-((-26.28 + cdouble))) / 10.175),
+         STDDEV_POP(cfloat),
+         COUNT(cfloat),
+         (-(((-((-26.28 + cdouble))) / 10.175))),
+         (-1.389 % STDDEV_SAMP((-((-26.28 + cdouble))))),
+         (cfloat - cdouble),
+         VAR_POP(cfloat),
+         (VAR_POP(cfloat) % 10.175),
+         VAR_SAMP(cfloat),
+         (-((cfloat - cdouble)))
+FROM     alltypesparquet
+WHERE    (((ctinyint <= cbigint)
+           AND ((cint <= cdouble)
+                OR (ctimestamp2 < ctimestamp1)))
+          AND ((cdouble < ctinyint)
+              AND ((cbigint > -257)
+                  OR (cfloat < cint))))
+GROUP BY ctimestamp1, cfloat, cstring1, cboolean1, cdouble
+ORDER BY cstring1, cfloat, cdouble, ctimestamp1;
+
+SELECT   ctimestamp1,
+         cfloat,
+         cstring1,
+         cboolean1,
+         cdouble,
+         (-26.28 + cdouble),
+         (-((-26.28 + cdouble))),
+         STDDEV_SAMP((-((-26.28 + cdouble)))),
+         (cfloat * -26.28),
+         MAX(cfloat),
+         (-(cfloat)),
+         (-(MAX(cfloat))),
+         ((-((-26.28 + cdouble))) / 10.175),
+         STDDEV_POP(cfloat),
+         COUNT(cfloat),
+         (-(((-((-26.28 + cdouble))) / 10.175))),
+         (-1.389 % STDDEV_SAMP((-((-26.28 + cdouble))))),
+         (cfloat - cdouble),
+         VAR_POP(cfloat),
+         (VAR_POP(cfloat) % 10.175),
+         VAR_SAMP(cfloat),
+         (-((cfloat - cdouble)))
+FROM     alltypesparquet
+WHERE    (((ctinyint <= cbigint)
+           AND ((cint <= cdouble)
+                OR (ctimestamp2 < ctimestamp1)))
+          AND ((cdouble < ctinyint)
+              AND ((cbigint > -257)
+                  OR (cfloat < cint))))
+GROUP BY ctimestamp1, cfloat, cstring1, cboolean1, cdouble
+ORDER BY cstring1, cfloat, cdouble, ctimestamp1;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_15.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_15.q b/ql/src/test/queries/clientpositive/parquet_vectorization_15.q
new file mode 100644
index 0000000..4024b32
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_15.q
@@ -0,0 +1,71 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- Until HIVE-16756: 'Vectorization: LongColModuloLongColumn throws "java.lang.ArithmeticException: / by zero"' is resolved, do not vectorize Reducers
+set hive.vectorized.execution.reduce.enabled=false;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT   cfloat,
+         cboolean1,
+         cdouble,
+         cstring1,
+         ctinyint,
+         cint,
+         ctimestamp1,
+         STDDEV_SAMP(cfloat),
+         (-26.28 - cint),
+         MIN(cdouble),
+         (cdouble * 79.553),
+         (33 % cfloat),
+         STDDEV_SAMP(ctinyint),
+         VAR_POP(ctinyint),
+         (-23 % cdouble),
+         (-(ctinyint)),
+         VAR_SAMP(cint),
+         (cint - cfloat),
+         (-23 % ctinyint),
+         (-((-26.28 - cint))),
+         STDDEV_POP(cint)
+FROM     alltypesparquet
+WHERE    (((cstring2 LIKE '%ss%')
+           OR (cstring1 LIKE '10%'))
+          OR ((cint >= -75)
+              AND ((ctinyint = csmallint)
+                   AND (cdouble >= -3728))))
+GROUP BY cfloat, cboolean1, cdouble, cstring1, ctinyint, cint, ctimestamp1
+ORDER BY cfloat, cboolean1, cdouble, cstring1, ctinyint, cint, ctimestamp1;
+
+SELECT   cfloat,
+         cboolean1,
+         cdouble,
+         cstring1,
+         ctinyint,
+         cint,
+         ctimestamp1,
+         STDDEV_SAMP(cfloat),
+         (-26.28 - cint),
+         MIN(cdouble),
+         (cdouble * 79.553),
+         (33 % cfloat),
+         STDDEV_SAMP(ctinyint),
+         VAR_POP(ctinyint),
+         (-23 % cdouble),
+         (-(ctinyint)),
+         VAR_SAMP(cint),
+         (cint - cfloat),
+         (-23 % ctinyint),
+         (-((-26.28 - cint))),
+         STDDEV_POP(cint)
+FROM     alltypesparquet
+WHERE    (((cstring2 LIKE '%ss%')
+           OR (cstring1 LIKE '10%'))
+          OR ((cint >= -75)
+              AND ((ctinyint = csmallint)
+                   AND (cdouble >= -3728))))
+GROUP BY cfloat, cboolean1, cdouble, cstring1, ctinyint, cint, ctimestamp1
+ORDER BY cfloat, cboolean1, cdouble, cstring1, ctinyint, cint, ctimestamp1;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_16.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_16.q b/ql/src/test/queries/clientpositive/parquet_vectorization_16.q
new file mode 100644
index 0000000..c773e9e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_16.q
@@ -0,0 +1,46 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT   cstring1,
+         cdouble,
+         ctimestamp1,
+         (cdouble - 9763215.5639),
+         (-((cdouble - 9763215.5639))),
+         COUNT(cdouble),
+         STDDEV_SAMP(cdouble),
+         (-(STDDEV_SAMP(cdouble))),
+         (STDDEV_SAMP(cdouble) * COUNT(cdouble)),
+         MIN(cdouble),
+         (9763215.5639 / cdouble),
+         (COUNT(cdouble) / -1.389),
+         STDDEV_SAMP(cdouble)
+FROM     alltypesparquet
+WHERE    ((cstring2 LIKE '%b%')
+          AND ((cdouble >= -1.389)
+              OR (cstring1 < 'a')))
+GROUP BY cstring1, cdouble, ctimestamp1;
+
+SELECT   cstring1,
+         cdouble,
+         ctimestamp1,
+         (cdouble - 9763215.5639),
+         (-((cdouble - 9763215.5639))),
+         COUNT(cdouble),
+         STDDEV_SAMP(cdouble),
+         (-(STDDEV_SAMP(cdouble))),
+         (STDDEV_SAMP(cdouble) * COUNT(cdouble)),
+         MIN(cdouble),
+         (9763215.5639 / cdouble),
+         (COUNT(cdouble) / -1.389),
+         STDDEV_SAMP(cdouble)
+FROM     alltypesparquet
+WHERE    ((cstring2 LIKE '%b%')
+          AND ((cdouble >= -1.389)
+              OR (cstring1 < 'a')))
+GROUP BY cstring1, cdouble, ctimestamp1;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_17.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_17.q b/ql/src/test/queries/clientpositive/parquet_vectorization_17.q
new file mode 100644
index 0000000..7a216b7
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_17.q
@@ -0,0 +1,53 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT   cfloat,
+         cstring1,
+         cint,
+         ctimestamp1,
+         cdouble,
+         cbigint,
+         (cfloat / ctinyint),
+         (cint % cbigint),
+         (-(cdouble)),
+         (cdouble + (cfloat / ctinyint)),
+         (cdouble / cint),
+         (-((-(cdouble)))),
+         (9763215.5639 % cbigint),
+         (2563.58 + (-((-(cdouble)))))
+FROM     alltypesparquet
+WHERE    (((cbigint > -23)
+           AND ((cdouble != 988888)
+                OR (cint > -863.257)))
+          AND ((ctinyint >= 33)
+              OR ((csmallint >= cbigint)
+                  OR (cfloat = cdouble))))
+ORDER BY cbigint, cfloat;
+
+SELECT   cfloat,
+         cstring1,
+         cint,
+         ctimestamp1,
+         cdouble,
+         cbigint,
+         (cfloat / ctinyint),
+         (cint % cbigint),
+         (-(cdouble)),
+         (cdouble + (cfloat / ctinyint)),
+         (cdouble / cint),
+         (-((-(cdouble)))),
+         (9763215.5639 % cbigint),
+         (2563.58 + (-((-(cdouble)))))
+FROM     alltypesparquet
+WHERE    (((cbigint > -23)
+           AND ((cdouble != 988888)
+                OR (cint > -863.257)))
+          AND ((ctinyint >= 33)
+              OR ((csmallint >= cbigint)
+                  OR (cfloat = cdouble))))
+ORDER BY cbigint, cfloat;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_2.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_2.q b/ql/src/test/queries/clientpositive/parquet_vectorization_2.q
new file mode 100644
index 0000000..193523e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_2.q
@@ -0,0 +1,50 @@
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT AVG(csmallint),
+       (AVG(csmallint) % -563),
+       (AVG(csmallint) + 762),
+       SUM(cfloat),
+       VAR_POP(cbigint),
+       (-(VAR_POP(cbigint))),
+       (SUM(cfloat) - AVG(csmallint)),
+       COUNT(*),
+       (-((SUM(cfloat) - AVG(csmallint)))),
+       (VAR_POP(cbigint) - 762),
+       MIN(ctinyint),
+       ((-(VAR_POP(cbigint))) + MIN(ctinyint)),
+       AVG(cdouble),
+       (((-(VAR_POP(cbigint))) + MIN(ctinyint)) - SUM(cfloat))
+FROM   alltypesparquet
+WHERE  (((ctimestamp1 < ctimestamp2)
+         AND ((cstring2 LIKE 'b%')
+              AND (cfloat <= -5638.15)))
+        OR ((cdouble < ctinyint)
+            AND ((-10669 != ctimestamp2)
+                 OR (359 > cint))));
+
+SELECT AVG(csmallint),
+       (AVG(csmallint) % -563),
+       (AVG(csmallint) + 762),
+       SUM(cfloat),
+       VAR_POP(cbigint),
+       (-(VAR_POP(cbigint))),
+       (SUM(cfloat) - AVG(csmallint)),
+       COUNT(*),
+       (-((SUM(cfloat) - AVG(csmallint)))),
+       (VAR_POP(cbigint) - 762),
+       MIN(ctinyint),
+       ((-(VAR_POP(cbigint))) + MIN(ctinyint)),
+       AVG(cdouble),
+       (((-(VAR_POP(cbigint))) + MIN(ctinyint)) - SUM(cfloat))
+FROM   alltypesparquet
+WHERE  (((ctimestamp1 < ctimestamp2)
+         AND ((cstring2 LIKE 'b%')
+              AND (cfloat <= -5638.15)))
+        OR ((cdouble < ctinyint)
+            AND ((-10669 != ctimestamp2)
+                 OR (359 > cint))));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_3.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_3.q b/ql/src/test/queries/clientpositive/parquet_vectorization_3.q
new file mode 100644
index 0000000..a58e60a
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_3.q
@@ -0,0 +1,55 @@
+set hive.mapred.mode=nonstrict;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT STDDEV_SAMP(csmallint),
+       (STDDEV_SAMP(csmallint) - 10.175),
+       STDDEV_POP(ctinyint),
+       (STDDEV_SAMP(csmallint) * (STDDEV_SAMP(csmallint) - 10.175)),
+       (-(STDDEV_POP(ctinyint))),
+       (STDDEV_SAMP(csmallint) % 79.553),
+       (-((STDDEV_SAMP(csmallint) * (STDDEV_SAMP(csmallint) - 10.175)))),
+       STDDEV_SAMP(cfloat),
+       (-(STDDEV_SAMP(csmallint))),
+       SUM(cfloat),
+       ((-((STDDEV_SAMP(csmallint) * (STDDEV_SAMP(csmallint) - 10.175)))) / (STDDEV_SAMP(csmallint) - 10.175)),
+       (-((STDDEV_SAMP(csmallint) - 10.175))),
+       AVG(cint),
+       (-3728 - STDDEV_SAMP(csmallint)),
+       STDDEV_POP(cint),
+       (AVG(cint) / STDDEV_SAMP(cfloat))
+FROM   alltypesparquet
+WHERE  (((cint <= cfloat)
+         AND ((79.553 != cbigint)
+              AND (ctimestamp2 = -29071)))
+        OR ((cbigint > cdouble)
+            AND ((79.553 <= csmallint)
+                 AND (ctimestamp1 > ctimestamp2))));
+
+SELECT STDDEV_SAMP(csmallint),
+       (STDDEV_SAMP(csmallint) - 10.175),
+       STDDEV_POP(ctinyint),
+       (STDDEV_SAMP(csmallint) * (STDDEV_SAMP(csmallint) - 10.175)),
+       (-(STDDEV_POP(ctinyint))),
+       (STDDEV_SAMP(csmallint) % 79.553),
+       (-((STDDEV_SAMP(csmallint) * (STDDEV_SAMP(csmallint) - 10.175)))),
+       STDDEV_SAMP(cfloat),
+       (-(STDDEV_SAMP(csmallint))),
+       SUM(cfloat),
+       ((-((STDDEV_SAMP(csmallint) * (STDDEV_SAMP(csmallint) - 10.175)))) / (STDDEV_SAMP(csmallint) - 10.175)),
+       (-((STDDEV_SAMP(csmallint) - 10.175))),
+       AVG(cint),
+       (-3728 - STDDEV_SAMP(csmallint)),
+       STDDEV_POP(cint),
+       (AVG(cint) / STDDEV_SAMP(cfloat))
+FROM   alltypesparquet
+WHERE  (((cint <= cfloat)
+         AND ((79.553 != cbigint)
+              AND (ctimestamp2 = -29071)))
+        OR ((cbigint > cdouble)
+            AND ((79.553 <= csmallint)
+                 AND (ctimestamp1 > ctimestamp2))));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_4.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_4.q b/ql/src/test/queries/clientpositive/parquet_vectorization_4.q
new file mode 100644
index 0000000..78e5ada
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_4.q
@@ -0,0 +1,50 @@
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT SUM(cint),
+       (SUM(cint) * -563),
+       (-3728 + SUM(cint)),
+       STDDEV_POP(cdouble),
+       (-(STDDEV_POP(cdouble))),
+       AVG(cdouble),
+       ((SUM(cint) * -563) % SUM(cint)),
+       (((SUM(cint) * -563) % SUM(cint)) / AVG(cdouble)),
+       VAR_POP(cdouble),
+       (-((((SUM(cint) * -563) % SUM(cint)) / AVG(cdouble)))),
+       ((-3728 + SUM(cint)) - (SUM(cint) * -563)),
+       MIN(ctinyint),
+       MIN(ctinyint),
+       (MIN(ctinyint) * (-((((SUM(cint) * -563) % SUM(cint)) / AVG(cdouble)))))
+FROM   alltypesparquet
+WHERE  (((csmallint >= cint)
+         OR ((-89010 >= ctinyint)
+             AND (cdouble > 79.553)))
+        OR ((-563 != cbigint)
+            AND ((ctinyint != cbigint)
+                 OR (-3728 >= cdouble))));
+
+SELECT SUM(cint),
+       (SUM(cint) * -563),
+       (-3728 + SUM(cint)),
+       STDDEV_POP(cdouble),
+       (-(STDDEV_POP(cdouble))),
+       AVG(cdouble),
+       ((SUM(cint) * -563) % SUM(cint)),
+       (((SUM(cint) * -563) % SUM(cint)) / AVG(cdouble)),
+       VAR_POP(cdouble),
+       (-((((SUM(cint) * -563) % SUM(cint)) / AVG(cdouble)))),
+       ((-3728 + SUM(cint)) - (SUM(cint) * -563)),
+       MIN(ctinyint),
+       MIN(ctinyint),
+       (MIN(ctinyint) * (-((((SUM(cint) * -563) % SUM(cint)) / AVG(cdouble)))))
+FROM   alltypesparquet
+WHERE  (((csmallint >= cint)
+         OR ((-89010 >= ctinyint)
+             AND (cdouble > 79.553)))
+        OR ((-563 != cbigint)
+            AND ((ctinyint != cbigint)
+                 OR (-3728 >= cdouble))));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_5.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_5.q b/ql/src/test/queries/clientpositive/parquet_vectorization_5.q
new file mode 100644
index 0000000..d5758e7
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_5.q
@@ -0,0 +1,44 @@
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT MAX(csmallint),
+       (MAX(csmallint) * -75),
+       COUNT(*),
+       ((MAX(csmallint) * -75) / COUNT(*)),
+       (6981 * MAX(csmallint)),
+       MIN(csmallint),
+       (-(MIN(csmallint))),
+       (197 % ((MAX(csmallint) * -75) / COUNT(*))),
+       SUM(cint),
+       MAX(ctinyint),
+       (-(MAX(ctinyint))),
+       ((-(MAX(ctinyint))) + MAX(ctinyint))
+FROM   alltypesparquet
+WHERE  (((cboolean2 IS NOT NULL)
+         AND (cstring1 LIKE '%b%'))
+        OR ((ctinyint = cdouble)
+            AND ((ctimestamp2 IS NOT NULL)
+                 AND (cstring2 LIKE 'a'))));
+
+SELECT MAX(csmallint),
+       (MAX(csmallint) * -75),
+       COUNT(*),
+       ((MAX(csmallint) * -75) / COUNT(*)),
+       (6981 * MAX(csmallint)),
+       MIN(csmallint),
+       (-(MIN(csmallint))),
+       (197 % ((MAX(csmallint) * -75) / COUNT(*))),
+       SUM(cint),
+       MAX(ctinyint),
+       (-(MAX(ctinyint))),
+       ((-(MAX(ctinyint))) + MAX(ctinyint))
+FROM   alltypesparquet
+WHERE  (((cboolean2 IS NOT NULL)
+         AND (cstring1 LIKE '%b%'))
+        OR ((ctinyint = cdouble)
+            AND ((ctimestamp2 IS NOT NULL)
+                 AND (cstring2 LIKE 'a'))));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_6.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_6.q b/ql/src/test/queries/clientpositive/parquet_vectorization_6.q
new file mode 100644
index 0000000..50f987e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_6.q
@@ -0,0 +1,46 @@
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT cboolean1,
+       cfloat,
+       cstring1,
+       (988888 * csmallint),
+       (-(csmallint)),
+       (-(cfloat)),
+       (-26.28 / cfloat),
+       (cfloat * 359),
+       (cint % ctinyint),
+       (-(cdouble)),
+       (ctinyint - -75),
+       (762 * (cint % ctinyint))
+FROM   alltypesparquet
+WHERE  ((ctinyint != 0)
+        AND ((((cboolean1 <= 0)
+          AND (cboolean2 >= cboolean1))
+          OR ((cbigint IS NOT NULL)
+              AND ((cstring2 LIKE '%a')
+                   OR (cfloat <= -257))))));
+
+SELECT cboolean1,
+       cfloat,
+       cstring1,
+       (988888 * csmallint),
+       (-(csmallint)),
+       (-(cfloat)),
+       (-26.28 / cfloat),
+       (cfloat * 359),
+       (cint % ctinyint),
+       (-(cdouble)),
+       (ctinyint - -75),
+       (762 * (cint % ctinyint))
+FROM   alltypesparquet
+WHERE  ((ctinyint != 0)
+        AND ((((cboolean1 <= 0)
+          AND (cboolean2 >= cboolean1))
+          OR ((cbigint IS NOT NULL)
+              AND ((cstring2 LIKE '%a')
+                   OR (cfloat <= -257))))));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_7.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_7.q b/ql/src/test/queries/clientpositive/parquet_vectorization_7.q
new file mode 100644
index 0000000..1888535
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_7.q
@@ -0,0 +1,115 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT cboolean1,
+       cbigint,
+       csmallint,
+       ctinyint,
+       ctimestamp1,
+       cstring1,
+       (cbigint + cbigint) as c1,
+       (csmallint % -257) as c2,
+       (-(csmallint)) as c3,
+       (-(ctinyint)) as c4,
+       ((-(ctinyint)) + 17) as c5,
+       (cbigint * (-(csmallint))) as c6,
+       (cint % csmallint) as c7,
+       (-(ctinyint)) as c8,
+       ((-(ctinyint)) % ctinyint) as c9
+FROM   alltypesparquet
+WHERE  ((ctinyint != 0)
+        AND (((ctimestamp1 <= 0)
+          OR ((ctinyint = cint)
+               OR (cstring2 LIKE 'ss')))
+          AND ((988888 < cdouble)
+              OR ((ctimestamp2 > -15)
+                  AND (3569 >= cdouble)))))
+ORDER BY cboolean1, cbigint, csmallint, ctinyint, ctimestamp1, cstring1, c1, c2, c3, c4, c5, c6, c7, c8, c9
+LIMIT 25;
+
+SELECT cboolean1,
+       cbigint,
+       csmallint,
+       ctinyint,
+       ctimestamp1,
+       cstring1,
+       (cbigint + cbigint) as c1,
+       (csmallint % -257) as c2,
+       (-(csmallint)) as c3,
+       (-(ctinyint)) as c4,
+       ((-(ctinyint)) + 17) as c5,
+       (cbigint * (-(csmallint))) as c6,
+       (cint % csmallint) as c7,
+       (-(ctinyint)) as c8,
+       ((-(ctinyint)) % ctinyint) as c9
+FROM   alltypesparquet
+WHERE  ((ctinyint != 0)
+        AND (((ctimestamp1 <= 0)
+          OR ((ctinyint = cint)
+               OR (cstring2 LIKE 'ss')))
+          AND ((988888 < cdouble)
+              OR ((ctimestamp2 > -15)
+                  AND (3569 >= cdouble)))))
+ORDER BY cboolean1, cbigint, csmallint, ctinyint, ctimestamp1, cstring1, c1, c2, c3, c4, c5, c6, c7, c8, c9
+LIMIT 25;
+
+
+-- double compare timestamp
+EXPLAIN VECTORIZATION EXPRESSION
+SELECT cboolean1,
+       cbigint,
+       csmallint,
+       ctinyint,
+       ctimestamp1,
+       cstring1,
+       (cbigint + cbigint) as c1,
+       (csmallint % -257) as c2,
+       (-(csmallint)) as c3,
+       (-(ctinyint)) as c4,
+       ((-(ctinyint)) + 17) as c5,
+       (cbigint * (-(csmallint))) as c6,
+       (cint % csmallint) as c7,
+       (-(ctinyint)) as c8,
+       ((-(ctinyint)) % ctinyint) as c9
+FROM   alltypesparquet
+WHERE  ((ctinyint != 0)
+        AND (((ctimestamp1 <= 0.0)
+          OR ((ctinyint = cint)
+               OR (cstring2 LIKE 'ss')))
+          AND ((988888 < cdouble)
+              OR ((ctimestamp2 > 7.6850000000000005)
+                  AND (3569 >= cdouble)))))
+ORDER BY cboolean1, cbigint, csmallint, ctinyint, ctimestamp1, cstring1, c1, c2, c3, c4, c5, c6, c7, c8, c9
+LIMIT 25;
+
+SELECT cboolean1,
+       cbigint,
+       csmallint,
+       ctinyint,
+       ctimestamp1,
+       cstring1,
+       (cbigint + cbigint) as c1,
+       (csmallint % -257) as c2,
+       (-(csmallint)) as c3,
+       (-(ctinyint)) as c4,
+       ((-(ctinyint)) + 17) as c5,
+       (cbigint * (-(csmallint))) as c6,
+       (cint % csmallint) as c7,
+       (-(ctinyint)) as c8,
+       ((-(ctinyint)) % ctinyint) as c9
+FROM   alltypesparquet
+WHERE  ((ctinyint != 0)
+        AND (((ctimestamp1 <= 0.0)
+          OR ((ctinyint = cint)
+               OR (cstring2 LIKE 'ss')))
+          AND ((988888 < cdouble)
+              OR ((ctimestamp2 > 7.6850000000000005)
+                  AND (3569 >= cdouble)))))
+ORDER BY cboolean1, cbigint, csmallint, ctinyint, ctimestamp1, cstring1, c1, c2, c3, c4, c5, c6, c7, c8, c9
+LIMIT 25;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_8.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_8.q b/ql/src/test/queries/clientpositive/parquet_vectorization_8.q
new file mode 100644
index 0000000..7d3223e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_8.q
@@ -0,0 +1,107 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT ctimestamp1,
+       cdouble,
+       cboolean1,
+       cstring1,
+       cfloat,
+       (-(cdouble)) as c1,
+       (-5638.15 - cdouble) as c2,
+       (cdouble * -257) as c3,
+       (cint + cfloat) as c4,
+       ((-(cdouble)) + cbigint) as c5,
+       (-(cdouble)) as c6,
+       (-1.389 - cfloat) as c7,
+       (-(cfloat)) as c8,
+       ((-5638.15 - cdouble) + (cint + cfloat)) as c9
+FROM   alltypesparquet
+WHERE  (((cstring2 IS NOT NULL)
+         AND ((ctimestamp1 <= 10)
+             AND (ctimestamp2 != 16)))
+        OR ((cfloat < -6432)
+            OR ((cboolean1 IS NOT NULL)
+                AND (cdouble = 988888))))
+ORDER BY ctimestamp1, cdouble, cboolean1, cstring1, cfloat, c1, c2, c3, c4, c5, c6, c7, c8, c9
+LIMIT 20;
+
+SELECT ctimestamp1,
+       cdouble,
+       cboolean1,
+       cstring1,
+       cfloat,
+       (-(cdouble)) as c1,
+       (-5638.15 - cdouble) as c2,
+       (cdouble * -257) as c3,
+       (cint + cfloat) as c4,
+       ((-(cdouble)) + cbigint) as c5,
+       (-(cdouble)) as c6,
+       (-1.389 - cfloat) as c7,
+       (-(cfloat)) as c8,
+       ((-5638.15 - cdouble) + (cint + cfloat)) as c9
+FROM   alltypesparquet
+WHERE  (((cstring2 IS NOT NULL)
+         AND ((ctimestamp1 <= 10)
+             AND (ctimestamp2 != 16)))
+        OR ((cfloat < -6432)
+            OR ((cboolean1 IS NOT NULL)
+                AND (cdouble = 988888))))
+ORDER BY ctimestamp1, cdouble, cboolean1, cstring1, cfloat, c1, c2, c3, c4, c5, c6, c7, c8, c9
+LIMIT 20;
+
+
+-- double compare timestamp
+EXPLAIN VECTORIZATION EXPRESSION
+SELECT ctimestamp1,
+       cdouble,
+       cboolean1,
+       cstring1,
+       cfloat,
+       (-(cdouble)) as c1,
+       (-5638.15 - cdouble) as c2,
+       (cdouble * -257) as c3,
+       (cint + cfloat) as c4,
+       ((-(cdouble)) + cbigint) as c5,
+       (-(cdouble)) as c6,
+       (-1.389 - cfloat) as c7,
+       (-(cfloat)) as c8,
+       ((-5638.15 - cdouble) + (cint + cfloat)) as c9
+FROM   alltypesparquet
+WHERE  (((cstring2 IS NOT NULL)
+         AND ((ctimestamp1 <= 12.503)
+             AND (ctimestamp2 != 11.998)))
+        OR ((cfloat < -6432)
+            OR ((cboolean1 IS NOT NULL)
+                AND (cdouble = 988888))))
+ORDER BY ctimestamp1, cdouble, cboolean1, cstring1, cfloat, c1, c2, c3, c4, c5, c6, c7, c8, c9
+LIMIT 20;
+
+SELECT ctimestamp1,
+       cdouble,
+       cboolean1,
+       cstring1,
+       cfloat,
+       (-(cdouble)) as c1,
+       (-5638.15 - cdouble) as c2,
+       (cdouble * -257) as c3,
+       (cint + cfloat) as c4,
+       ((-(cdouble)) + cbigint) as c5,
+       (-(cdouble)) as c6,
+       (-1.389 - cfloat) as c7,
+       (-(cfloat)) as c8,
+       ((-5638.15 - cdouble) + (cint + cfloat)) as c9
+FROM   alltypesparquet
+WHERE  (((cstring2 IS NOT NULL)
+         AND ((ctimestamp1 <= 12.503)
+             AND (ctimestamp2 != 11.998)))
+        OR ((cfloat < -6432)
+            OR ((cboolean1 IS NOT NULL)
+                AND (cdouble = 988888))))
+ORDER BY ctimestamp1, cdouble, cboolean1, cstring1, cfloat, c1, c2, c3, c4, c5, c6, c7, c8, c9
+LIMIT 20;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_9.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_9.q b/ql/src/test/queries/clientpositive/parquet_vectorization_9.q
new file mode 100644
index 0000000..c773e9e
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_9.q
@@ -0,0 +1,46 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+EXPLAIN VECTORIZATION DETAIL
+SELECT   cstring1,
+         cdouble,
+         ctimestamp1,
+         (cdouble - 9763215.5639),
+         (-((cdouble - 9763215.5639))),
+         COUNT(cdouble),
+         STDDEV_SAMP(cdouble),
+         (-(STDDEV_SAMP(cdouble))),
+         (STDDEV_SAMP(cdouble) * COUNT(cdouble)),
+         MIN(cdouble),
+         (9763215.5639 / cdouble),
+         (COUNT(cdouble) / -1.389),
+         STDDEV_SAMP(cdouble)
+FROM     alltypesparquet
+WHERE    ((cstring2 LIKE '%b%')
+          AND ((cdouble >= -1.389)
+              OR (cstring1 < 'a')))
+GROUP BY cstring1, cdouble, ctimestamp1;
+
+SELECT   cstring1,
+         cdouble,
+         ctimestamp1,
+         (cdouble - 9763215.5639),
+         (-((cdouble - 9763215.5639))),
+         COUNT(cdouble),
+         STDDEV_SAMP(cdouble),
+         (-(STDDEV_SAMP(cdouble))),
+         (STDDEV_SAMP(cdouble) * COUNT(cdouble)),
+         MIN(cdouble),
+         (9763215.5639 / cdouble),
+         (COUNT(cdouble) / -1.389),
+         STDDEV_SAMP(cdouble)
+FROM     alltypesparquet
+WHERE    ((cstring2 LIKE '%b%')
+          AND ((cdouble >= -1.389)
+              OR (cstring1 < 'a')))
+GROUP BY cstring1, cdouble, ctimestamp1;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_decimal_date.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_decimal_date.q b/ql/src/test/queries/clientpositive/parquet_vectorization_decimal_date.q
new file mode 100644
index 0000000..fac6ad9
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_decimal_date.q
@@ -0,0 +1,7 @@
+set hive.explain.user=false;
+set hive.fetch.task.conversion=none;
+
+CREATE TABLE date_decimal_test_parquet STORED AS PARQUET AS SELECT cint, cdouble, CAST (CAST (cint AS TIMESTAMP) AS DATE) AS cdate, CAST (((cdouble*22.1)/37) AS DECIMAL(20,10)) AS cdecimal FROM alltypesparquet;
+SET hive.vectorized.execution.enabled=true;
+EXPLAIN VECTORIZATION EXPRESSION  SELECT cdate, cdecimal from date_decimal_test_parquet where cint IS NOT NULL AND cdouble IS NOT NULL LIMIT 10;
+SELECT cdate, cdecimal from date_decimal_test_parquet where cint IS NOT NULL AND cdouble IS NOT NULL LIMIT 10;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_div0.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_div0.q b/ql/src/test/queries/clientpositive/parquet_vectorization_div0.q
new file mode 100644
index 0000000..e8a4aa7
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_div0.q
@@ -0,0 +1,27 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled = true;
+set hive.fetch.task.conversion=none;
+
+-- TODO: add more stuff here after HIVE-5918 is fixed, such as cbigint and constants
+explain vectorization expression
+select cdouble / 0.0 from alltypesparquet limit 100;
+select cdouble / 0.0 from alltypesparquet limit 100;
+
+-- There are no zeros in the table, but there is 988888, so use it as zero
+
+-- TODO: add more stuff here after HIVE-5918 is fixed, such as cbigint and constants as numerators
+explain vectorization expression
+select (cbigint - 988888L) as s1, cdouble / (cbigint - 988888L) as s2, 1.2 / (cbigint - 988888L)
+from alltypesparquet where cbigint > 0 and cbigint < 100000000 order by s1, s2 limit 100;
+select (cbigint - 988888L) as s1, cdouble / (cbigint - 988888L) as s2, 1.2 / (cbigint - 988888L)
+from alltypesparquet where cbigint > 0 and cbigint < 100000000 order by s1, s2 limit 100;
+
+-- There are no zeros in the table, but there is -200.0, so use it as zero
+
+explain vectorization expression
+select (cdouble + 200.0) as s1, cbigint / (cdouble + 200.0) as s2, (cdouble + 200.0) / (cdouble + 200.0), cbigint / (cdouble + 200.0), 3 / (cdouble + 200.0), 1.2 / (cdouble + 200.0)
+from alltypesparquet where cdouble >= -500 and cdouble < -199 order by s1, s2 limit 100;
+select (cdouble + 200.0) as s1, cbigint / (cdouble + 200.0) as s2, (cdouble + 200.0) / (cdouble + 200.0), cbigint / (cdouble + 200.0), 3 / (cdouble + 200.0), 1.2 / (cdouble + 200.0)
+from alltypesparquet where cdouble >= -500 and cdouble < -199 order by s1, s2 limit 100;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_limit.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_limit.q b/ql/src/test/queries/clientpositive/parquet_vectorization_limit.q
new file mode 100644
index 0000000..76d1bd5
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_limit.q
@@ -0,0 +1,43 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+-- SORT_QUERY_RESULTS
+
+explain vectorization SELECT cbigint, cdouble FROM alltypesparquet WHERE cbigint < cdouble and cint > 0 limit 7;
+SELECT cbigint, cdouble FROM alltypesparquet WHERE cbigint < cdouble and cint > 0 limit 7;
+
+set hive.optimize.reducededuplication.min.reducer=1;
+set hive.limit.pushdown.memory.usage=0.3f;
+
+-- HIVE-3562 Some limit can be pushed down to map stage - c/p parts from limit_pushdown
+
+explain vectorization detail
+select ctinyint,cdouble,csmallint from alltypesparquet where ctinyint is not null order by ctinyint,cdouble limit 20;
+select ctinyint,cdouble,csmallint from alltypesparquet where ctinyint is not null order by ctinyint,cdouble limit 20;
+
+-- deduped RS
+explain vectorization detail
+select ctinyint,avg(cdouble + 1) from alltypesparquet group by ctinyint order by ctinyint limit 20;
+select ctinyint,avg(cdouble + 1) from alltypesparquet group by ctinyint order by ctinyint limit 20;
+
+-- distincts
+explain vectorization detail
+select distinct(ctinyint) from alltypesparquet limit 20;
+select distinct(ctinyint) from alltypesparquet limit 20;
+
+explain vectorization detail
+select ctinyint, count(distinct(cdouble)) from alltypesparquet group by ctinyint order by ctinyint limit 20;
+select ctinyint, count(distinct(cdouble)) from alltypesparquet group by ctinyint order by ctinyint limit 20;
+
+-- limit zero
+explain vectorization detail
+select ctinyint,cdouble from alltypesparquet order by ctinyint limit 0;
+select ctinyint,cdouble from alltypesparquet order by ctinyint limit 0;
+
+-- 2MR (applied to last RS)
+explain vectorization detail
+select cdouble, sum(ctinyint) as sum from alltypesparquet where ctinyint is not null group by cdouble order by sum, cdouble limit 20;
+select cdouble, sum(ctinyint) as sum from alltypesparquet where ctinyint is not null group by cdouble order by sum, cdouble limit 20;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_nested_udf.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_nested_udf.q b/ql/src/test/queries/clientpositive/parquet_vectorization_nested_udf.q
new file mode 100644
index 0000000..2f65b40
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_nested_udf.q
@@ -0,0 +1,5 @@
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+SELECT SUM(abs(ctinyint)) from alltypesparquet;
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_not.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_not.q b/ql/src/test/queries/clientpositive/parquet_vectorization_not.q
new file mode 100644
index 0000000..343b857
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_not.q
@@ -0,0 +1,30 @@
+set hive.mapred.mode=nonstrict;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+SELECT AVG(cbigint),
+       (-(AVG(cbigint))),
+       (-6432 + AVG(cbigint)),
+       STDDEV_POP(cbigint),
+       (-((-6432 + AVG(cbigint)))),
+       ((-((-6432 + AVG(cbigint)))) + (-6432 + AVG(cbigint))),
+       VAR_SAMP(cbigint),
+       (-((-6432 + AVG(cbigint)))),
+       (-6432 + (-((-6432 + AVG(cbigint))))),
+       (-((-6432 + AVG(cbigint)))),
+       ((-((-6432 + AVG(cbigint)))) / (-((-6432 + AVG(cbigint))))),
+       COUNT(*),
+       SUM(cfloat),
+       (VAR_SAMP(cbigint) % STDDEV_POP(cbigint)),
+       (-(VAR_SAMP(cbigint))),
+       ((-((-6432 + AVG(cbigint)))) * (-(AVG(cbigint)))),
+       MIN(ctinyint),
+       (-(MIN(ctinyint)))
+FROM   alltypesparquet
+WHERE  (((cstring2 LIKE '%b%')
+         OR ((79.553 != cint)
+             OR (NOT(cbigint >= cdouble))))
+        OR ((ctinyint >= csmallint)
+            AND (NOT ((cboolean2 != 1)
+                 OR (3569 != ctinyint)))));
+

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_offset_limit.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_offset_limit.q b/ql/src/test/queries/clientpositive/parquet_vectorization_offset_limit.q
new file mode 100644
index 0000000..99e6139
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_offset_limit.q
@@ -0,0 +1,11 @@
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.mapred.mode=nonstrict;
+set hive.fetch.task.conversion=none;
+
+explain vectorization SELECT cbigint, cdouble FROM alltypesparquet WHERE cbigint < cdouble and cint > 0 limit 3,2;
+SELECT cbigint, cdouble FROM alltypesparquet WHERE cbigint < cdouble and cint > 0 limit 3,2;
+
+explain vectorization expression
+select ctinyint,cdouble,csmallint from alltypesparquet where ctinyint is not null order by ctinyint,cdouble limit 10,3;
+select ctinyint,cdouble,csmallint from alltypesparquet where ctinyint is not null order by ctinyint,cdouble limit 10,3;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_part.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_part.q b/ql/src/test/queries/clientpositive/parquet_vectorization_part.q
new file mode 100644
index 0000000..49eecf1
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_part.q
@@ -0,0 +1,10 @@
+set hive.mapred.mode=nonstrict;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+CREATE TABLE alltypesparquet_part(ctinyint tinyint, csmallint smallint, cint int, cbigint bigint, cfloat float, cdouble double, cstring1 string, cstring2 string, ctimestamp1 timestamp, ctimestamp2 timestamp, cboolean1 boolean, cboolean2 boolean) partitioned by (ds string) STORED AS PARQUET;
+insert overwrite table alltypesparquet_part partition (ds='2011') select * from alltypesparquet limit 100;
+insert overwrite table alltypesparquet_part partition (ds='2012') select * from alltypesparquet limit 100;
+
+select count(cdouble), cint from alltypesparquet_part where ds='2011' group by cint limit 10;
+select count(*) from alltypesparquet_part A join alltypesparquet_part B on A.ds=B.ds;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_part_project.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_part_project.q b/ql/src/test/queries/clientpositive/parquet_vectorization_part_project.q
new file mode 100644
index 0000000..0eb8965
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_part_project.q
@@ -0,0 +1,11 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+CREATE TABLE alltypesparquet_part(ctinyint tinyint, csmallint smallint, cint int, cbigint bigint, cfloat float, cdouble double, cstring1 string, cstring2 string, ctimestamp1 timestamp, ctimestamp2 timestamp, cboolean1 boolean, cboolean2 boolean) partitioned by (ds string) STORED AS PARQUET;
+insert overwrite table alltypesparquet_part partition (ds='2011') select * from alltypesparquet order by ctinyint, cint, cbigint limit 100;
+insert overwrite table alltypesparquet_part partition (ds='2012') select * from alltypesparquet order by ctinyint, cint, cbigint limit 100;
+
+explain vectorization select (cdouble+2) c1 from alltypesparquet_part order by c1 limit 10;
+select (cdouble+2) c1 from alltypesparquet_part order by c1 limit 10;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_part_varchar.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_part_varchar.q b/ql/src/test/queries/clientpositive/parquet_vectorization_part_varchar.q
new file mode 100644
index 0000000..b231b37
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_part_varchar.q
@@ -0,0 +1,10 @@
+set hive.mapred.mode=nonstrict;
+SET hive.vectorized.execution.enabled=true;
+set hive.fetch.task.conversion=none;
+
+CREATE TABLE alltypesparquet_part_varchar(ctinyint tinyint, csmallint smallint, cint int, cbigint bigint, cfloat float, cdouble double, cstring1 string, cstring2 string, ctimestamp1 timestamp, ctimestamp2 timestamp, cboolean1 boolean, cboolean2 boolean) partitioned by (ds varchar(4)) STORED AS PARQUET;
+insert overwrite table alltypesparquet_part_varchar partition (ds='2011') select * from alltypesparquet limit 100;
+insert overwrite table alltypesparquet_part_varchar partition (ds='2012') select * from alltypesparquet limit 100;
+
+select count(cdouble), cint from alltypesparquet_part_varchar where ds='2011' group by cint limit 10;
+select count(*) from alltypesparquet_part_varchar A join alltypesparquet_part_varchar B on A.ds=B.ds;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/queries/clientpositive/parquet_vectorization_pushdown.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/parquet_vectorization_pushdown.q b/ql/src/test/queries/clientpositive/parquet_vectorization_pushdown.q
new file mode 100644
index 0000000..b83b556
--- /dev/null
+++ b/ql/src/test/queries/clientpositive/parquet_vectorization_pushdown.q
@@ -0,0 +1,8 @@
+set hive.mapred.mode=nonstrict;
+set hive.explain.user=false;
+SET hive.vectorized.execution.enabled=true;
+SET hive.optimize.index.filter=true;
+set hive.fetch.task.conversion=none;
+
+explain vectorization SELECT AVG(cbigint) FROM alltypesparquet WHERE cbigint < cdouble;
+SELECT AVG(cbigint) FROM alltypesparquet WHERE cbigint < cdouble;

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/add_part_exist.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/add_part_exist.q.out b/ql/src/test/results/clientpositive/add_part_exist.q.out
index f8d50ca..7851664 100644
--- a/ql/src/test/results/clientpositive/add_part_exist.q.out
+++ b/ql/src/test/results/clientpositive/add_part_exist.q.out
@@ -85,6 +85,7 @@ POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/alter1.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter1.q.out b/ql/src/test/results/clientpositive/alter1.q.out
index c2efbe5..6c43860 100644
--- a/ql/src/test/results/clientpositive/alter1.q.out
+++ b/ql/src/test/results/clientpositive/alter1.q.out
@@ -192,6 +192,7 @@ POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/alter2.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter2.q.out b/ql/src/test/results/clientpositive/alter2.q.out
index 18032ac..4b94a05 100644
--- a/ql/src/test/results/clientpositive/alter2.q.out
+++ b/ql/src/test/results/clientpositive/alter2.q.out
@@ -205,6 +205,7 @@ POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/alter3.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter3.q.out b/ql/src/test/results/clientpositive/alter3.q.out
index 3bd7288..8395a79 100644
--- a/ql/src/test/results/clientpositive/alter3.q.out
+++ b/ql/src/test/results/clientpositive/alter3.q.out
@@ -181,6 +181,7 @@ POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/alter4.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter4.q.out b/ql/src/test/results/clientpositive/alter4.q.out
index ddcb0ed..292b26d 100644
--- a/ql/src/test/results/clientpositive/alter4.q.out
+++ b/ql/src/test/results/clientpositive/alter4.q.out
@@ -49,6 +49,7 @@ POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/alter5.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter5.q.out b/ql/src/test/results/clientpositive/alter5.q.out
index 1eb24c2..a0bafc7 100644
--- a/ql/src/test/results/clientpositive/alter5.q.out
+++ b/ql/src/test/results/clientpositive/alter5.q.out
@@ -107,6 +107,7 @@ POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/alter_index.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_index.q.out b/ql/src/test/results/clientpositive/alter_index.q.out
index bca4e12..262ad07 100644
--- a/ql/src/test/results/clientpositive/alter_index.q.out
+++ b/ql/src/test/results/clientpositive/alter_index.q.out
@@ -50,6 +50,7 @@ POSTHOOK: query: show tables
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/alter_rename_partition.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/alter_rename_partition.q.out b/ql/src/test/results/clientpositive/alter_rename_partition.q.out
index 5702d39..df39ecc 100644
--- a/ql/src/test/results/clientpositive/alter_rename_partition.q.out
+++ b/ql/src/test/results/clientpositive/alter_rename_partition.q.out
@@ -13,6 +13,7 @@ POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3
@@ -140,6 +141,7 @@ POSTHOOK: query: SHOW TABLES
 POSTHOOK: type: SHOWTABLES
 POSTHOOK: Input: database:default
 alltypesorc
+alltypesparquet
 cbo_t1
 cbo_t2
 cbo_t3

http://git-wip-us.apache.org/repos/asf/hive/blob/9a59592e/ql/src/test/results/clientpositive/authorization_9.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/authorization_9.q.out b/ql/src/test/results/clientpositive/authorization_9.q.out
index 39e0a56..17ca6ef 100644
--- a/ql/src/test/results/clientpositive/authorization_9.q.out
+++ b/ql/src/test/results/clientpositive/authorization_9.q.out
@@ -46,6 +46,10 @@ default	alltypesorc			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	SELECT	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	UPDATE	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	DELETE	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	INSERT	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	SELECT	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	UPDATE	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	SELECT	true	-1	hive_test_user
@@ -138,6 +142,10 @@ default	alltypesorc			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	SELECT	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	UPDATE	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	DELETE	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	INSERT	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	SELECT	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	UPDATE	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	SELECT	true	-1	hive_test_user
@@ -210,6 +218,10 @@ default	alltypesorc			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	SELECT	true	-1	hive_test_user
 default	alltypesorc			hive_test_user	USER	UPDATE	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	DELETE	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	INSERT	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	SELECT	true	-1	hive_test_user
+default	alltypesparquet			hive_test_user	USER	UPDATE	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	DELETE	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	INSERT	true	-1	hive_test_user
 default	cbo_t1			hive_test_user	USER	SELECT	true	-1	hive_test_user


Mime
View raw message