You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2015/06/30 03:21:49 UTC

[56/57] [abbrv] hive git commit: HIVE-11146 : LLAP: merge master into branch (Sergey Shelukhin)

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/java/org/apache/hadoop/hive/ql/io/orc/ReaderImpl.java
----------------------------------------------------------------------
diff --cc ql/src/java/org/apache/hadoop/hive/ql/io/orc/ReaderImpl.java
index 8041ba8,bbc4654..7d14e04
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/ReaderImpl.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/ReaderImpl.java
@@@ -36,17 -34,11 +34,19 @@@ import org.apache.hadoop.fs.FSDataInput
  import org.apache.hadoop.fs.FileSystem;
  import org.apache.hadoop.fs.Path;
  import org.apache.hadoop.hive.common.DiskRange;
 +import org.apache.hadoop.hive.conf.HiveConf;
 +import org.apache.hadoop.hive.llap.Consumer;
 +import org.apache.hadoop.hive.llap.counters.LowLevelCacheCounters;
 +import org.apache.hadoop.hive.llap.io.api.cache.LowLevelCache;
 +import org.apache.hadoop.hive.llap.io.api.orc.OrcBatchKey;
 +import org.apache.hadoop.hive.ql.io.orc.EncodedReaderImpl.OrcEncodedColumnBatch;
 +import org.apache.hadoop.hive.ql.io.orc.OrcFile.WriterVersion;
 +import org.apache.hadoop.hive.ql.io.orc.OrcProto.Footer;
+ import org.apache.hadoop.hive.ql.io.FileFormatException;
  import org.apache.hadoop.hive.ql.io.orc.OrcProto.Type;
- import org.apache.hadoop.hive.ql.io.sarg.SearchArgument;
  import org.apache.hadoop.hive.ql.io.orc.OrcProto.UserMetadataItem;
+ import org.apache.hadoop.hive.ql.io.orc.RecordReaderImpl.BufferChunk;
+ import org.apache.hadoop.hive.ql.io.sarg.SearchArgument;
  import org.apache.hadoop.hive.ql.util.JavaDataModel;
  import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
  import org.apache.hadoop.io.Text;
@@@ -648,6 -642,6 +647,13 @@@ public class ReaderImpl implements Read
      for (String colName : colNames) {
        if (fieldNames.contains(colName)) {
          fieldIdx = fieldNames.indexOf(colName);
++      } else {
++        String s = "Cannot find field for: " + colName + " in ";
++        for (String fn : fieldNames) {
++          s += fn + ", ";
++        }
++        LOG.warn(s);
++        continue;
        }
  
        // a single field may span multiple columns. find start and end column
@@@ -712,25 -696,6 +718,26 @@@
  
    @Override
    public MetadataReader metadata() throws IOException {
 -    return new MetadataReader(fileSystem, path, codec, bufferSize, footer.getTypesCount());
 +    return new MetadataReaderImpl(fileSystem, path, codec, bufferSize, types.size());
 +  }
 +
 +  @Override
 +  public EncodedReader encodedReader(long fileId, LowLevelCache lowLevelCache,
 +      LowLevelCacheCounters qfCounters, Consumer<OrcEncodedColumnBatch> consumer)
 +          throws IOException {
-     boolean useZeroCopy = (conf != null) && (HiveConf.getBoolVar(conf, HIVE_ORC_ZEROCOPY));
++    boolean useZeroCopy = (conf != null)
++        && HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_ORC_ZEROCOPY);
 +    return new EncodedReaderImpl(fileSystem, path, fileId, useZeroCopy, types,
 +        codec, bufferSize, rowIndexStride, lowLevelCache, qfCounters, consumer);
 +  }
 +
 +  @Override
 +  public List<Integer> getVersionList() {
 +    return versionList;
 +  }
 +
 +  @Override
 +  public int getMetadataSize() {
 +    return metadataSize;
    }
  }

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
----------------------------------------------------------------------
diff --cc ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
index bd7fbd1,beaf231..f560e98
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
@@@ -670,10 -666,8 +670,9 @@@ public class RecordReaderImpl implement
      private final List<PredicateLeaf> sargLeaves;
      private final int[] filterColumns;
      private final long rowIndexStride;
-     private final OrcProto.BloomFilterIndex[] bloomFilterIndices;
      // same as the above array, but indices are set to true
      private final boolean[] sargColumns;
 +
      public SargApplier(SearchArgument sarg, String[] columnNames, long rowIndexStride,
          List<OrcProto.Type> types, int includedCount) {
        this.sarg = sarg;
@@@ -698,8 -691,9 +696,8 @@@
       * row groups must be read.
       * @throws IOException
       */
 -    public boolean[] pickRowGroups(
 -        StripeInformation stripe, OrcProto.RowIndex[] indexes,
 -        OrcProto.BloomFilterIndex[] bloomFilterIndices) throws IOException {
 +    public boolean[] pickRowGroups(StripeInformation stripe, OrcProto.RowIndex[] indexes,
-         boolean returnNone) throws IOException {
++        OrcProto.BloomFilterIndex[] bloomFilterIndices, boolean returnNone) throws IOException {
        long rowsInStripe = stripe.getNumberOfRows();
        int groupsInStripe = (int) ((rowsInStripe + rowIndexStride - 1) / rowIndexStride);
        boolean[] result = new boolean[groupsInStripe]; // TODO: avoid alloc?
@@@ -752,7 -748,7 +750,7 @@@
        return null;
      }
      readRowIndex(currentStripe, included, sargApp.sargColumns);
-     return sargApp.pickRowGroups(stripes.get(currentStripe), indexes, false);
 -    return sargApp.pickRowGroups(stripes.get(currentStripe), indexes, bloomFilterIndices);
++    return sargApp.pickRowGroups(stripes.get(currentStripe), indexes, bloomFilterIndices, false);
    }
  
    private void clearStreams() throws IOException {

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java
----------------------------------------------------------------------
diff --cc ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java
index b35b5a5,8ab7cd4..105effe
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/TezCompiler.java
@@@ -70,7 -71,7 +71,8 @@@ import org.apache.hadoop.hive.ql.optimi
  import org.apache.hadoop.hive.ql.optimizer.SetReducerParallelism;
  import org.apache.hadoop.hive.ql.optimizer.metainfo.annotation.AnnotateWithOpTraits;
  import org.apache.hadoop.hive.ql.optimizer.physical.CrossProductCheck;
 +import org.apache.hadoop.hive.ql.optimizer.physical.LlapDecider;
+ import org.apache.hadoop.hive.ql.optimizer.physical.MemoryDecider;
  import org.apache.hadoop.hive.ql.optimizer.physical.MetadataOnlyOptimizer;
  import org.apache.hadoop.hive.ql.optimizer.physical.NullScanOptimizer;
  import org.apache.hadoop.hive.ql.optimizer.physical.PhysicalContext;
@@@ -474,11 -477,10 +478,15 @@@ public class TezCompiler extends TaskCo
        LOG.debug("Skipping stage id rearranger");
      }
  
+     if ((conf.getBoolVar(HiveConf.ConfVars.HIVE_TEZ_ENABLE_MEMORY_MANAGER))
+         && (conf.getBoolVar(HiveConf.ConfVars.HIVEUSEHYBRIDGRACEHASHJOIN))) {
+       physicalCtx = new MemoryDecider().resolve(physicalCtx);
+     }
 -    return;
++
 +    if ("llap".equalsIgnoreCase(conf.getVar(HiveConf.ConfVars.HIVE_EXECUTION_MODE))) {
 +      physicalCtx = new LlapDecider().resolve(physicalCtx);
 +    } else {
 +      LOG.debug("Skipping llap decider");
 +    }
-     return;
    }
  }

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java
----------------------------------------------------------------------
diff --cc ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java
index 0be879a,12ae902..f0af234
--- a/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java
+++ b/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java
@@@ -395,6 -398,97 +399,97 @@@ public class TestInputOutputFormat 
          OrcInputFormat.getInputPaths(conf));
    }
  
+   private FileSystem generateMockFiles(final int count, final int size) {
+     final byte[] data = new byte[size];
+     MockFile[] files = new MockFile[count];
+     for (int i = 0; i < count; i++) {
+       files[i] = new MockFile(String.format("mock:/a/b/part-%d", i), size, data);
+     }
+     return new MockFileSystem(conf, files);
+   }
+ 
+   @Test
+   public void testSplitStrategySelection() throws Exception {
+ 
+     conf.set("mapreduce.input.fileinputformat.split.maxsize", "500");
+     conf.setLong(HiveConf.ConfVars.HIVE_ORC_CACHE_STRIPE_DETAILS_SIZE.varname,
+         100);
+     final int[] counts = { 1, 10, 100, 256 };
+     final int[] sizes = { 100, 1000 };
+     final int[] numSplits = { 1, 9, 10, 11, 99, 111 };
+     final String[] strategyResults = new String[] {
+     "ETLSplitStrategy", /* 1 files x 100 size for 1 splits */
+     "ETLSplitStrategy", /* 1 files x 100 size for 9 splits */
+     "ETLSplitStrategy", /* 1 files x 100 size for 10 splits */
+     "ETLSplitStrategy", /* 1 files x 100 size for 11 splits */
+     "ETLSplitStrategy", /* 1 files x 100 size for 99 splits */
+     "ETLSplitStrategy", /* 1 files x 100 size for 111 splits */
+     "ETLSplitStrategy", /* 1 files x 1000 size for 1 splits */
+     "ETLSplitStrategy", /* 1 files x 1000 size for 9 splits */
+     "ETLSplitStrategy", /* 1 files x 1000 size for 10 splits */
+     "ETLSplitStrategy", /* 1 files x 1000 size for 11 splits */
+     "ETLSplitStrategy", /* 1 files x 1000 size for 99 splits */
+     "ETLSplitStrategy", /* 1 files x 1000 size for 111 splits */
+     "BISplitStrategy", /* 10 files x 100 size for 1 splits */
+     "BISplitStrategy", /* 10 files x 100 size for 9 splits */
+     "ETLSplitStrategy", /* 10 files x 100 size for 10 splits */
+     "ETLSplitStrategy", /* 10 files x 100 size for 11 splits */
+     "ETLSplitStrategy", /* 10 files x 100 size for 99 splits */
+     "ETLSplitStrategy", /* 10 files x 100 size for 111 splits */
+     "ETLSplitStrategy", /* 10 files x 1000 size for 1 splits */
+     "ETLSplitStrategy", /* 10 files x 1000 size for 9 splits */
+     "ETLSplitStrategy", /* 10 files x 1000 size for 10 splits */
+     "ETLSplitStrategy", /* 10 files x 1000 size for 11 splits */
+     "ETLSplitStrategy", /* 10 files x 1000 size for 99 splits */
+     "ETLSplitStrategy", /* 10 files x 1000 size for 111 splits */
+     "BISplitStrategy", /* 100 files x 100 size for 1 splits */
+     "BISplitStrategy", /* 100 files x 100 size for 9 splits */
+     "BISplitStrategy", /* 100 files x 100 size for 10 splits */
+     "BISplitStrategy", /* 100 files x 100 size for 11 splits */
+     "BISplitStrategy", /* 100 files x 100 size for 99 splits */
+     "ETLSplitStrategy", /* 100 files x 100 size for 111 splits */
+     "ETLSplitStrategy", /* 100 files x 1000 size for 1 splits */
+     "ETLSplitStrategy", /* 100 files x 1000 size for 9 splits */
+     "ETLSplitStrategy", /* 100 files x 1000 size for 10 splits */
+     "ETLSplitStrategy", /* 100 files x 1000 size for 11 splits */
+     "ETLSplitStrategy", /* 100 files x 1000 size for 99 splits */
+     "ETLSplitStrategy", /* 100 files x 1000 size for 111 splits */
+     "BISplitStrategy", /* 256 files x 100 size for 1 splits */
+     "BISplitStrategy", /* 256 files x 100 size for 9 splits */
+     "BISplitStrategy", /* 256 files x 100 size for 10 splits */
+     "BISplitStrategy", /* 256 files x 100 size for 11 splits */
+     "BISplitStrategy", /* 256 files x 100 size for 99 splits */
+     "BISplitStrategy", /* 256 files x 100 size for 111 splits */
+     "ETLSplitStrategy", /* 256 files x 1000 size for 1 splits */
+     "ETLSplitStrategy", /* 256 files x 1000 size for 9 splits */
+     "ETLSplitStrategy", /* 256 files x 1000 size for 10 splits */
+     "ETLSplitStrategy", /* 256 files x 1000 size for 11 splits */
+     "ETLSplitStrategy", /* 256 files x 1000 size for 99 splits */
+     "ETLSplitStrategy", /* 256 files x 1000 size for 111 splits */
+     };
+ 
+     int k = 0;
+ 
+     for (int c : counts) {
+       for (int s : sizes) {
+         final FileSystem fs = generateMockFiles(c, s);
+         for (int n : numSplits) {
+           final OrcInputFormat.Context context = new OrcInputFormat.Context(
+               conf, n);
+           OrcInputFormat.FileGenerator gen = new OrcInputFormat.FileGenerator(
 -              context, fs, new MockPath(fs, "mock:/a/b"));
++              context, fs, new MockPath(fs, "mock:/a/b"), false);
+           final SplitStrategy splitStrategy = gen.call();
+           assertTrue(
+               String.format(
+                   "Split strategy for %d files x %d size for %d splits", c, s,
+                   n),
+               splitStrategy.getClass().getSimpleName()
+                   .equals(strategyResults[k++]));
+         }
+       }
+     }
+   }
+ 
    @Test
    public void testFileGenerator() throws Exception {
      OrcInputFormat.Context context = new OrcInputFormat.Context(conf);

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/queries/clientpositive/mrr.q
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/subquery_notin_having.q.java1.7.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_count_distinct.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vector_count_distinct.q.out
index f0e0d14,95863a3..a79024b
--- a/ql/src/test/results/clientpositive/tez/vector_count_distinct.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_count_distinct.q.out
@@@ -1287,8 -1287,8 +1287,9 @@@ STAGE PLANS
                      sort order: 
                      Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE
                      value expressions: _col0 (type: bigint)
+             Execution mode: vectorized
          Reducer 3 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Group By Operator
                  aggregations: count(VALUE._col0)

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_decimal_2.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vector_decimal_2.q.out
index ced051b,51cc936..fc37e0d
--- a/ql/src/test/results/clientpositive/tez/vector_decimal_2.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_decimal_2.q.out
@@@ -1038,13 -1036,11 +1036,12 @@@ STAGE PLANS
                        key expressions: 3.14 (type: decimal(3,2))
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(4,2))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(4,2))
+                 expressions: 3.14 (type: decimal(4,2))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1100,13 -1095,11 +1095,12 @@@ STAGE PLANS
                        key expressions: 3.14 (type: decimal(3,2))
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(4,2))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(4,2))
+                 expressions: 3.14 (type: decimal(4,2))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1162,13 -1154,11 +1154,12 @@@ STAGE PLANS
                        key expressions: 1355944339.1234567 (type: decimal(17,7))
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(30,8))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(30,8))
+                 expressions: 1355944339.1234567 (type: decimal(30,8))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1224,13 -1213,11 +1213,12 @@@ STAGE PLANS
                        key expressions: 1 (type: int)
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(10,0))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(10,0))
+                 expressions: 1 (type: decimal(10,0))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1277,13 -1263,11 +1263,12 @@@ STAGE PLANS
                        key expressions: 1 (type: int)
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(10,0))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(10,0))
+                 expressions: 1 (type: decimal(10,0))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1339,13 -1322,11 +1322,12 @@@ STAGE PLANS
                        key expressions: 3 (type: int)
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(10,0))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(10,0))
+                 expressions: 3 (type: decimal(10,0))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1401,13 -1381,11 +1381,12 @@@ STAGE PLANS
                        key expressions: 3 (type: int)
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(10,0))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(10,0))
+                 expressions: 3 (type: decimal(10,0))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1463,13 -1440,11 +1440,12 @@@ STAGE PLANS
                        key expressions: 3 (type: int)
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(10,0))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(10,0))
+                 expressions: 3 (type: decimal(10,0))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1525,13 -1499,11 +1499,12 @@@ STAGE PLANS
                        key expressions: 3 (type: int)
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(10,0))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(10,0))
+                 expressions: 3 (type: decimal(10,0))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1587,13 -1558,11 +1558,12 @@@ STAGE PLANS
                        key expressions: 1 (type: int)
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(20,19))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(20,19))
+                 expressions: 1 (type: decimal(20,19))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator
@@@ -1649,13 -1617,11 +1617,12 @@@ STAGE PLANS
                        key expressions: 0.99999999999999999999 (type: decimal(20,20))
                        sort order: +
                        Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
-                       value expressions: _col0 (type: decimal(20,20))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: decimal(20,20))
+                 expressions: 0.99999999999999999999 (type: decimal(20,20))
                  outputColumnNames: _col0
                  Statistics: Num rows: 1 Data size: 112 Basic stats: COMPLETE Column stats: COMPLETE
                  File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_decimal_round_2.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vector_decimal_round_2.q.out
index 1b0b2a2,3eae560..edde023
--- a/ql/src/test/results/clientpositive/tez/vector_decimal_round_2.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_decimal_round_2.q.out
@@@ -464,13 -464,12 +464,13 @@@ STAGE PLANS
                        key expressions: _col0 (type: decimal(30,9))
                        sort order: +
                        Statistics: Num rows: 1 Data size: 224 Basic stats: COMPLETE Column stats: NONE
-                       value expressions: _col1 (type: decimal(30,9)), _col2 (type: decimal(17,9)), _col3 (type: decimal(17,9))
+                       value expressions: _col1 (type: decimal(30,9))
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: decimal(30,9)), VALUE._col0 (type: decimal(30,9)), VALUE._col1 (type: decimal(17,9)), VALUE._col2 (type: decimal(17,9))
+                 expressions: KEY.reducesinkkey0 (type: decimal(30,9)), VALUE._col0 (type: decimal(30,9)), 1809242.315111134 (type: decimal(17,9)), -1809242.315111134 (type: decimal(17,9))
                  outputColumnNames: _col0, _col1, _col2, _col3
                  Statistics: Num rows: 1 Data size: 224 Basic stats: COMPLETE Column stats: NONE
                  File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_groupby_reduce.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_interval_1.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vector_interval_1.q.out
index f41ff79,5c3be20..8072033
--- a/ql/src/test/results/clientpositive/tez/vector_interval_1.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_interval_1.q.out
@@@ -78,13 -78,12 +78,13 @@@ STAGE PLANS
                        key expressions: _col0 (type: string)
                        sort order: +
                        Statistics: Num rows: 2 Data size: 442 Basic stats: COMPLETE Column stats: NONE
-                       value expressions: _col1 (type: interval_year_month), _col2 (type: interval_year_month), _col3 (type: interval_day_time), _col4 (type: interval_day_time)
+                       value expressions: _col2 (type: interval_year_month), _col4 (type: interval_day_time)
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: string), VALUE._col0 (type: interval_year_month), VALUE._col1 (type: interval_year_month), VALUE._col2 (type: interval_day_time), VALUE._col3 (type: interval_day_time)
+                 expressions: KEY.reducesinkkey0 (type: string), 1-2 (type: interval_year_month), VALUE._col1 (type: interval_year_month), 1 02:03:04.000000000 (type: interval_day_time), VALUE._col3 (type: interval_day_time)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4
                  Statistics: Num rows: 2 Data size: 442 Basic stats: COMPLETE Column stats: NONE
                  File Output Operator
@@@ -167,13 -167,12 +167,13 @@@ STAGE PLANS
                        key expressions: _col0 (type: date)
                        sort order: +
                        Statistics: Num rows: 2 Data size: 442 Basic stats: COMPLETE Column stats: NONE
-                       value expressions: _col1 (type: interval_year_month), _col2 (type: interval_year_month), _col3 (type: interval_year_month), _col4 (type: interval_year_month), _col5 (type: interval_year_month), _col6 (type: interval_year_month)
+                       value expressions: _col2 (type: interval_year_month), _col3 (type: interval_year_month), _col5 (type: interval_year_month), _col6 (type: interval_year_month)
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: date), VALUE._col0 (type: interval_year_month), VALUE._col1 (type: interval_year_month), VALUE._col2 (type: interval_year_month), VALUE._col3 (type: interval_year_month), VALUE._col4 (type: interval_year_month), VALUE._col5 (type: interval_year_month)
+                 expressions: KEY.reducesinkkey0 (type: date), 2-4 (type: interval_year_month), VALUE._col1 (type: interval_year_month), VALUE._col2 (type: interval_year_month), 0-0 (type: interval_year_month), VALUE._col4 (type: interval_year_month), VALUE._col5 (type: interval_year_month)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                  Statistics: Num rows: 2 Data size: 442 Basic stats: COMPLETE Column stats: NONE
                  File Output Operator
@@@ -262,13 -262,12 +262,13 @@@ STAGE PLANS
                        key expressions: _col0 (type: date)
                        sort order: +
                        Statistics: Num rows: 2 Data size: 442 Basic stats: COMPLETE Column stats: NONE
-                       value expressions: _col1 (type: interval_day_time), _col2 (type: interval_day_time), _col3 (type: interval_day_time), _col4 (type: interval_day_time), _col5 (type: interval_day_time), _col6 (type: interval_day_time)
+                       value expressions: _col2 (type: interval_day_time), _col3 (type: interval_day_time), _col5 (type: interval_day_time), _col6 (type: interval_day_time)
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: date), VALUE._col0 (type: interval_day_time), VALUE._col1 (type: interval_day_time), VALUE._col2 (type: interval_day_time), VALUE._col3 (type: interval_day_time), VALUE._col4 (type: interval_day_time), VALUE._col5 (type: interval_day_time)
+                 expressions: KEY.reducesinkkey0 (type: date), 2 04:06:08.000000000 (type: interval_day_time), VALUE._col1 (type: interval_day_time), VALUE._col2 (type: interval_day_time), 0 00:00:00.000000000 (type: interval_day_time), VALUE._col4 (type: interval_day_time), VALUE._col5 (type: interval_day_time)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
                  Statistics: Num rows: 2 Data size: 442 Basic stats: COMPLETE Column stats: NONE
                  File Output Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_outer_join1.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vector_outer_join1.q.out
index a2f4458,664f74a..46a25e7
--- a/ql/src/test/results/clientpositive/tez/vector_outer_join1.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_outer_join1.q.out
@@@ -422,9 -562,9 +562,10 @@@ STAGE PLANS
                        key expressions: _col0 (type: tinyint)
                        sort order: +
                        Map-reduce partition columns: _col0 (type: tinyint)
-                       Statistics: Num rows: 1045 Data size: 4183 Basic stats: COMPLETE Column stats: NONE
+                       Statistics: Num rows: 15 Data size: 3483 Basic stats: COMPLETE Column stats: NONE
              Execution mode: vectorized
          Reducer 2 
++            Execution mode: vectorized
              Reduce Operator Tree:
                Group By Operator
                  aggregations: count(VALUE._col0), sum(VALUE._col1)
@@@ -438,7 -578,7 +579,6 @@@
                        input format: org.apache.hadoop.mapred.TextInputFormat
                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
--            Execution mode: vectorized
  
    Stage: Stage-0
      Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_outer_join2.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vector_outer_join2.q.out
index 8c8f54e,f9159eb..663c892
--- a/ql/src/test/results/clientpositive/tez/vector_outer_join2.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_outer_join2.q.out
@@@ -187,9 -269,9 +269,10 @@@ STAGE PLANS
                        key expressions: _col0 (type: bigint)
                        sort order: +
                        Map-reduce partition columns: _col0 (type: bigint)
-                       Statistics: Num rows: 522 Data size: 4183 Basic stats: COMPLETE Column stats: NONE
+                       Statistics: Num rows: 20 Data size: 4431 Basic stats: COMPLETE Column stats: NONE
              Execution mode: vectorized
          Reducer 2 
++            Execution mode: vectorized
              Reduce Operator Tree:
                Group By Operator
                  aggregations: count(VALUE._col0), sum(VALUE._col1)
@@@ -203,7 -285,7 +286,6 @@@
                        input format: org.apache.hadoop.mapred.TextInputFormat
                        output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                        serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
--            Execution mode: vectorized
  
    Stage: Stage-0
      Fetch Operator

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_outer_join3.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vector_outer_join3.q.out
index 5187a4d,2a47afa..1f88c29
--- a/ql/src/test/results/clientpositive/tez/vector_outer_join3.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_outer_join3.q.out
@@@ -182,10 -264,9 +264,10 @@@ STAGE PLANS
                        key expressions: _col0 (type: string)
                        sort order: +
                        Map-reduce partition columns: _col0 (type: string)
-                       Statistics: Num rows: 15 Data size: 3789 Basic stats: COMPLETE Column stats: NONE
+                       Statistics: Num rows: 20 Data size: 4568 Basic stats: COMPLETE Column stats: NONE
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Group By Operator
                  aggregations: count(VALUE._col0)
@@@ -329,10 -411,9 +411,10 @@@ STAGE PLANS
                        key expressions: _col0 (type: string)
                        sort order: +
                        Map-reduce partition columns: _col0 (type: string)
-                       Statistics: Num rows: 15 Data size: 3789 Basic stats: COMPLETE Column stats: NONE
+                       Statistics: Num rows: 20 Data size: 4568 Basic stats: COMPLETE Column stats: NONE
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Group By Operator
                  aggregations: count(VALUE._col0)
@@@ -476,10 -558,9 +558,10 @@@ STAGE PLANS
                        key expressions: _col1 (type: string), _col0 (type: int)
                        sort order: ++
                        Map-reduce partition columns: _col1 (type: string), _col0 (type: int)
-                       Statistics: Num rows: 15 Data size: 3789 Basic stats: COMPLETE Column stats: NONE
+                       Statistics: Num rows: 20 Data size: 4568 Basic stats: COMPLETE Column stats: NONE
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Group By Operator
                  aggregations: count(VALUE._col0)

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_outer_join4.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vector_outer_join4.q.out
index 5e49ef7,7568abf..f0a9185
--- a/ql/src/test/results/clientpositive/tez/vector_outer_join4.q.out
+++ b/ql/src/test/results/clientpositive/tez/vector_outer_join4.q.out
@@@ -813,10 -931,9 +931,10 @@@ STAGE PLANS
                        key expressions: _col0 (type: tinyint)
                        sort order: +
                        Map-reduce partition columns: _col0 (type: tinyint)
-                       Statistics: Num rows: 30 Data size: 5922 Basic stats: COMPLETE Column stats: NONE
+                       Statistics: Num rows: 30 Data size: 6838 Basic stats: COMPLETE Column stats: NONE
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Group By Operator
                  aggregations: count(VALUE._col0)

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vector_partitioned_date_time.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vectorization_0.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vectorization_13.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vectorization_13.q.out
index 145a799,687add6..2ce0ae0
--- a/ql/src/test/results/clientpositive/tez/vectorization_13.q.out
+++ b/ql/src/test/results/clientpositive/tez/vectorization_13.q.out
@@@ -110,19 -114,17 +114,18 @@@ STAGE PLANS
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
                  Statistics: Num rows: 1365 Data size: 293479 Basic stats: COMPLETE Column stats: NONE
                  Select Operator
-                   expressions: _col0 (type: boolean), _col1 (type: tinyint), (- _col6) (type: double), (79.553 * UDFToDouble(_col3)) (type: double), _col7 (type: double), _col8 (type: double), (UDFToDouble(((- _col1) + _col5)) - 10.175) (type: double), (- (- _col6)) (type: double), (-26.28 / (- (- _col6))) (type: double), _col9 (type: float), ((_col6 * UDFToDouble(((- _col1) + _col5))) / UDFToDouble(_col1)) (type: double), _col2 (type: timestamp), _col10 (type: tinyint), _col3 (type: float), _col4 (type: string), (- _col1) (type: tinyint), _col5 (type: tinyint), ((- _col1) + _col5) (type: tinyint), _col6 (type: double), (_col6 * UDFToDouble(((- _col1) + _col5))) (type: double)
-                   outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col14, _col15, _col16, _col17, _col18, _col19, _col2, _col20, _col3, _col4, _col5, _col6, _col7, _col8, _col9
+                   expressions: _col0 (type: boolean), _col1 (type: tinyint), _col2 (type: timestamp), _col3 (type: float), _col4 (type: string), (- _col1) (type: tinyint), _col5 (type: tinyint), ((- _col1) + _col5) (type: tinyint), _col6 (type: double), (_col6 * UDFToDouble(((- _col1) + _col5))) (type: double), (- _col6) (type: double), (79.553 * UDFToDouble(_col3)) (type: double), _col7 (type: double), (- _col6) (type: double), _col8 (type: double), (UDFToDouble(((- _col1) + _col5)) - 10.175) (type: double), (- (- _col6)) (type: double), (-26.28 / (- (- _col6))) (type: double), _col9 (type: float), ((_col6 * UDFToDouble(((- _col1) + _col5))) / UDFToDouble(_col1)) (type: double), _col10 (type: tinyint)
+                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20
                    Statistics: Num rows: 1365 Data size: 293479 Basic stats: COMPLETE Column stats: NONE
                    Reduce Output Operator
-                     key expressions: _col0 (type: boolean), _col1 (type: tinyint), _col2 (type: timestamp), _col3 (type: float), _col4 (type: string)
-                     sort order: +++++
+                     key expressions: _col0 (type: boolean), _col1 (type: tinyint), _col2 (type: timestamp), _col3 (type: float), _col4 (type: string), _col5 (type: tinyint), _col6 (type: tinyint), _col7 (type: tinyint), _col8 (type: double), _col9 (type: double), _col10 (type: double), _col11 (type: double), _col12 (type: double), _col13 (type: double), _col14 (type: double), _col15 (type: double), _col16 (type: double), _col17 (type: double), _col18 (type: float), _col19 (type: double), _col20 (type: tinyint)
+                     sort order: +++++++++++++++++++++
                      Statistics: Num rows: 1365 Data size: 293479 Basic stats: COMPLETE Column stats: NONE
-                     value expressions: _col5 (type: tinyint), _col6 (type: tinyint), _col7 (type: tinyint), _col8 (type: double), _col9 (type: double), _col10 (type: double), _col11 (type: double), _col12 (type: double), _col14 (type: double), _col15 (type: double), _col16 (type: double), _col17 (type: double), _col18 (type: float), _col19 (type: double), _col20 (type: tinyint)
          Reducer 3 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: boolean), KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey2 (type: timestamp), KEY.reducesinkkey3 (type: float), KEY.reducesinkkey4 (type: string), VALUE._col0 (type: tinyint), VALUE._col1 (type: tinyint), VALUE._col2 (type: tinyint), VALUE._col3 (type: double), VALUE._col4 (type: double), VALUE._col5 (type: double), VALUE._col6 (type: double), VALUE._col7 (type: double), VALUE._col5 (type: double), VALUE._col8 (type: double), VALUE._col9 (type: double), VALUE._col10 (type: double), VALUE._col11 (type: double), VALUE._col12 (type: float), VALUE._col13 (type: double), VALUE._col14 (type: tinyint)
+                 expressions: KEY.reducesinkkey0 (type: boolean), KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey2 (type: timestamp), KEY.reducesinkkey3 (type: float), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: tinyint), KEY.reducesinkkey6 (type: tinyint), KEY.reducesinkkey7 (type: tinyint), KEY.reducesinkkey8 (type: double), KEY.reducesinkkey9 (type: double), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey11 (type: double), KEY.reducesinkkey12 (type: double), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey14 (type: double), KEY.reducesinkkey15 (type: double), KEY.reducesinkkey16 (type: double), KEY.reducesinkkey17 (type: double), KEY.reducesinkkey18 (type: float), KEY.reducesinkkey19 (type: double), KEY.reducesinkkey20 (type: tinyint)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20
                  Statistics: Num rows: 1365 Data size: 293479 Basic stats: COMPLETE Column stats: NONE
                  Limit
@@@ -364,19 -367,17 +367,18 @@@ STAGE PLANS
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
                  Statistics: Num rows: 1365 Data size: 293479 Basic stats: COMPLETE Column stats: NONE
                  Select Operator
-                   expressions: _col0 (type: boolean), _col1 (type: tinyint), (- _col6) (type: double), (79.553 * UDFToDouble(_col3)) (type: double), _col7 (type: double), _col8 (type: double), (UDFToDouble(((- _col1) + _col5)) - 10.175) (type: double), (- (- _col6)) (type: double), (-26.28 / (- (- _col6))) (type: double), _col9 (type: float), ((_col6 * UDFToDouble(((- _col1) + _col5))) / UDFToDouble(_col1)) (type: double), _col2 (type: timestamp), _col10 (type: tinyint), _col3 (type: float), _col4 (type: string), (- _col1) (type: tinyint), _col5 (type: tinyint), ((- _col1) + _col5) (type: tinyint), _col6 (type: double), (_col6 * UDFToDouble(((- _col1) + _col5))) (type: double)
-                   outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col14, _col15, _col16, _col17, _col18, _col19, _col2, _col20, _col3, _col4, _col5, _col6, _col7, _col8, _col9
+                   expressions: _col0 (type: boolean), _col1 (type: tinyint), _col2 (type: timestamp), _col3 (type: float), _col4 (type: string), (- _col1) (type: tinyint), _col5 (type: tinyint), ((- _col1) + _col5) (type: tinyint), _col6 (type: double), (_col6 * UDFToDouble(((- _col1) + _col5))) (type: double), (- _col6) (type: double), (79.553 * UDFToDouble(_col3)) (type: double), _col7 (type: double), (- _col6) (type: double), _col8 (type: double), (UDFToDouble(((- _col1) + _col5)) - 10.175) (type: double), (- (- _col6)) (type: double), (-26.28 / (- (- _col6))) (type: double), _col9 (type: float), ((_col6 * UDFToDouble(((- _col1) + _col5))) / UDFToDouble(_col1)) (type: double), _col10 (type: tinyint)
+                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20
                    Statistics: Num rows: 1365 Data size: 293479 Basic stats: COMPLETE Column stats: NONE
                    Reduce Output Operator
-                     key expressions: _col0 (type: boolean), _col1 (type: tinyint), _col2 (type: timestamp), _col3 (type: float), _col4 (type: string)
-                     sort order: +++++
+                     key expressions: _col0 (type: boolean), _col1 (type: tinyint), _col2 (type: timestamp), _col3 (type: float), _col4 (type: string), _col5 (type: tinyint), _col6 (type: tinyint), _col7 (type: tinyint), _col8 (type: double), _col9 (type: double), _col10 (type: double), _col11 (type: double), _col12 (type: double), _col13 (type: double), _col14 (type: double), _col15 (type: double), _col16 (type: double), _col17 (type: double), _col18 (type: float), _col19 (type: double), _col20 (type: tinyint)
+                     sort order: +++++++++++++++++++++
                      Statistics: Num rows: 1365 Data size: 293479 Basic stats: COMPLETE Column stats: NONE
-                     value expressions: _col5 (type: tinyint), _col6 (type: tinyint), _col7 (type: tinyint), _col8 (type: double), _col9 (type: double), _col10 (type: double), _col11 (type: double), _col12 (type: double), _col14 (type: double), _col15 (type: double), _col16 (type: double), _col17 (type: double), _col18 (type: float), _col19 (type: double), _col20 (type: tinyint)
          Reducer 3 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: boolean), KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey2 (type: timestamp), KEY.reducesinkkey3 (type: float), KEY.reducesinkkey4 (type: string), VALUE._col0 (type: tinyint), VALUE._col1 (type: tinyint), VALUE._col2 (type: tinyint), VALUE._col3 (type: double), VALUE._col4 (type: double), VALUE._col5 (type: double), VALUE._col6 (type: double), VALUE._col7 (type: double), VALUE._col5 (type: double), VALUE._col8 (type: double), VALUE._col9 (type: double), VALUE._col10 (type: double), VALUE._col11 (type: double), VALUE._col12 (type: float), VALUE._col13 (type: double), VALUE._col14 (type: tinyint)
+                 expressions: KEY.reducesinkkey0 (type: boolean), KEY.reducesinkkey1 (type: tinyint), KEY.reducesinkkey2 (type: timestamp), KEY.reducesinkkey3 (type: float), KEY.reducesinkkey4 (type: string), KEY.reducesinkkey5 (type: tinyint), KEY.reducesinkkey6 (type: tinyint), KEY.reducesinkkey7 (type: tinyint), KEY.reducesinkkey8 (type: double), KEY.reducesinkkey9 (type: double), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey11 (type: double), KEY.reducesinkkey12 (type: double), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey14 (type: double), KEY.reducesinkkey15 (type: double), KEY.reducesinkkey16 (type: double), KEY.reducesinkkey17 (type: double), KEY.reducesinkkey18 (type: float), KEY.reducesinkkey19 (type: double), KEY.reducesinkkey20 (type: tinyint)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20
                  Statistics: Num rows: 1365 Data size: 293479 Basic stats: COMPLETE Column stats: NONE
                  Limit

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vectorization_14.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vectorization_15.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out
index a028730,9729a8f..6204d4c
--- a/ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out
+++ b/ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out
@@@ -942,16 -946,14 +946,15 @@@ STAGE PLANS
                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22
                        Statistics: Num rows: 9898 Data size: 2128105 Basic stats: COMPLETE Column stats: NONE
                        Reduce Output Operator
-                         key expressions: _col0 (type: int), _col1 (type: double), _col2 (type: timestamp), _col3 (type: string), _col4 (type: boolean), _col5 (type: tinyint), _col6 (type: float), _col7 (type: timestamp), _col8 (type: smallint), _col9 (type: bigint)
-                         sort order: ++++++++++
+                         key expressions: _col0 (type: int), _col1 (type: double), _col2 (type: timestamp), _col3 (type: string), _col4 (type: boolean), _col5 (type: tinyint), _col6 (type: float), _col7 (type: timestamp), _col8 (type: smallint), _col9 (type: bigint), _col10 (type: bigint), _col11 (type: int), _col12 (type: double), _col13 (type: smallint), _col14 (type: smallint), _col15 (type: smallint), _col16 (type: double), _col17 (type: double), _col18 (type: float), _col19 (type: double), _col20 (type: double), _col21 (type: tinyint), _col22 (type: double)
+                         sort order: +++++++++++++++++++++++
                          Statistics: Num rows: 9898 Data size: 2128105 Basic stats: COMPLETE Column stats: NONE
-                         value expressions: _col10 (type: bigint), _col11 (type: int), _col12 (type: double), _col13 (type: smallint), _col14 (type: smallint), _col15 (type: smallint), _col16 (type: double), _col17 (type: double), _col18 (type: float), _col19 (type: double), _col20 (type: double), _col21 (type: tinyint), _col22 (type: double)
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: double), KEY.reducesinkkey2 (type: timestamp), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: boolean), KEY.reducesinkkey5 (type: tinyint), KEY.reducesinkkey6 (type: float), KEY.reducesinkkey7 (type: timestamp), KEY.reducesinkkey8 (type: smallint), KEY.reducesinkkey9 (type: bigint), VALUE._col0 (type: bigint), VALUE._col1 (type: int), VALUE._col2 (type: double), VALUE._col3 (type: smallint), VALUE._col4 (type: smallint), VALUE._col5 (type: smallint), VALUE._col6 (type: double), VALUE._col7 (type: double), VALUE._col8 (type: float), VALUE._col9 (type: double), VALUE._col10 (type: double), VALUE._col11 (type: tinyint), VALUE._col12 (type: double)
+                 expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: double), KEY.reducesinkkey2 (type: timestamp), KEY.reducesinkkey3 (type: string), KEY.reducesinkkey4 (type: boolean), KEY.reducesinkkey5 (type: tinyint), KEY.reducesinkkey6 (type: float), KEY.reducesinkkey7 (type: timestamp), KEY.reducesinkkey8 (type: smallint), KEY.reducesinkkey9 (type: bigint), KEY.reducesinkkey10 (type: bigint), KEY.reducesinkkey11 (type: int), KEY.reducesinkkey12 (type: double), KEY.reducesinkkey13 (type: smallint), KEY.reducesinkkey14 (type: smallint), KEY.reducesinkkey15 (type: smallint), KEY.reducesinkkey16 (type: double), KEY.reducesinkkey17 (type: double), KEY.reducesinkkey18 (type: float), KEY.reducesinkkey19 (type: double), KEY.reducesinkkey20 (type: double), KEY.reducesinkkey21 (type: tinyint), KEY.reducesinkkey22 (type: double)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22
                  Statistics: Num rows: 9898 Data size: 2128105 Basic stats: COMPLETE Column stats: NONE
                  Limit
@@@ -1197,20 -1200,18 +1200,19 @@@ STAGE PLANS
                      predicate: (((197.0 > UDFToDouble(ctinyint)) and (UDFToLong(cint) = cbigint)) or ((cbigint = 359) or ((cboolean1 < 0) or ((cstring1 like '%ss') and (cfloat <= UDFToFloat(ctinyint)))))) (type: boolean)
                      Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE
                      Select Operator
-                       expressions: cint (type: int), cbigint (type: bigint), (UDFToDouble(cint) / UDFToDouble(cbigint)) (type: double), (UDFToDouble(cbigint) % 79.553) (type: double), (- (UDFToDouble(cint) / UDFToDouble(cbigint))) (type: double), (10.175 % UDFToDouble(cfloat)) (type: double), (- cfloat) (type: float), (cfloat - (- cfloat)) (type: float), ((cfloat - (- cfloat)) % -6432.0) (type: float), (cdouble * UDFToDouble(csmallint)) (type: double), (- cdouble) (type: double), (- cbigint) (type: bigint), cstring1 (type: string), (UDFToDouble(cfloat) - (UDFToDouble(cint) / UDFToDouble(cbigint))) (type: double), (- csmallint) (type: smallint), (3569 % cbigint) (type: bigint), (359.0 - cdouble) (type: double), cboolean1 (type: boolean), cfloat (type: float), cdouble (type: double), ctimestamp2 (type: timestamp), csmallint (type: smallint), cstring2 (type: string), cboolean2 (type: boolean)
-                       outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col2, _col20, _col21, _col22, _col23, _col3, _col4, _col5, _col6, _col7, _col8, _col9
+                       expressions: cint (type: int), cbigint (type: bigint), cstring1 (type: string), cboolean1 (type: boolean), cfloat (type: float), cdouble (type: double), ctimestamp2 (type: timestamp), csmallint (type: smallint), cstring2 (type: string), cboolean2 (type: boolean), (UDFToDouble(cint) / UDFToDouble(cbigint)) (type: double), (UDFToDouble(cbigint) % 79.553) (type: double), (- (UDFToDouble(cint) / UDFToDouble(cbigint))) (type: double), (10.175 % UDFToDouble(cfloat)) (type: double), (- cfloat) (type: float), (cfloat - (- cfloat)) (type: float), ((cfloat - (- cfloat)) % -6432.0) (type: float), (cdouble * UDFToDouble(csmallint)) (type: double), (- cdouble) (type: double), (- cbigint) (type: bigint), (UDFToDouble(cfloat) - (UDFToDouble(cint) / UDFToDouble(cbigint))) (type: double), (- csmallint) (type: smallint), (3569 % cbigint) (type: bigint), (359.0 - cdouble) (type: double), (- csmallint) (type: smallint)
+                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24
                        Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE
                        Reduce Output Operator
-                         key expressions: _col0 (type: int), _col1 (type: bigint), _col2 (type: string), _col3 (type: boolean), _col4 (type: float), _col5 (type: double), _col6 (type: timestamp), _col7 (type: smallint), _col8 (type: string), _col9 (type: boolean)
-                         sort order: ++++++++++
+                         key expressions: _col0 (type: int), _col1 (type: bigint), _col2 (type: string), _col3 (type: boolean), _col4 (type: float), _col5 (type: double), _col6 (type: timestamp), _col7 (type: smallint), _col8 (type: string), _col9 (type: boolean), _col10 (type: double), _col11 (type: double), _col12 (type: double), _col13 (type: double), _col14 (type: float), _col15 (type: float), _col16 (type: float), _col17 (type: double), _col18 (type: double), _col19 (type: bigint), _col20 (type: double), _col21 (type: smallint), _col22 (type: bigint), _col23 (type: double), _col24 (type: smallint)
+                         sort order: +++++++++++++++++++++++++
                          Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE
-                         value expressions: _col10 (type: double), _col11 (type: double), _col12 (type: double), _col13 (type: double), _col14 (type: float), _col15 (type: float), _col16 (type: float), _col17 (type: double), _col18 (type: double), _col19 (type: bigint), _col20 (type: double), _col21 (type: smallint), _col22 (type: bigint), _col23 (type: double)
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: bigint), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: boolean), KEY.reducesinkkey4 (type: float), KEY.reducesinkkey5 (type: double), KEY.reducesinkkey6 (type: timestamp), KEY.reducesinkkey7 (type: smallint), KEY.reducesinkkey8 (type: string), KEY.reducesinkkey9 (type: boolean), VALUE._col0 (type: double), VALUE._col1 (type: double), VALUE._col2 (type: double), VALUE._col3 (type: double), VALUE._col4 (type: float), VALUE._col5 (type: float), VALUE._col6 (type: float), VALUE._col7 (type: double), VALUE._col8 (type: double), VALUE._col9 (type: bigint), VALUE._col10 (type: double), VALUE._col11 (type: smallint), VALUE._col12 (type: bigint), VALUE._col13 (type: double), VALUE._col11 (type: smallint)
+                 expressions: KEY.reducesinkkey0 (type: int), KEY.reducesinkkey1 (type: bigint), KEY.reducesinkkey2 (type: string), KEY.reducesinkkey3 (type: boolean), KEY.reducesinkkey4 (type: float), KEY.reducesinkkey5 (type: double), KEY.reducesinkkey6 (type: timestamp), KEY.reducesinkkey7 (type: smallint), KEY.reducesinkkey8 (type: string), KEY.reducesinkkey9 (type: boolean), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey11 (type: double), KEY.reducesinkkey12 (type: double), KEY.reducesinkkey13 (type: double), KEY.reducesinkkey14 (type: float), KEY.reducesinkkey15 (type: float), KEY.reducesinkkey16 (type: float), KEY.reducesinkkey17 (type: double), KEY.reducesinkkey18 (type: double), KEY.reducesinkkey19 (type: bigint), KEY.reducesinkkey20 (type: double), KEY.reducesinkkey21 (type: smallint), KEY.reducesinkkey22 (type: bigint), KEY.reducesinkkey23 (type: double), KEY.reducesinkkey21 (type: smallint)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24
                  Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE
                  Limit
@@@ -1409,16 -1411,15 +1411,16 @@@ STAGE PLANS
                        outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21
                        Statistics: Num rows: 10922 Data size: 2348269 Basic stats: COMPLETE Column stats: NONE
                        Reduce Output Operator
-                         key expressions: _col8 (type: boolean), _col1 (type: string), _col3 (type: timestamp), _col5 (type: float), _col6 (type: bigint), _col1 (type: string), _col4 (type: double), _col0 (type: int), _col7 (type: smallint), _col4 (type: double)
-                         sort order: ++++++++++
+                         key expressions: _col8 (type: boolean), _col1 (type: string), _col3 (type: timestamp), _col5 (type: float), _col6 (type: bigint), _col1 (type: string), _col4 (type: double), _col0 (type: int), _col7 (type: smallint), _col4 (type: double), _col9 (type: int), _col10 (type: bigint), _col11 (type: bigint), _col12 (type: float), _col13 (type: bigint), _col14 (type: double), _col15 (type: double), _col16 (type: bigint), _col17 (type: double), _col18 (type: double), _col19 (type: double), _col20 (type: smallint), _col21 (type: int)
+                         sort order: +++++++++++++++++++++++
                          Statistics: Num rows: 10922 Data size: 2348269 Basic stats: COMPLETE Column stats: NONE
-                         value expressions: _col2 (type: boolean), _col9 (type: int), _col10 (type: bigint), _col11 (type: bigint), _col12 (type: float), _col13 (type: bigint), _col14 (type: double), _col15 (type: double), _col16 (type: bigint), _col17 (type: double), _col18 (type: double), _col19 (type: double), _col20 (type: smallint), _col21 (type: int)
+                         value expressions: _col2 (type: boolean)
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey7 (type: int), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: boolean), KEY.reducesinkkey2 (type: timestamp), KEY.reducesinkkey6 (type: double), KEY.reducesinkkey3 (type: float), KEY.reducesinkkey4 (type: bigint), KEY.reducesinkkey8 (type: smallint), KEY.reducesinkkey0 (type: boolean), VALUE._col1 (type: int), VALUE._col2 (type: bigint), VALUE._col3 (type: bigint), VALUE._col4 (type: float), VALUE._col5 (type: bigint), VALUE._col6 (type: double), VALUE._col7 (type: double), VALUE._col8 (type: bigint), VALUE._col9 (type: double), VALUE._col10 (type: double), VALUE._col11 (type: double), VALUE._col12 (type: smallint), VALUE._col13 (type: int)
+                 expressions: KEY.reducesinkkey7 (type: int), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: boolean), KEY.reducesinkkey2 (type: timestamp), KEY.reducesinkkey6 (type: double), KEY.reducesinkkey3 (type: float), KEY.reducesinkkey4 (type: bigint), KEY.reducesinkkey8 (type: smallint), KEY.reducesinkkey0 (type: boolean), KEY.reducesinkkey10 (type: int), KEY.reducesinkkey11 (type: bigint), KEY.reducesinkkey12 (type: bigint), KEY.reducesinkkey13 (type: float), KEY.reducesinkkey14 (type: bigint), KEY.reducesinkkey15 (type: double), KEY.reducesinkkey16 (type: double), KEY.reducesinkkey17 (type: bigint), KEY.reducesinkkey18 (type: double), KEY.reducesinkkey19 (type: double), KEY.reducesinkkey20 (type: double), KEY.reducesinkkey21 (type: smallint), KEY.reducesinkkey22 (type: int)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21
                  Statistics: Num rows: 10922 Data size: 2348269 Basic stats: COMPLETE Column stats: NONE
                  Limit
@@@ -1671,20 -1673,19 +1673,20 @@@ STAGE PLANS
                      predicate: (((-1.389 >= UDFToDouble(cint)) and ((csmallint < UDFToShort(ctinyint)) and (-6432 > UDFToInteger(csmallint)))) or (((cdouble >= UDFToDouble(cfloat)) and (cstring2 <= 'a')) or ((cstring1 like 'ss%') and (10.175 > UDFToDouble(cbigint))))) (type: boolean)
                      Statistics: Num rows: 3868 Data size: 831633 Basic stats: COMPLETE Column stats: NONE
                      Select Operator
-                       expressions: ctimestamp1 (type: timestamp), cstring2 (type: string), (cdouble * 10.175) (type: double), (UDFToDouble((-6432.0 * cfloat)) / UDFToDouble(cfloat)) (type: double), (- cfloat) (type: float), (cint % UDFToInteger(csmallint)) (type: int), (cdouble * (- cdouble)) (type: double), cdouble (type: double), cfloat (type: float), cbigint (type: bigint), csmallint (type: smallint), (UDFToDouble(cbigint) / 3569.0) (type: double), (-257 - UDFToInteger(csmallint)) (type: int), (-6432.0 * cfloat) (type: float), (- cdouble) (type: double)
-                       outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col13, _col15, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
+                       expressions: ctimestamp1 (type: timestamp), cstring2 (type: string), cdouble (type: double), cfloat (type: float), cbigint (type: bigint), csmallint (type: smallint), (UDFToDouble(cbigint) / 3569.0) (type: double), (-257 - UDFToInteger(csmallint)) (type: int), (-6432.0 * cfloat) (type: float), (- cdouble) (type: double), (cdouble * 10.175) (type: double), (UDFToDouble((-6432.0 * cfloat)) / UDFToDouble(cfloat)) (type: double), (- cfloat) (type: float), (cint % UDFToInteger(csmallint)) (type: int), (- cdouble) (type: double), (cdouble * (- cdouble)) (type: double)
+                       outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15
                        Statistics: Num rows: 3868 Data size: 831633 Basic stats: COMPLETE Column stats: NONE
                        Reduce Output Operator
-                         key expressions: _col5 (type: smallint), _col1 (type: string), _col2 (type: double)
-                         sort order: +++
+                         key expressions: _col5 (type: smallint), _col1 (type: string), _col2 (type: double), _col3 (type: float), _col4 (type: bigint), _col6 (type: double), _col7 (type: int), _col8 (type: float), _col9 (type: double), _col10 (type: double), _col11 (type: double), _col12 (type: float), _col13 (type: int), _col14 (type: double), _col15 (type: double)
+                         sort order: +++++++++++++++
                          Statistics: Num rows: 3868 Data size: 831633 Basic stats: COMPLETE Column stats: NONE
-                         value expressions: _col0 (type: timestamp), _col3 (type: float), _col4 (type: bigint), _col6 (type: double), _col7 (type: int), _col8 (type: float), _col9 (type: double), _col10 (type: double), _col11 (type: double), _col12 (type: float), _col13 (type: int), _col15 (type: double)
+                         value expressions: _col0 (type: timestamp)
              Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: VALUE._col0 (type: timestamp), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: double), VALUE._col1 (type: float), VALUE._col2 (type: bigint), KEY.reducesinkkey0 (type: smallint), VALUE._col3 (type: double), VALUE._col4 (type: int), VALUE._col5 (type: float), VALUE._col6 (type: double), VALUE._col7 (type: double), VALUE._col8 (type: double), VALUE._col9 (type: float), VALUE._col10 (type: int), VALUE._col6 (type: double), VALUE._col11 (type: double)
+                 expressions: VALUE._col0 (type: timestamp), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: double), KEY.reducesinkkey3 (type: float), KEY.reducesinkkey4 (type: bigint), KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey5 (type: double), KEY.reducesinkkey6 (type: int), KEY.reducesinkkey7 (type: float), KEY.reducesinkkey8 (type: double), KEY.reducesinkkey9 (type: double), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey11 (type: float), KEY.reducesinkkey12 (type: int), KEY.reducesinkkey8 (type: double), KEY.reducesinkkey14 (type: double)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15
                  Statistics: Num rows: 3868 Data size: 831633 Basic stats: COMPLETE Column stats: NONE
                  Limit
@@@ -1908,15 -1910,13 +1910,14 @@@ STAGE PLANS
                    outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
                    Statistics: Num rows: 1251 Data size: 268968 Basic stats: COMPLETE Column stats: NONE
                    Reduce Output Operator
-                     key expressions: _col0 (type: smallint)
-                     sort order: +
+                     key expressions: _col0 (type: smallint), _col1 (type: int), _col2 (type: double), _col3 (type: double), _col4 (type: bigint), _col5 (type: double), _col6 (type: int), _col7 (type: double), _col8 (type: int), _col9 (type: bigint), _col10 (type: bigint)
+                     sort order: +++++++++++
                      Statistics: Num rows: 1251 Data size: 268968 Basic stats: COMPLETE Column stats: NONE
-                     value expressions: _col1 (type: int), _col2 (type: double), _col3 (type: double), _col4 (type: bigint), _col5 (type: double), _col6 (type: int), _col7 (type: double), _col8 (type: int), _col9 (type: bigint), _col10 (type: bigint)
          Reducer 3 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: smallint), VALUE._col0 (type: int), VALUE._col1 (type: double), VALUE._col2 (type: double), VALUE._col3 (type: bigint), VALUE._col4 (type: double), VALUE._col5 (type: int), VALUE._col6 (type: double), VALUE._col7 (type: int), VALUE._col8 (type: bigint), VALUE._col9 (type: bigint)
+                 expressions: KEY.reducesinkkey0 (type: smallint), KEY.reducesinkkey1 (type: int), KEY.reducesinkkey2 (type: double), KEY.reducesinkkey3 (type: double), KEY.reducesinkkey4 (type: bigint), KEY.reducesinkkey5 (type: double), KEY.reducesinkkey6 (type: int), KEY.reducesinkkey7 (type: double), KEY.reducesinkkey8 (type: int), KEY.reducesinkkey9 (type: bigint), KEY.reducesinkkey10 (type: bigint)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
                  Statistics: Num rows: 1251 Data size: 268968 Basic stats: COMPLETE Column stats: NONE
                  Limit
@@@ -2367,19 -2368,17 +2368,18 @@@ STAGE PLANS
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14
                  Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE
                  Select Operator
-                   expressions: _col0 (type: timestamp), _col1 (type: string), ((-26.28 - _col2) * (- _col2)) (type: double), _col5 (type: tinyint), (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4))) (type: double), (- (_col2 * 10.175)) (type: double), _col6 (type: double), (_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) (type: double), (- (- _col2)) (type: double), (UDFToDouble((- _col4)) / _col2) (type: double), _col7 (type: double), (10.175 / _col3) (type: double), _col2 (type: double), _col8 (type: double), _col9 (type: double), ((_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) - (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) (type: double), (- (- (_col2 * 10.175))) (type: double), _col10 (type: double), (((_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) - (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) * 10.175) (type: double), (10.175 % (10.175 / _col3)) (type: double), (- _col5) (type: tin
 yint), _col11 (type: double), _col12 (type: double), (_col2 * 10.175) (type: double), (- ((-26.28 - _col2) * (- _col2))) (type: double), ((- _col2) % _col10) (type: double), (-26.28 / UDFToDouble((- _col5))) (type: double), _col13 (type: double), _col14 (type: bigint), ((_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) / _col7) (type: double), (- (- _col4)) (type: bigint), ((_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) % -26.28) (type: double), (- _col2) (type: double), _col3 (type: double), (-26.28 - _col2) (type: double), _col4 (type: bigint), (- _col4) (type: bigint)
-                   outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col2, _col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27, _col28, _col29, _col3, _col30, _col31, _col32, _col33, _col34, _col35, _col36, _col38, _col4, _col5, _col7, _col8, _col9
+                   expressions: _col0 (type: timestamp), _col1 (type: string), _col2 (type: double), (_col2 * 10.175) (type: double), (- _col2) (type: double), _col3 (type: double), (- _col2) (type: double), (-26.28 - _col2) (type: double), _col4 (type: bigint), (- _col4) (type: bigint), ((-26.28 - _col2) * (- _col2)) (type: double), _col5 (type: tinyint), (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4))) (type: double), (- (_col2 * 10.175)) (type: double), _col6 (type: double), (_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) (type: double), (- (- _col2)) (type: double), (UDFToDouble((- _col4)) / _col2) (type: double), _col7 (type: double), (10.175 / _col3) (type: double), _col8 (type: double), _col9 (type: double), ((_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) - (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) (type: double), (- (- (_col2 * 10.175))) (type: double), _col10 (type: double), (((_col6 + (((-26.28 - _col2) * (
 - _col2)) * UDFToDouble((- _col4)))) - (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) * 10.175) (type: double), (10.175 % (10.175 / _col3)) (type: double), (- _col5) (type: tinyint), _col11 (type: double), _col12 (type: double), (- ((-26.28 - _col2) * (- _col2))) (type: double), ((- _col2) % _col10) (type: double), (-26.28 / UDFToDouble((- _col5))) (type: double), _col13 (type: double), _col14 (type: bigint), ((_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) / _col7) (type: double), (- (- _col4)) (type: bigint), _col4 (type: bigint), ((_col6 + (((-26.28 - _col2) * (- _col2)) * UDFToDouble((- _col4)))) % -26.28) (type: double)
+                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27, _col28, _col29, _col30, _col31, _col32, _col33, _col34, _col35, _col36, _col37, _col38
                    Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE
                    Reduce Output Operator
-                     key expressions: _col0 (type: timestamp), _col1 (type: string)
-                     sort order: ++
+                     key expressions: _col0 (type: timestamp), _col1 (type: string), _col2 (type: double), _col3 (type: double), _col4 (type: double), _col5 (type: double), _col6 (type: double), _col7 (type: double), _col8 (type: bigint), _col9 (type: bigint), _col10 (type: double), _col11 (type: tinyint), _col12 (type: double), _col13 (type: double), _col14 (type: double), _col15 (type: double), _col16 (type: double), _col17 (type: double), _col18 (type: double), _col19 (type: double), _col20 (type: double), _col21 (type: double), _col22 (type: double), _col23 (type: double), _col24 (type: double), _col25 (type: double), _col26 (type: double), _col27 (type: tinyint), _col28 (type: double), _col29 (type: double), _col30 (type: double), _col31 (type: double), _col32 (type: double), _col33 (type: double), _col34 (type: bigint), _col35 (type: double), _col36 (type: bigint), _col37 (type: bigint), _col38 (type: double)
+                     sort order: +++++++++++++++++++++++++++++++++++++++
                      Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE
-                     value expressions: _col2 (type: double), _col3 (type: double), _col4 (type: double), _col5 (type: double), _col7 (type: double), _col8 (type: bigint), _col9 (type: bigint), _col10 (type: double), _col11 (type: tinyint), _col12 (type: double), _col13 (type: double), _col14 (type: double), _col15 (type: double), _col16 (type: double), _col17 (type: double), _col18 (type: double), _col19 (type: double), _col20 (type: double), _col21 (type: double), _col22 (type: double), _col23 (type: double), _col24 (type: double), _col25 (type: double), _col26 (type: double), _col27 (type: tinyint), _col28 (type: double), _col29 (type: double), _col30 (type: double), _col31 (type: double), _col32 (type: double), _col33 (type: double), _col34 (type: bigint), _col35 (type: double), _col36 (type: bigint), _col38 (type: double)
          Reducer 3 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Select Operator
-                 expressions: KEY.reducesinkkey0 (type: timestamp), KEY.reducesinkkey1 (type: string), VALUE._col0 (type: double), VALUE._col1 (type: double), VALUE._col2 (type: double), VALUE._col3 (type: double), VALUE._col2 (type: double), VALUE._col4 (type: double), VALUE._col5 (type: bigint), VALUE._col6 (type: bigint), VALUE._col7 (type: double), VALUE._col8 (type: tinyint), VALUE._col9 (type: double), VALUE._col10 (type: double), VALUE._col11 (type: double), VALUE._col12 (type: double), VALUE._col13 (type: double), VALUE._col14 (type: double), VALUE._col15 (type: double), VALUE._col16 (type: double), VALUE._col17 (type: double), VALUE._col18 (type: double), VALUE._col19 (type: double), VALUE._col20 (type: double), VALUE._col21 (type: double), VALUE._col22 (type: double), VALUE._col23 (type: double), VALUE._col24 (type: tinyint), VALUE._col25 (type: double), VALUE._col26 (type: double), VALUE._col27 (type: double), VALUE._col28 (type: double), VALUE._col29 (type: double), VALU
 E._col30 (type: double), VALUE._col31 (type: bigint), VALUE._col32 (type: double), VALUE._col33 (type: bigint), VALUE._col5 (type: bigint), VALUE._col34 (type: double)
+                 expressions: KEY.reducesinkkey0 (type: timestamp), KEY.reducesinkkey1 (type: string), KEY.reducesinkkey2 (type: double), KEY.reducesinkkey3 (type: double), KEY.reducesinkkey4 (type: double), KEY.reducesinkkey5 (type: double), KEY.reducesinkkey4 (type: double), KEY.reducesinkkey7 (type: double), KEY.reducesinkkey8 (type: bigint), KEY.reducesinkkey9 (type: bigint), KEY.reducesinkkey10 (type: double), KEY.reducesinkkey11 (type: tinyint), KEY.reducesinkkey12 (type: double), KEY.reducesinkkey13 (type: double), KEY.reducesinkkey14 (type: double), KEY.reducesinkkey15 (type: double), KEY.reducesinkkey16 (type: double), KEY.reducesinkkey17 (type: double), KEY.reducesinkkey18 (type: double), KEY.reducesinkkey19 (type: double), KEY.reducesinkkey20 (type: double), KEY.reducesinkkey21 (type: double), KEY.reducesinkkey22 (type: double), KEY.reducesinkkey23 (type: double), KEY.reducesinkkey24 (type: double), KEY.reducesinkkey25 (type: double), KEY.reducesinkkey26 (type: double), K
 EY.reducesinkkey27 (type: tinyint), KEY.reducesinkkey28 (type: double), KEY.reducesinkkey29 (type: double), KEY.reducesinkkey30 (type: double), KEY.reducesinkkey31 (type: double), KEY.reducesinkkey32 (type: double), KEY.reducesinkkey33 (type: double), KEY.reducesinkkey34 (type: bigint), KEY.reducesinkkey35 (type: double), KEY.reducesinkkey36 (type: bigint), KEY.reducesinkkey8 (type: bigint), KEY.reducesinkkey38 (type: double)
                  outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17, _col18, _col19, _col20, _col21, _col22, _col23, _col24, _col25, _col26, _col27, _col28, _col29, _col30, _col31, _col32, _col33, _col34, _col35, _col36, _col37, _col38
                  Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE
                  Limit

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vectorized_date_funcs.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vectorized_distinct_gby.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out
----------------------------------------------------------------------
diff --cc ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out
index 4b07bfb,b253508..55a1c4b
--- a/ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out
+++ b/ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out
@@@ -3277,8 -3281,8 +3281,9 @@@ STAGE PLANS
                            Statistics: Num rows: 2 Data size: 168 Basic stats: COMPLETE Column stats: NONE
                            Target column: ds
                            Target Vertex: Map 5
+             Execution mode: vectorized
          Reducer 2 
 +            Execution mode: vectorized
              Reduce Operator Tree:
                Group By Operator
                  keys: KEY._col0 (type: string)

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/vector_outer_join1.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/vector_outer_join2.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/vector_outer_join3.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/ql/src/test/results/clientpositive/vector_outer_join4.q.out
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/serde/src/java/org/apache/hadoop/hive/serde2/ColumnProjectionUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
----------------------------------------------------------------------
diff --cc service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
index 5f786d2,2b5f645..2036c2a
--- a/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
+++ b/service/src/java/org/apache/hive/service/cli/session/HiveSessionImplwithUGI.java
@@@ -40,12 -41,11 +42,12 @@@ import org.apache.hive.service.cli.thri
   */
  public class HiveSessionImplwithUGI extends HiveSessionImpl {
    public static final String HS2TOKEN = "HiveServer2ImpersonationToken";
 +  static final Log LOG = LogFactory.getLog(HiveSessionImplwithUGI.class);
  
    private UserGroupInformation sessionUgi = null;
-   private String delegationTokenStr = null;
+   private String hmsDelegationTokenStr = null;
    private HiveSession proxySession = null;
 -  static final Log LOG = LogFactory.getLog(HiveSessionImplwithUGI.class);
 +
  
    public HiveSessionImplwithUGI(TProtocolVersion protocol, String username, String password,
        HiveConf hiveConf, String ipAddress, String delegationToken) throws HiveSQLException {

http://git-wip-us.apache.org/repos/asf/hive/blob/da1e0cf2/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
----------------------------------------------------------------------