hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1617195 [1/2] - in /hive/trunk/ql/src: java/org/apache/hadoop/hive/ql/exec/vector/ java/org/apache/hadoop/hive/ql/exec/vector/expressions/ java/org/apache/hadoop/hive/ql/optimizer/ java/org/apache/hadoop/hive/ql/optimizer/physical/ test/or...
Date Mon, 11 Aug 2014 02:58:35 GMT
Author: hashutosh
Date: Mon Aug 11 02:58:34 2014
New Revision: 1617195

URL: http://svn.apache.org/r1617195
Log:
HIVE-6959 : Enable Constant propagation optimizer for Hive Vectorization (Hari Sankar via Ashutosh Chauhan)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
    hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
    hive/trunk/ql/src/test/queries/clientpositive/vector_coalesce.q
    hive/trunk/ql/src/test/results/clientpositive/tez/vector_cast_constant.q.out
    hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_14.q.out
    hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_15.q.out
    hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_9.q.out
    hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_between_in.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_cast_constant.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_coalesce.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_decimal_mapjoin.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_decimal_math_funcs.q.out
    hive/trunk/ql/src/test/results/clientpositive/vector_elt.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorization_14.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorization_15.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorization_16.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorization_9.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorization_div0.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorization_short_regress.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorized_math_funcs.q.out
    hive/trunk/ql/src/test/results/clientpositive/vectorized_parquet.q.out

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java Mon Aug 11 02:58:34 2014
@@ -80,6 +80,7 @@ import org.apache.hadoop.hive.ql.plan.Ex
 import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc;
 import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
 import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc;
+import org.apache.hadoop.hive.ql.plan.ExprNodeNullDesc;
 import org.apache.hadoop.hive.ql.udf.SettableUDF;
 import org.apache.hadoop.hive.ql.udf.UDFConv;
 import org.apache.hadoop.hive.ql.udf.UDFHex;
@@ -323,10 +324,12 @@ public class VectorizationContext {
         ve = getGenericUdfVectorExpression(expr.getGenericUDF(),
             childExpressions, mode, exprDesc.getTypeInfo());
       }
+    } else if (exprDesc instanceof ExprNodeNullDesc) {
+    	ve = getConstantVectorExpression(null, exprDesc.getTypeInfo(), mode);
     } else if (exprDesc instanceof ExprNodeConstantDesc) {
       ve = getConstantVectorExpression(((ExprNodeConstantDesc) exprDesc).getValue(), exprDesc.getTypeInfo(),
           mode);
-    }
+    } 
     if (ve == null) {
       throw new HiveException("Could not vectorize expression: "+exprDesc.getName());
     }
@@ -410,8 +413,8 @@ public class VectorizationContext {
         }
       }
     } else {
-      for (ExprNodeDesc child : children) {
-        ExprNodeDesc castExpression = getImplicitCastExpression(genericUDF, child, commonType);
+      for (ExprNodeDesc child : children) {    	
+    	ExprNodeDesc castExpression = getImplicitCastExpression(genericUDF, child, commonType);
         if (castExpression != null) {
           atleastOneCastNeeded = true;
           childrenWithCasts.add(castExpression);
@@ -652,69 +655,70 @@ public class VectorizationContext {
   }
 
   /**
-   * Handles only the special case of unary operators on a constant.
+   * Handles only the special cases of cast/+ve/-ve operator on a constant.
    * @param exprDesc
-   * @return The same expression if no folding done, else return the constant
+   * @return The same expression if no evaluation done, else return the constant
    *         expression.
    * @throws HiveException
    */
-  ExprNodeDesc foldConstantsForUnaryExpression(ExprNodeDesc exprDesc) throws HiveException {
-    if (!(exprDesc instanceof ExprNodeGenericFuncDesc)) {
-      return exprDesc;
-    }
-    
-    if (exprDesc.getChildren() == null || (exprDesc.getChildren().size() != 1) ) {
-      return exprDesc;
-    }
-
-    ExprNodeConstantDesc foldedChild = null;
-    if (!( exprDesc.getChildren().get(0) instanceof ExprNodeConstantDesc)) {
-
-      // try recursive folding
-      ExprNodeDesc expr = foldConstantsForUnaryExpression(exprDesc.getChildren().get(0));
-      if (expr instanceof ExprNodeConstantDesc) {
-        foldedChild = (ExprNodeConstantDesc) expr;
-      }
-    } else {
-      foldedChild = (ExprNodeConstantDesc) exprDesc.getChildren().get(0);
-    }
-
-    if (foldedChild == null) {
-      return exprDesc;
-    }
-
-    ObjectInspector childoi = foldedChild.getWritableObjectInspector();
-    GenericUDF gudf = ((ExprNodeGenericFuncDesc) exprDesc).getGenericUDF();
-
-    if (gudf instanceof GenericUDFOPNegative || gudf instanceof GenericUDFOPPositive
-        || castExpressionUdfs.contains(gudf.getClass())
-        || ((gudf instanceof GenericUDFBridge)
-            && castExpressionUdfs.contains(((GenericUDFBridge) gudf).getUdfClass()))) {
-      ExprNodeEvaluator<?> evaluator = ExprNodeEvaluatorFactory.get(exprDesc);
-      ObjectInspector output = evaluator.initialize(childoi);
-      Object constant = evaluator.evaluate(null);
-      Object java = ObjectInspectorUtils.copyToStandardJavaObject(constant, output);  
-      return new ExprNodeConstantDesc(exprDesc.getTypeInfo(), java);
-     }
-
-    return exprDesc;
+  ExprNodeDesc evaluateCastOnConstants(ExprNodeDesc exprDesc) throws HiveException {
+	  if (!(exprDesc instanceof ExprNodeGenericFuncDesc)) {
+		  return exprDesc;
+	  }
+      
+	  if (exprDesc.getChildren() == null || (exprDesc.getChildren().size() != 1) ) {
+		  return exprDesc;
+	  }
+  
+	  ExprNodeConstantDesc foldedChild = null;
+	  if (!( exprDesc.getChildren().get(0) instanceof ExprNodeConstantDesc)) {
+		  
+		  // try recursive folding
+		  ExprNodeDesc expr = evaluateCastOnConstants(exprDesc.getChildren().get(0));
+		  if (expr instanceof ExprNodeConstantDesc) {
+			  foldedChild = (ExprNodeConstantDesc) expr;
+		  }
+	  } else {
+		  foldedChild = (ExprNodeConstantDesc) exprDesc.getChildren().get(0);
+	  }
+  
+	  if (foldedChild == null) {
+		  return exprDesc;
+	  }
+  
+	  ObjectInspector childoi = foldedChild.getWritableObjectInspector();
+	  GenericUDF gudf = ((ExprNodeGenericFuncDesc) exprDesc).getGenericUDF();
+      
+	  // Only evaluate +ve/-ve or cast on constant or recursive casting.
+	  if (gudf instanceof GenericUDFOPNegative || gudf instanceof GenericUDFOPPositive ||
+			  castExpressionUdfs.contains(gudf.getClass())
+			  || ((gudf instanceof GenericUDFBridge)
+					  && castExpressionUdfs.contains(((GenericUDFBridge) gudf).getUdfClass()))) {
+		  ExprNodeEvaluator<?> evaluator = ExprNodeEvaluatorFactory.get(exprDesc);
+		  ObjectInspector output = evaluator.initialize(childoi);
+		  Object constant = evaluator.evaluate(null);
+		  Object java = ObjectInspectorUtils.copyToStandardJavaObject(constant, output);  
+		  return new ExprNodeConstantDesc(exprDesc.getTypeInfo(), java);
+	  }
+  
+	  return exprDesc;
   }
-
-  /* Fold simple unary expressions in all members of the input list and return new list
+  
+  /* For cast on constant operator in all members of the input list and return new list
    * containing results.
    */
-  private List<ExprNodeDesc> foldConstantsForUnaryExprs(List<ExprNodeDesc> childExpr)
-      throws HiveException {
-    List<ExprNodeDesc> constantFoldedChildren = new ArrayList<ExprNodeDesc>();
-    if (childExpr != null) {
-      for (ExprNodeDesc expr : childExpr) {
-        expr = this.foldConstantsForUnaryExpression(expr);
-        constantFoldedChildren.add(expr);
-      }
-    }
-    return constantFoldedChildren;
+  private List<ExprNodeDesc> evaluateCastOnConstants(List<ExprNodeDesc> childExpr)
+		  throws HiveException {
+	  List<ExprNodeDesc> evaluatedChildren = new ArrayList<ExprNodeDesc>();
+	  if (childExpr != null) {
+        for (ExprNodeDesc expr : childExpr) {
+        	expr = this.evaluateCastOnConstants(expr);
+        	evaluatedChildren.add(expr);
+        }
+	  }
+	  return evaluatedChildren;
   }
-
+      
   private VectorExpression getConstantVectorExpression(Object constantValue, TypeInfo typeInfo,
       Mode mode) throws HiveException {
     String type =  typeInfo.getTypeName();
@@ -903,8 +907,9 @@ public class VectorizationContext {
   private VectorExpression getGenericUdfVectorExpression(GenericUDF udf,
       List<ExprNodeDesc> childExpr, Mode mode, TypeInfo returnType) throws HiveException {
 
-    List<ExprNodeDesc> constantFoldedChildren = foldConstantsForUnaryExprs(childExpr);
-    childExpr = constantFoldedChildren;
+	List<ExprNodeDesc> castedChildren = evaluateCastOnConstants(childExpr);
+	childExpr = castedChildren;	  
+	  
     //First handle special cases
     if (udf instanceof GenericUDFBetween) {
       return getBetweenFilterExpression(childExpr, mode, returnType);
@@ -928,15 +933,15 @@ public class VectorizationContext {
       }
     } else if (udf instanceof GenericUDFToDecimal) {
       return getCastToDecimal(childExpr, returnType);
-    }
-
+    } 
+    
     // Now do a general lookup
     Class<?> udfClass = udf.getClass();
     if (udf instanceof GenericUDFBridge) {
       udfClass = ((GenericUDFBridge) udf).getUdfClass();
     }
 
-    VectorExpression ve = getVectorExpressionForUdf(udfClass, constantFoldedChildren, mode, returnType);
+    VectorExpression ve = getVectorExpressionForUdf(udfClass, castedChildren, mode, returnType);
 
     if (ve == null) {
       throw new HiveException("Udf: "+udf.getClass().getSimpleName()+", is not supported");
@@ -998,7 +1003,7 @@ public class VectorizationContext {
       }
     }
   }
-
+      
   /**
    * Create a filter or boolean-valued expression for column IN ( <list-of-constants> )
    */
@@ -1006,13 +1011,11 @@ public class VectorizationContext {
       throws HiveException {
     ExprNodeDesc colExpr = childExpr.get(0);
 
-    TypeInfo colTypeInfo = colExpr.getTypeInfo();
     String colType = colExpr.getTypeString();
 
     // prepare arguments for createVectorExpression
-    List<ExprNodeDesc> childrenForInList =
-        foldConstantsForUnaryExprs(childExpr.subList(1, childExpr.size()));
-
+    List<ExprNodeDesc> childrenForInList =  evaluateCastOnConstants(childExpr.subList(1, childExpr.size()));	
+    
     /* This method assumes that the IN list has no NULL entries. That is enforced elsewhere,
      * in the Vectorizer class. If NULL is passed in as a list entry, behavior is not defined.
      * If in the future, NULL values are allowed in the IN list, be sure to handle 3-valued
@@ -1107,16 +1110,116 @@ public class VectorizationContext {
       return getCastToString(childExpr, returnType);
     }
     return null;
-  }
-
+  } 
+  
+  private Decimal128 castConstantToDecimal(Object scalar, TypeInfo type) throws HiveException {
+	  PrimitiveTypeInfo ptinfo = (PrimitiveTypeInfo) type;
+	  String typename = type.getTypeName();
+	  Decimal128 d = new Decimal128();
+	  int scale = HiveDecimalUtils.getScaleForType(ptinfo);
+	  switch (ptinfo.getPrimitiveCategory()) {
+	  case FLOAT:
+		  float floatVal = ((Float) scalar).floatValue();
+		  d.update(floatVal, (short) scale);
+		  break;
+	  case DOUBLE:
+		  double doubleVal = ((Double) scalar).doubleValue();
+		  d.update(doubleVal, (short) scale);
+		  break;
+	  case BYTE:
+		  byte byteVal = ((Byte) scalar).byteValue();
+		  d.update(byteVal, (short) scale);
+		  break;
+	  case SHORT:
+		  short shortVal = ((Short) scalar).shortValue();
+		  d.update(shortVal, (short) scale);
+		  break;
+	  case INT:
+		  int intVal = ((Integer) scalar).intValue();
+		  d.update(intVal, (short) scale);
+		  break;
+	  case LONG:
+		  long longVal = ((Long) scalar).longValue();
+		  d.update(longVal, (short) scale);
+		  break;
+	  case DECIMAL:
+		  HiveDecimal decimalVal = (HiveDecimal) scalar;
+		  d.update(decimalVal.unscaledValue(), (short) scale);
+		  break;
+	  default:
+		  throw new HiveException("Unsupported type "+typename+" for cast to Decimal128");
+	  }
+	  return d;
+  }
+
+  private String castConstantToString(Object scalar, TypeInfo type) throws HiveException {
+	  PrimitiveTypeInfo ptinfo = (PrimitiveTypeInfo) type;
+	  String typename = type.getTypeName();
+	  switch (ptinfo.getPrimitiveCategory()) {
+	  case FLOAT:
+	  case DOUBLE:
+	  case BYTE:
+	  case SHORT:
+	  case INT:
+	  case LONG:
+		  return ((Number) scalar).toString();
+	  case DECIMAL:
+		  HiveDecimal decimalVal = (HiveDecimal) scalar;
+		  return decimalVal.toString();
+	  default:
+		  throw new HiveException("Unsupported type "+typename+" for cast to String");
+	  }
+  }
+
+  private Double castConstantToDouble(Object scalar, TypeInfo type) throws HiveException {
+	  PrimitiveTypeInfo ptinfo = (PrimitiveTypeInfo) type;
+	  String typename = type.getTypeName();
+	  switch (ptinfo.getPrimitiveCategory()) {
+	  case FLOAT:
+	  case DOUBLE:
+	  case BYTE:
+	  case SHORT:
+	  case INT:
+	  case LONG:
+		  return ((Number) scalar).doubleValue();
+	  case DECIMAL:
+		  HiveDecimal decimalVal = (HiveDecimal) scalar;
+		  return decimalVal.doubleValue();
+	  default:
+		  throw new HiveException("Unsupported type "+typename+" for cast to Double");
+	  }
+  }  
+
+  private Long castConstantToLong(Object scalar, TypeInfo type) throws HiveException {
+	  PrimitiveTypeInfo ptinfo = (PrimitiveTypeInfo) type;
+	  String typename = type.getTypeName();
+	  switch (ptinfo.getPrimitiveCategory()) {
+	  case FLOAT:
+	  case DOUBLE:
+	  case BYTE:
+	  case SHORT:
+	  case INT:
+	  case LONG:
+		  return ((Number) scalar).longValue();
+	  case DECIMAL:
+		  HiveDecimal decimalVal = (HiveDecimal) scalar;
+		  return decimalVal.longValue();
+	  default:
+		  throw new HiveException("Unsupported type "+typename+" for cast to Long");
+	  }
+  }    
+  
   private VectorExpression getCastToDecimal(List<ExprNodeDesc> childExpr, TypeInfo returnType)
       throws HiveException {
     ExprNodeDesc child = childExpr.get(0);
     String inputType = childExpr.get(0).getTypeString();
     if (child instanceof ExprNodeConstantDesc) {
-      // Don't do constant folding here.  Wait until the optimizer is changed to do it.
-      // Family of related JIRAs: HIVE-7421, HIVE-7422, and HIVE-7424.
-      return null;
+     // Return a constant vector expression
+      Object constantValue = ((ExprNodeConstantDesc) child).getValue();
+      Decimal128 decimalValue = castConstantToDecimal(constantValue, child.getTypeInfo());
+      return getConstantVectorExpression(decimalValue, returnType, Mode.PROJECTION);    	
+    } else if (child instanceof ExprNodeNullDesc) {
+    	return getConstantVectorExpression(null, returnType, Mode.PROJECTION); 
     }
     if (isIntFamily(inputType)) {
       return createVectorExpression(CastLongToDecimal.class, childExpr, Mode.PROJECTION, returnType);
@@ -1131,16 +1234,19 @@ public class VectorizationContext {
       return createVectorExpression(CastTimestampToDecimal.class, childExpr, Mode.PROJECTION, returnType);
     }
     throw new HiveException("Unhandled cast input type: " + inputType);
-  }
-
+  }  
+  
   private VectorExpression getCastToString(List<ExprNodeDesc> childExpr, TypeInfo returnType)
       throws HiveException {
     ExprNodeDesc child = childExpr.get(0);
     String inputType = childExpr.get(0).getTypeString();
     if (child instanceof ExprNodeConstantDesc) {
-      // Don't do constant folding here.  Wait until the optimizer is changed to do it.
-      // Family of related JIRAs: HIVE-7421, HIVE-7422, and HIVE-7424.
-      return null;
+        // Return a constant vector expression
+        Object constantValue = ((ExprNodeConstantDesc) child).getValue();
+        String strValue = castConstantToString(constantValue, child.getTypeInfo());
+        return getConstantVectorExpression(strValue, returnType, Mode.PROJECTION); 
+    } else if (child instanceof ExprNodeNullDesc) {
+    	return getConstantVectorExpression(null, returnType, Mode.PROJECTION); 
     }
     if (inputType.equals("boolean")) {
       // Boolean must come before the integer family. It's a special case.
@@ -1164,9 +1270,12 @@ public class VectorizationContext {
     ExprNodeDesc child = childExpr.get(0);
     String inputType = childExpr.get(0).getTypeString();
     if (child instanceof ExprNodeConstantDesc) {
-      // Don't do constant folding here.  Wait until the optimizer is changed to do it.
-      // Family of related JIRAs: HIVE-7421, HIVE-7422, and HIVE-7424.
-      return null;
+        // Return a constant vector expression
+        Object constantValue = ((ExprNodeConstantDesc) child).getValue();
+        Double doubleValue = castConstantToDouble(constantValue, child.getTypeInfo());
+        return getConstantVectorExpression(doubleValue, returnType, Mode.PROJECTION);     	
+    } else if (child instanceof ExprNodeNullDesc) {
+    	return getConstantVectorExpression(null, returnType, Mode.PROJECTION); 
     }
     if (isIntFamily(inputType)) {
       return createVectorExpression(CastLongToDouble.class, childExpr, Mode.PROJECTION, returnType);
@@ -1191,6 +1300,8 @@ public class VectorizationContext {
       // Don't do constant folding here.  Wait until the optimizer is changed to do it.
       // Family of related JIRAs: HIVE-7421, HIVE-7422, and HIVE-7424.
       return null;
+    } else if (child instanceof ExprNodeNullDesc) {
+    	return getConstantVectorExpression(null, TypeInfoFactory.booleanTypeInfo, Mode.PROJECTION); 
     }
     // Long and double are handled using descriptors, string needs to be specially handled.
     if (inputType.equals("string")) {
@@ -1215,9 +1326,12 @@ public class VectorizationContext {
     ExprNodeDesc child = childExpr.get(0);
     String inputType = childExpr.get(0).getTypeString();
     if (child instanceof ExprNodeConstantDesc) {
-      // Don't do constant folding here.  Wait until the optimizer is changed to do it.
-      // Family of related JIRAs: HIVE-7421, HIVE-7422, and HIVE-7424.
-      return null;
+        // Return a constant vector expression
+        Object constantValue = ((ExprNodeConstantDesc) child).getValue();
+        Long longValue = castConstantToLong(constantValue, child.getTypeInfo());
+        return getConstantVectorExpression(longValue, TypeInfoFactory.longTypeInfo, Mode.PROJECTION);    	
+    } else if (child instanceof ExprNodeNullDesc) {
+    	return getConstantVectorExpression(null, TypeInfoFactory.longTypeInfo, Mode.PROJECTION); 
     }
     // Float family, timestamp are handled via descriptor based lookup, int family needs
     // special handling.
@@ -1281,7 +1395,7 @@ public class VectorizationContext {
     String colType = commonType.getTypeName();
 
     // prepare arguments for createVectorExpression
-    List<ExprNodeDesc> childrenAfterNot = foldConstantsForUnaryExprs(castChildren);
+    List<ExprNodeDesc> childrenAfterNot = evaluateCastOnConstants(castChildren);
 
     // determine class
     Class<?> cl = null;

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/ConstantVectorExpression.java Mon Aug 11 02:58:34 2014
@@ -187,13 +187,14 @@ public class ConstantVectorExpression ex
 
   public void setTypeString(String typeString) {
     this.outputType = typeString;
-    if ("string".equalsIgnoreCase(typeString)) {
+    if (VectorizationContext.isStringFamily(typeString)) {
       this.type = Type.BYTES;
-    } else if ("double".equalsIgnoreCase(typeString)) {
+    } else if (VectorizationContext.isFloatFamily(typeString)) {
       this.type = Type.DOUBLE;
-    } else if (VectorizationContext.decimalTypePattern.matcher(typeString).matches()){
+    } else if (VectorizationContext.isDecimalFamily(typeString)){
       this.type = Type.DECIMAL;
     } else {
+      // everything else that does not belong to string, double, decimal is treated as long.	
       this.type = Type.LONG;
     }
   }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorExpressionWriterFactory.java Mon Aug 11 02:58:34 2014
@@ -50,25 +50,12 @@ import org.apache.hadoop.hive.serde2.obj
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableHiveVarcharObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableIntObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableLongObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableHiveVarcharObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableTimestampObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableShortObjectInspector;
 import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableStringObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.SettableTimestampObjectInspector;
-import org.apache.hadoop.hive.serde2.typeinfo.ListTypeInfo;
-import org.apache.hadoop.hive.serde2.typeinfo.MapTypeInfo;
-import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo;
-import org.apache.hadoop.hive.serde2.typeinfo.StructTypeInfo;
-import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;
-import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
+import org.apache.hadoop.hive.serde2.objectinspector.primitive.VoidObjectInspector;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils;
-import org.apache.hadoop.hive.serde2.typeinfo.UnionTypeInfo;
-import org.apache.hadoop.io.BooleanWritable;
-import org.apache.hadoop.io.FloatWritable;
-import org.apache.hadoop.io.IntWritable;
-import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.Text;
-import org.apache.hadoop.io.Writable;
 
 /**
  * VectorExpressionWritableFactory helper class for generating VectorExpressionWritable objects.
@@ -364,7 +351,6 @@ public final class VectorExpressionWrite
      */
     public static VectorExpressionWriter genVectorExpressionWritable(ExprNodeDesc nodeDesc)
       throws HiveException {
-      String nodeType = nodeDesc.getTypeString();
       ObjectInspector objectInspector = nodeDesc.getWritableObjectInspector();
       if (null == objectInspector) {
         objectInspector = TypeInfoUtils
@@ -408,6 +394,9 @@ public final class VectorExpressionWrite
           case LONG:
             return genVectorExpressionWritableLong(
                 (SettableLongObjectInspector) fieldObjInspector);
+          case VOID:
+              return genVectorExpressionWritableVoid(
+                  (VoidObjectInspector) fieldObjInspector);        	  
           case BINARY:
             return genVectorExpressionWritableBinary(
                 (SettableBinaryObjectInspector) fieldObjInspector);
@@ -722,6 +711,39 @@ public final class VectorExpressionWrite
     }.init(fieldObjInspector);
   }
 
+  private static VectorExpressionWriter genVectorExpressionWritableVoid(
+	      VoidObjectInspector fieldObjInspector) throws HiveException {
+	    return new VectorExpressionWriterLong() {
+	      private Object obj;
+	      
+	      public VectorExpressionWriter init(VoidObjectInspector objInspector) 
+	          throws HiveException {
+	        super.init(objInspector);
+	        this.obj = initValue(null);
+	        return this;
+	      }
+	      
+	      @Override
+	      public Object writeValue(long value) throws HiveException {
+	        return this.obj;
+	      }
+	      
+	      @Override
+	      public Object setValue(Object field, long value) throws HiveException {
+	        if (null == field) {
+	          field = initValue(null);
+	        }
+	        return field;
+	      }
+
+	      @Override
+	      public Object initValue(Object ignored) {
+	        return ((VoidObjectInspector) this.objectInspector).copyObject(null);
+	      }
+	    }.init(fieldObjInspector);
+	  }
+  
+  
   private static VectorExpressionWriter genVectorExpressionWritableInt(
       SettableIntObjectInspector fieldObjInspector) throws HiveException {
     return new VectorExpressionWriterLong() {

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagate.java Mon Aug 11 02:58:34 2014
@@ -77,12 +77,6 @@ public class ConstantPropagate implement
    */
   @Override
   public ParseContext transform(ParseContext pactx) throws SemanticException {
-    if (pactx.getConf().getBoolVar(ConfVars.HIVE_VECTORIZATION_ENABLED)) {
-      // Constant propagate is currently conflict with vectorizer, disabling constant propagate
-      //    if the later is enabled.
-      return pactx;
-    }
-
     pGraphContext = pactx;
     opToParseCtxMap = pGraphContext.getOpParseCtx();
 

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java Mon Aug 11 02:58:34 2014
@@ -149,6 +149,7 @@ public class Vectorizer implements Physi
     patternBuilder.append("|float");
     patternBuilder.append("|double");
     patternBuilder.append("|date");
+    patternBuilder.append("|void");
 
     // Decimal types can be specified with different precision and scales e.g. decimal(10,5),
     // as opposed to other data types which can be represented by constant strings.

Modified: hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java (original)
+++ hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/exec/vector/TestVectorizationContext.java Mon Aug 11 02:58:34 2014
@@ -1189,26 +1189,6 @@ public class TestVectorizationContext {
     children1.set(2,  col3Expr);
     ve = vc.getVectorExpression(exprDesc);
     assertTrue(ve instanceof IfExprStringScalarStringColumn);
-  }
-
-  @Test
-  public void testFoldConstantsForUnaryExpression() throws HiveException {
-    ExprNodeConstantDesc constDesc = new ExprNodeConstantDesc(new Integer(1));
-    GenericUDFToDecimal udf = new GenericUDFToDecimal();
-    udf.setTypeInfo(new DecimalTypeInfo(5, 2));
-    List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>();
-    children.add(constDesc);
-    ExprNodeGenericFuncDesc exprDesc = new ExprNodeGenericFuncDesc();
-    exprDesc.setGenericUDF(udf);
-    exprDesc.setChildren(children);
-    exprDesc.setTypeInfo(new DecimalTypeInfo(5, 2));
-    Map<String, Integer> columnMap = new HashMap<String, Integer>();
-    columnMap.put("col1", 1);
-    VectorizationContext vc = new VectorizationContext(columnMap, 1);
-    ExprNodeDesc constFoldNodeDesc = vc.foldConstantsForUnaryExpression(exprDesc); 
-    assertTrue(constFoldNodeDesc instanceof ExprNodeConstantDesc);
-    assertTrue(((HiveDecimal)
-      (((ExprNodeConstantDesc)constFoldNodeDesc).getValue())).toString().equals("1"));
   }  
 
 }

Modified: hive/trunk/ql/src/test/queries/clientpositive/vector_coalesce.q
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/queries/clientpositive/vector_coalesce.q?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/queries/clientpositive/vector_coalesce.q (original)
+++ hive/trunk/ql/src/test/queries/clientpositive/vector_coalesce.q Mon Aug 11 02:58:34 2014
@@ -7,6 +7,8 @@ SELECT cdouble, cstring1, cint, cfloat, 
 FROM alltypesorc
 WHERE (cdouble IS NULL) LIMIT 10;
 
+SET hive.optimize.constant.propagation=false;
+   
 EXPLAIN SELECT ctinyint, cdouble, cint, coalesce(ctinyint+10, (cdouble+log2(cint)), 0) 
 FROM alltypesorc
 WHERE (ctinyint IS NULL) LIMIT 10;
@@ -15,6 +17,8 @@ SELECT ctinyint, cdouble, cint, coalesce
 FROM alltypesorc
 WHERE (ctinyint IS NULL) LIMIT 10;
 
+SET hive.optimize.constant.propagation=true;
+
 EXPLAIN SELECT cfloat, cbigint, coalesce(cfloat, cbigint, 0) 
 FROM alltypesorc
 WHERE (cfloat IS NULL AND cbigint IS NULL) LIMIT 10;

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vector_cast_constant.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vector_cast_constant.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vector_cast_constant.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vector_cast_constant.q.out Mon Aug 11 02:58:34 2014
@@ -141,6 +141,7 @@ STAGE PLANS:
                         Map-reduce partition columns: _col0 (type: int)
                         Statistics: Num rows: 1049 Data size: 311170 Basic stats: COMPLETE Column stats: NONE
                         value expressions: _col1 (type: struct<count:bigint,sum:double,input:int>), _col2 (type: struct<count:bigint,sum:double,input:double>), _col3 (type: struct<count:bigint,sum:decimal(12,0),input:decimal(10,0)>)
+            Execution mode: vectorized
         Reducer 2 
             Reduce Operator Tree:
               Group By Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_14.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_14.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_14.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_14.q.out Mon Aug 11 02:58:34 2014
@@ -82,7 +82,7 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1779 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((((ctinyint <= cbigint) and ((cint <= cdouble) or (ctimestamp2 < ctimestamp1))) and (cdouble < ctinyint)) and ((cbigint > (- 257)) or (cfloat < cint))) (type: boolean)
+                    predicate: ((((ctinyint <= cbigint) and ((cint <= cdouble) or (ctimestamp2 < ctimestamp1))) and (cdouble < ctinyint)) and ((cbigint > -257) or (cfloat < cint))) (type: boolean)
                     Statistics: Num rows: 86 Data size: 18236 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctimestamp1 (type: timestamp), cfloat (type: float), cstring1 (type: string), cboolean1 (type: boolean), cdouble (type: double)
@@ -110,7 +110,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
                 Statistics: Num rows: 43 Data size: 9118 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: timestamp), _col1 (type: float), _col2 (type: string), _col3 (type: boolean), _col4 (type: double), ((- 26.28) + _col4) (type: double), (- ((- 26.28) + _col4)) (type: double), _col5 (type: double), (_col1 * (- 26.28)) (type: double), _col6 (type: float), (- _col1) (type: float), (- _col6) (type: float), ((- ((- 26.28) + _col4)) / 10.175) (type: double), _col7 (type: double), _col8 (type: bigint), (- ((- ((- 26.28) + _col4)) / 10.175)) (type: double), ((- 1.389) % _col5) (type: double), (_col1 - _col4) (type: double), _col9 (type: double), (_col9 % 10.175) (type: double), _col10 (type: double), (- (_col1 - _col4)) (type: double)
+                  expressions: _col0 (type: timestamp), _col1 (type: float), _col2 (type: string), _col3 (type: boolean), _col4 (type: double), (-26.28 + _col4) (type: double), (- (-26.28 + _col4)) (type: double), _col5 (type: double), (_col1 * -26.28) (type: double), _col6 (type: float), (- _col1) (type: float), (- _col6) (type: float), ((- (-26.28 + _col4)) / 10.175) (type: double), _col7 (type: double), _col8 (type: bigint), (- ((- (-26.28 + _col4)) / 10.175)) (type: double), (-1.389 % _col5) (type: double), (_col1 - _col4) (type: double), _col9 (type: double), (_col9 % 10.175) (type: double), _col10 (type: double), (- (_col1 - _col4)) (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
                   Statistics: Num rows: 43 Data size: 9118 Basic stats: COMPLETE Column stats: NONE
                   Reduce Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_15.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_15.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_15.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_15.q.out Mon Aug 11 02:58:34 2014
@@ -78,7 +78,7 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1407 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (((cstring2 like '%ss%') or (cstring1 like '10%')) or ((cint >= (- 75)) and ((ctinyint = csmallint) and (cdouble >= (- 3728))))) (type: boolean)
+                    predicate: (((cstring2 like '%ss%') or (cstring1 like '10%')) or ((cint >= -75) and ((ctinyint = csmallint) and (cdouble >= -3728)))) (type: boolean)
                     Statistics: Num rows: 1407 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cfloat (type: float), cboolean1 (type: boolean), cdouble (type: double), cstring1 (type: string), ctinyint (type: tinyint), cint (type: int), ctimestamp1 (type: timestamp)
@@ -106,7 +106,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
                 Statistics: Num rows: 703 Data size: 188484 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: float), _col1 (type: boolean), _col2 (type: double), _col3 (type: string), _col4 (type: tinyint), _col5 (type: int), _col6 (type: timestamp), _col7 (type: double), ((- 26.28) - _col5) (type: double), _col8 (type: double), (_col2 * 79.553) (type: double), (33 % _col0) (type: float), _col9 (type: double), _col10 (type: double), ((- 23) % _col2) (type: double), (- _col4) (type: tinyint), _col11 (type: double), (_col5 - _col0) (type: float), ((- 23) % _col4) (type: int), (- ((- 26.28) - _col5)) (type: double), _col12 (type: double)
+                  expressions: _col0 (type: float), _col1 (type: boolean), _col2 (type: double), _col3 (type: string), _col4 (type: tinyint), _col5 (type: int), _col6 (type: timestamp), _col7 (type: double), (-26.28 - _col5) (type: double), _col8 (type: double), (_col2 * 79.553) (type: double), (33 % _col0) (type: float), _col9 (type: double), _col10 (type: double), (-23 % _col2) (type: double), (- _col4) (type: tinyint), _col11 (type: double), (_col5 - _col0) (type: float), (-23 % _col4) (type: int), (- (-26.28 - _col5)) (type: double), _col12 (type: double)
                   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: 703 Data size: 188484 Basic stats: COMPLETE Column stats: NONE
                   Reduce Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_9.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_9.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_9.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_9.q.out Mon Aug 11 02:58:34 2014
@@ -55,7 +55,7 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1521 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((cstring2 like '%b%') and ((cdouble >= (- 1.389)) or (cstring1 < 'a'))) (type: boolean)
+                    predicate: ((cstring2 like '%b%') and ((cdouble >= -1.389) or (cstring1 < 'a'))) (type: boolean)
                     Statistics: Num rows: 506 Data size: 125497 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cstring1 (type: string), cdouble (type: double), ctimestamp1 (type: timestamp)
@@ -83,7 +83,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                 Statistics: Num rows: 253 Data size: 62748 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: string), _col1 (type: double), _col2 (type: timestamp), (_col1 - 9763215.5639) (type: double), (- (_col1 - 9763215.5639)) (type: double), _col3 (type: bigint), _col4 (type: double), (- _col4) (type: double), (_col4 * _col3) (type: double), _col5 (type: double), (9763215.5639 / _col1) (type: double), (_col3 / (- 1.389)) (type: double), _col4 (type: double)
+                  expressions: _col0 (type: string), _col1 (type: double), _col2 (type: timestamp), (_col1 - 9763215.5639) (type: double), (- (_col1 - 9763215.5639)) (type: double), _col3 (type: bigint), _col4 (type: double), (- _col4) (type: double), (_col4 * _col3) (type: double), _col5 (type: double), (9763215.5639 / _col1) (type: double), (_col3 / -1.389) (type: double), _col4 (type: double)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12
                   Statistics: Num rows: 253 Data size: 62748 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out Mon Aug 11 02:58:34 2014
@@ -148,7 +148,7 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1347 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((((762 = cbigint) or ((csmallint < cfloat) and ((ctimestamp2 > (- 10669)) and (cdouble <> cint)))) or (cstring1 = 'a')) or ((cbigint <= (- 1.389)) and ((cstring2 <> 'a') and ((79.553 <> cint) and (cboolean2 <> cboolean1))))) (type: boolean)
+                    predicate: ((((762 = cbigint) or ((csmallint < cfloat) and ((ctimestamp2 > -10669) and (cdouble <> cint)))) or (cstring1 = 'a')) or ((cbigint <= -1.389) and ((cstring2 <> 'a') and ((79.553 <> cint) and (cboolean2 <> cboolean1))))) (type: boolean)
                     Statistics: Num rows: 1347 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int), cdouble (type: double), csmallint (type: smallint), cfloat (type: float), ctinyint (type: tinyint)
@@ -172,7 +172,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8
                 Statistics: Num rows: 1 Data size: 68 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: double), (_col0 + (- 3728)) (type: double), (- (_col0 + (- 3728))) (type: double), (- (- (_col0 + (- 3728)))) (type: double), ((- (- (_col0 + (- 3728)))) * (_col0 + (- 3728))) (type: double), _col1 (type: double), (- _col0) (type: double), _col2 (type: double), (((- (- (_col0 + (- 3728)))) * (_col0 + (- 3728))) * (- (- (_col0 + (- 3728))))) (type: double), _col3 (type: double), (- _col2) (type: double), (_col2 - (- (- (_col0 + (- 3728))))) (type: double), ((_col2 - (- (- (_col0 + (- 3728))))) * _col2) (type: double), _col4 (type: double), _col5 (type: double), (10.175 - _col4) (type: double), (- (10.175 - _col4)) (type: double), ((- _col2) / (- 563)) (type: double), _col6 (type: double), (- ((- _col2) / (- 563))) (type: double), (_col0 / _col1) (type: double), _col7 (type: tinyint), _col8 (type: bigint), (_col7 / ((- _col2) / (- 563))) (type: double), (- (_col0 / _col1)) (type: double)
+                  expressions: _col0 (type: double), (_col0 + -3728) (type: double), (- (_col0 + -3728)) (type: double), (- (- (_col0 + -3728))) (type: double), ((- (- (_col0 + -3728))) * (_col0 + -3728)) (type: double), _col1 (type: double), (- _col0) (type: double), _col2 (type: double), (((- (- (_col0 + -3728))) * (_col0 + -3728)) * (- (- (_col0 + -3728)))) (type: double), _col3 (type: double), (- _col2) (type: double), (_col2 - (- (- (_col0 + -3728)))) (type: double), ((_col2 - (- (- (_col0 + -3728)))) * _col2) (type: double), _col4 (type: double), _col5 (type: double), (10.175 - _col4) (type: double), (- (10.175 - _col4)) (type: double), ((- _col2) / -563) (type: double), _col6 (type: double), (- ((- _col2) / -563)) (type: double), (_col0 / _col1) (type: double), _col7 (type: tinyint), _col8 (type: bigint), (_col7 / ((- _col2) / -563)) (type: double), (- (_col0 / _col1)) (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
                   Statistics: Num rows: 1 Data size: 68 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
@@ -360,7 +360,7 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1626 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (((((cbigint <= 197) and (cint < cbigint)) or ((cdouble >= (- 26.28)) and (csmallint > cdouble))) or ((ctinyint > cfloat) and (cstring1 rlike '.*ss.*'))) or ((cfloat > 79.553) and (cstring2 like '10%'))) (type: boolean)
+                    predicate: (((((cbigint <= 197) and (cint < cbigint)) or ((cdouble >= -26.28) and (csmallint > cdouble))) or ((ctinyint > cfloat) and (cstring1 rlike '.*ss.*'))) or ((cfloat > 79.553) and (cstring2 like '10%'))) (type: boolean)
                     Statistics: Num rows: 902 Data size: 209266 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cint (type: int), cbigint (type: bigint), csmallint (type: smallint), cdouble (type: double), ctinyint (type: tinyint)
@@ -384,7 +384,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8
                 Statistics: Num rows: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: int), (_col0 / (- 3728)) (type: double), (_col0 * (- 3728)) (type: int), _col1 (type: double), (- (_col0 * (- 3728))) (type: int), _col2 (type: double), ((- 563) % (_col0 * (- 3728))) (type: int), (_col1 / _col2) (type: double), (- _col2) (type: double), _col3 (type: double), _col4 (type: double), (_col2 - 10.175) (type: double), _col5 (type: int), ((_col0 * (- 3728)) % (_col2 - 10.175)) (type: double), (- _col3) (type: double), _col6 (type: double), (_col3 % (- 26.28)) (type: double), _col7 (type: double), (- (_col0 / (- 3728))) (type: double), ((- (_col0 * (- 3728))) % ((- 563) % (_col0 * (- 3728)))) (type: int), ((_col0 / (- 3728)) - _col4) (type: double), (- (_col0 * (- 3728))) (type: int), _col8 (type: double)
+                  expressions: _col0 (type: int), (_col0 / -3728) (type: double), (_col0 * -3728) (type: int), _col1 (type: double), (- (_col0 * -3728)) (type: int), _col2 (type: double), (-563 % (_col0 * -3728)) (type: int), (_col1 / _col2) (type: double), (- _col2) (type: double), _col3 (type: double), _col4 (type: double), (_col2 - 10.175) (type: double), _col5 (type: int), ((_col0 * -3728) % (_col2 - 10.175)) (type: double), (- _col3) (type: double), _col6 (type: double), (_col3 % -26.28) (type: double), _col7 (type: double), (- (_col0 / -3728)) (type: double), ((- (_col0 * -3728)) % (-563 % (_col0 * -3728))) (type: int), ((_col0 / -3728) - _col4) (type: double), (- (_col0 * -3728)) (type: int), _col8 (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: 1 Data size: 64 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
@@ -587,7 +587,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7
                 Statistics: Num rows: 1 Data size: 56 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: double), (- _col0) (type: double), (_col0 - (- _col0)) (type: double), _col1 (type: bigint), (_col1 % 79.553) (type: double), _col2 (type: tinyint), (_col1 - (- _col0)) (type: double), (- (- _col0)) (type: double), ((- 1) % (- _col0)) (type: double), _col1 (type: bigint), (- _col1) (type: bigint), _col3 (type: double), (- (- (- _col0))) (type: double), (762 * (- _col1)) (type: bigint), _col4 (type: int), (_col2 + (762 * (- _col1))) (type: bigint), ((- _col0) + _col4) (type: double), _col5 (type: double), ((- _col1) % _col1) (type: bigint), _col6 (type: bigint), _col7 (type: double), ((- 3728) % (_col2 + (762 * (- _col1)))) (type: bigint)
+                  expressions: _col0 (type: double), (- _col0) (type: double), (_col0 - (- _col0)) (type: double), _col1 (type: bigint), (_col1 % 79.553) (type: double), _col2 (type: tinyint), (_col1 - (- _col0)) (type: double), (- (- _col0)) (type: double), (-1 % (- _col0)) (type: double), _col1 (type: bigint), (- _col1) (type: bigint), _col3 (type: double), (- (- (- _col0))) (type: double), (762 * (- _col1)) (type: bigint), _col4 (type: int), (_col2 + (762 * (- _col1))) (type: bigint), ((- _col0) + _col4) (type: double), _col5 (type: double), ((- _col1) % _col1) (type: bigint), _col6 (type: bigint), _col7 (type: double), (-3728 % (_col2 + (762 * (- _col1)))) (type: bigint)
                   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: 1 Data size: 56 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
@@ -769,7 +769,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                 Statistics: Num rows: 1 Data size: 44 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: double), (_col0 + 6981) (type: double), ((_col0 + 6981) + _col0) (type: double), _col1 (type: bigint), (((_col0 + 6981) + _col0) / _col0) (type: double), (- (_col0 + 6981)) (type: double), _col2 (type: double), (_col0 % (- (_col0 + 6981))) (type: double), _col3 (type: double), _col4 (type: double), (- _col1) (type: bigint), ((- _col1) / _col2) (type: double), _col5 (type: float), (_col4 * (- 26.28)) (type: double)
+                  expressions: _col0 (type: double), (_col0 + 6981) (type: double), ((_col0 + 6981) + _col0) (type: double), _col1 (type: bigint), (((_col0 + 6981) + _col0) / _col0) (type: double), (- (_col0 + 6981)) (type: double), _col2 (type: double), (_col0 % (- (_col0 + 6981))) (type: double), _col3 (type: double), _col4 (type: double), (- _col1) (type: bigint), ((- _col1) / _col2) (type: double), _col5 (type: float), (_col4 * -26.28) (type: double)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13
                   Statistics: Num rows: 1 Data size: 44 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
@@ -926,10 +926,10 @@ STAGE PLANS:
           alias: alltypesorc
           Statistics: Num rows: 1193 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
           Filter Operator
-            predicate: (((((cstring1 rlike 'a.*') and (cstring2 like '%ss%')) or ((1 <> cboolean2) and ((csmallint < 79.553) and ((- 257) <> ctinyint)))) or ((cdouble > ctinyint) and (cfloat >= cint))) or ((cint < cbigint) and (ctinyint > cbigint))) (type: boolean)
+            predicate: (((((cstring1 rlike 'a.*') and (cstring2 like '%ss%')) or ((1 <> cboolean2) and ((csmallint < 79.553) and (-257 <> ctinyint)))) or ((cdouble > ctinyint) and (cfloat >= cint))) or ((cint < cbigint) and (ctinyint > cbigint))) (type: boolean)
             Statistics: Num rows: 959 Data size: 303244 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              expressions: cint (type: int), cdouble (type: double), ctimestamp2 (type: timestamp), cstring1 (type: string), cboolean2 (type: boolean), ctinyint (type: tinyint), cfloat (type: float), ctimestamp1 (type: timestamp), csmallint (type: smallint), cbigint (type: bigint), ((- 3728) * cbigint) (type: bigint), (- cint) (type: int), ((- 863.257) - cint) (type: double), (- csmallint) (type: smallint), (csmallint - (- csmallint)) (type: smallint), ((csmallint - (- csmallint)) + (- csmallint)) (type: smallint), (cint / cint) (type: double), (((- 863.257) - cint) - (- 26.28)) (type: double), (- cfloat) (type: float), (cdouble * (- 89010)) (type: double), (ctinyint / 988888) (type: double), (- ctinyint) (type: tinyint), (79.553 / ctinyint) (type: double)
+              expressions: cint (type: int), cdouble (type: double), ctimestamp2 (type: timestamp), cstring1 (type: string), cboolean2 (type: boolean), ctinyint (type: tinyint), cfloat (type: float), ctimestamp1 (type: timestamp), csmallint (type: smallint), cbigint (type: bigint), (-3728 * cbigint) (type: bigint), (- cint) (type: int), (-863.257 - cint) (type: double), (- csmallint) (type: smallint), (csmallint - (- csmallint)) (type: smallint), ((csmallint - (- csmallint)) + (- csmallint)) (type: smallint), (cint / cint) (type: double), ((-863.257 - cint) - -26.28) (type: double), (- cfloat) (type: float), (cdouble * -89010) (type: double), (ctinyint / 988888) (type: double), (- ctinyint) (type: tinyint), (79.553 / ctinyint) (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: 959 Data size: 303244 Basic stats: COMPLETE Column stats: NONE
               ListSink
@@ -2322,7 +2322,7 @@ STAGE PLANS:
             predicate: (((((197.0 > ctinyint) and (cint = cbigint)) or (cbigint = 359)) or (cboolean1 < 0)) or ((cstring1 like '%ss') and (cfloat <= ctinyint))) (type: boolean)
             Statistics: Num rows: 1347 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
             Select Operator
-              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), (cint / cbigint) (type: double), (cbigint % 79.553) (type: double), (- (cint / cbigint)) (type: double), (10.175 % cfloat) (type: double), (- cfloat) (type: float), (cfloat - (- cfloat)) (type: float), ((cfloat - (- cfloat)) % (- 6432)) (type: float), (cdouble * csmallint) (type: double), (- cdouble) (type: double), (- cbigint) (type: bigint), (cfloat - (cint / cbigint)) (type: double), (- csmallint) (type: smallint), (3569 % cbigint) (type: bigint), (359 - cdouble) (type: double), (- csmallint) (type: smallint)
+              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), (cint / cbigint) (type: double), (cbigint % 79.553) (type: double), (- (cint / cbigint)) (type: double), (10.175 % cfloat) (type: double), (- cfloat) (type: float), (cfloat - (- cfloat)) (type: float), ((cfloat - (- cfloat)) % -6432) (type: float), (cdouble * csmallint) (type: double), (- cdouble) (type: double), (- cbigint) (type: bigint), (cfloat - (cint / cbigint)) (type: double), (- csmallint) (type: smallint), (3569 % cbigint) (type: bigint), (359 - 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: 1347 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
               ListSink
@@ -2493,10 +2493,10 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1347 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (((((csmallint > (- 26.28)) and (cstring2 like 'ss')) or ((cdouble <= cbigint) and ((cstring1 >= 'ss') and (cint <> cdouble)))) or (ctinyint = (- 89010))) or ((cbigint <= cfloat) and ((- 26.28) <= csmallint))) (type: boolean)
+                    predicate: (((((csmallint > -26.28) and (cstring2 like 'ss')) or ((cdouble <= cbigint) and ((cstring1 >= 'ss') and (cint <> cdouble)))) or (ctinyint = -89010)) or ((cbigint <= cfloat) and (-26.28 <= csmallint))) (type: boolean)
                     Statistics: Num rows: 1195 Data size: 334668 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: cint (type: int), cstring1 (type: string), cboolean2 (type: boolean), ctimestamp2 (type: timestamp), cdouble (type: double), cfloat (type: float), cbigint (type: bigint), csmallint (type: smallint), cboolean1 (type: boolean), (cint + csmallint) (type: int), (cbigint - ctinyint) (type: bigint), (- cbigint) (type: bigint), (- cfloat) (type: float), ((cbigint - ctinyint) + cbigint) (type: bigint), (cdouble / cdouble) (type: double), (- cdouble) (type: double), ((cint + csmallint) * (- cbigint)) (type: bigint), ((- cdouble) + cbigint) (type: double), ((- 1.389) / ctinyint) (type: double), (cbigint % cdouble) (type: double), (- csmallint) (type: smallint), (csmallint + (cint + csmallint)) (type: int)
+                      expressions: cint (type: int), cstring1 (type: string), cboolean2 (type: boolean), ctimestamp2 (type: timestamp), cdouble (type: double), cfloat (type: float), cbigint (type: bigint), csmallint (type: smallint), cboolean1 (type: boolean), (cint + csmallint) (type: int), (cbigint - ctinyint) (type: bigint), (- cbigint) (type: bigint), (- cfloat) (type: float), ((cbigint - ctinyint) + cbigint) (type: bigint), (cdouble / cdouble) (type: double), (- cdouble) (type: double), ((cint + csmallint) * (- cbigint)) (type: bigint), ((- cdouble) + cbigint) (type: double), (-1.389 / ctinyint) (type: double), (cbigint % cdouble) (type: double), (- csmallint) (type: smallint), (csmallint + (cint + csmallint)) (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: 1195 Data size: 334668 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
@@ -3262,10 +3262,10 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1386 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (((((- 1.389) >= cint) and ((csmallint < ctinyint) and ((- 6432) > csmallint))) or ((cdouble >= cfloat) and (cstring2 <= 'a'))) or ((cstring1 like 'ss%') and (10.175 > cbigint))) (type: boolean)
+                    predicate: ((((-1.389 >= cint) and ((csmallint < ctinyint) and (-6432 > csmallint))) or ((cdouble >= cfloat) and (cstring2 <= 'a'))) or ((cstring1 like 'ss%') and (10.175 > cbigint))) (type: boolean)
                     Statistics: Num rows: 436 Data size: 118669 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
-                      expressions: ctimestamp1 (type: timestamp), cstring2 (type: string), (cdouble * 10.175) (type: double), (((- 6432) * cfloat) / cfloat) (type: double), (- cfloat) (type: float), (cint % csmallint) (type: int), (cdouble * (- cdouble)) (type: double), cdouble (type: double), cfloat (type: float), cbigint (type: bigint), csmallint (type: smallint), (cbigint / 3569) (type: double), ((- 257) - csmallint) (type: int), ((- 6432) * cfloat) (type: float), (- cdouble) (type: double)
+                      expressions: ctimestamp1 (type: timestamp), cstring2 (type: string), (cdouble * 10.175) (type: double), ((-6432 * cfloat) / cfloat) (type: double), (- cfloat) (type: float), (cint % csmallint) (type: int), (cdouble * (- cdouble)) (type: double), cdouble (type: double), cfloat (type: float), cbigint (type: bigint), csmallint (type: smallint), (cbigint / 3569) (type: double), (-257 - csmallint) (type: int), (-6432 * cfloat) (type: float), (- cdouble) (type: double)
                       outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col13, _col15, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
                       Statistics: Num rows: 436 Data size: 118669 Basic stats: COMPLETE Column stats: NONE
                       Reduce Output Operator
@@ -4087,7 +4087,7 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 13472 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((csmallint >= (- 257)) and (((- 6432) = csmallint) or ((cint >= cdouble) and (ctinyint <= cint)))) (type: boolean)
+                    predicate: ((csmallint >= -257) and ((-6432 = csmallint) or ((cint >= cdouble) and (ctinyint <= cint)))) (type: boolean)
                     Statistics: Num rows: 2743 Data size: 76808 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: csmallint (type: smallint), cbigint (type: bigint), ctinyint (type: tinyint)
@@ -4115,7 +4115,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4
                 Statistics: Num rows: 1371 Data size: 38389 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: smallint), (_col0 % (- 75)) (type: int), _col1 (type: double), ((- 1.389) / _col0) (type: double), _col2 (type: bigint), ((_col0 % (- 75)) / _col2) (type: double), (- (_col0 % (- 75))) (type: int), _col3 (type: double), (- (- (_col0 % (- 75)))) (type: int), _col4 (type: bigint), (_col4 - (- 89010)) (type: bigint)
+                  expressions: _col0 (type: smallint), (_col0 % -75) (type: int), _col1 (type: double), (-1.389 / _col0) (type: double), _col2 (type: bigint), ((_col0 % -75) / _col2) (type: double), (- (_col0 % -75)) (type: int), _col3 (type: double), (- (- (_col0 % -75))) (type: int), _col4 (type: bigint), (_col4 - -89010) (type: bigint)
                   outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
                   Statistics: Num rows: 1371 Data size: 38389 Basic stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
@@ -5721,23 +5721,23 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 13472 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((cdouble > 2563.58) and ((((cbigint >= cint) and ((csmallint < cint) and (cfloat < (- 5638.15)))) or false) or ((cdouble <= cbigint) and ((- 5638.15) > cbigint)))) (type: boolean)
-                    Statistics: Num rows: 2909 Data size: 81456 Basic stats: COMPLETE Column stats: NONE
+                    predicate: ((cdouble > 2563.58) and (((cbigint >= cint) and ((csmallint < cint) and (cfloat < -5638.15))) or ((cdouble <= cbigint) and (-5638.15 > cbigint)))) (type: boolean)
+                    Statistics: Num rows: 664 Data size: 18593 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cdouble (type: double), cfloat (type: float)
                       outputColumnNames: cdouble, cfloat
-                      Statistics: Num rows: 2909 Data size: 81456 Basic stats: COMPLETE Column stats: NONE
+                      Statistics: Num rows: 664 Data size: 18593 Basic stats: COMPLETE Column stats: NONE
                       Group By Operator
                         aggregations: var_samp(cdouble), count(cfloat), sum(cfloat), var_pop(cdouble), stddev_pop(cdouble), sum(cdouble)
                         keys: cdouble (type: double)
                         mode: hash
                         outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
-                        Statistics: Num rows: 2909 Data size: 81456 Basic stats: COMPLETE Column stats: NONE
+                        Statistics: Num rows: 664 Data size: 18593 Basic stats: COMPLETE Column stats: NONE
                         Reduce Output Operator
                           key expressions: _col0 (type: double)
                           sort order: +
                           Map-reduce partition columns: _col0 (type: double)
-                          Statistics: Num rows: 2909 Data size: 81456 Basic stats: COMPLETE Column stats: NONE
+                          Statistics: Num rows: 664 Data size: 18593 Basic stats: COMPLETE Column stats: NONE
                           value expressions: _col1 (type: struct<count:bigint,sum:double,variance:double>), _col2 (type: bigint), _col3 (type: double), _col4 (type: struct<count:bigint,sum:double,variance:double>), _col5 (type: struct<count:bigint,sum:double,variance:double>), _col6 (type: double)
             Execution mode: vectorized
         Reducer 2 
@@ -5747,25 +5747,25 @@ STAGE PLANS:
                 keys: KEY._col0 (type: double)
                 mode: mergepartial
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6
-                Statistics: Num rows: 1454 Data size: 40713 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 332 Data size: 9296 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: double), _col1 (type: double), _col5 (type: double), (_col0 + _col1) (type: double), (_col0 * 762) (type: double), _col6 (type: double), ((- 863.257) % (_col0 * 762)) (type: double), (2563.58 * _col1) (type: double), (- _col1) (type: double), _col2 (type: bigint), ((2563.58 * _col1) + (- 5638.15)) (type: double), ((- _col1) * ((2563.58 * _col1) + (- 5638.15))) (type: double), _col3 (type: double), _col4 (type: double), (_col0 - (- _col1)) (type: double)
+                  expressions: _col0 (type: double), _col1 (type: double), _col5 (type: double), (_col0 + _col1) (type: double), (_col0 * 762) (type: double), _col6 (type: double), (-863.257 % (_col0 * 762)) (type: double), (2563.58 * _col1) (type: double), (- _col1) (type: double), _col2 (type: bigint), ((2563.58 * _col1) + -5638.15) (type: double), ((- _col1) * ((2563.58 * _col1) + -5638.15)) (type: double), _col3 (type: double), _col4 (type: double), (_col0 - (- _col1)) (type: double)
                   outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col13, _col14, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
-                  Statistics: Num rows: 1454 Data size: 40713 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 332 Data size: 9296 Basic stats: COMPLETE Column stats: NONE
                   Reduce Output Operator
                     key expressions: _col0 (type: double)
                     sort order: +
-                    Statistics: Num rows: 1454 Data size: 40713 Basic stats: COMPLETE Column stats: NONE
+                    Statistics: Num rows: 332 Data size: 9296 Basic stats: COMPLETE Column stats: NONE
                     value expressions: _col1 (type: double), _col2 (type: double), _col3 (type: double), _col4 (type: bigint), _col5 (type: double), _col6 (type: double), _col7 (type: double), _col8 (type: double), _col9 (type: double), _col10 (type: double), _col11 (type: double), _col12 (type: double), _col13 (type: double), _col14 (type: double)
         Reducer 3 
             Reduce Operator Tree:
               Select Operator
                 expressions: KEY.reducesinkkey0 (type: double), VALUE._col0 (type: double), VALUE._col1 (type: double), VALUE._col2 (type: double), VALUE._col3 (type: bigint), VALUE._col4 (type: double), VALUE._col5 (type: double), VALUE._col6 (type: double), VALUE._col7 (type: double), VALUE._col8 (type: double), VALUE._col9 (type: double), VALUE._col10 (type: double), VALUE._col11 (type: double), VALUE._col12 (type: double), VALUE._col13 (type: double), VALUE._col12 (type: double)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15
-                Statistics: Num rows: 1454 Data size: 40713 Basic stats: COMPLETE Column stats: NONE
+                Statistics: Num rows: 332 Data size: 9296 Basic stats: COMPLETE Column stats: NONE
                 File Output Operator
                   compressed: false
-                  Statistics: Num rows: 1454 Data size: 40713 Basic stats: COMPLETE Column stats: NONE
+                  Statistics: Num rows: 332 Data size: 9296 Basic stats: COMPLETE Column stats: NONE
                   table:
                       input format: org.apache.hadoop.mapred.TextInputFormat
                       output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
@@ -5971,7 +5971,7 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1209 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: ((ctimestamp1 <> 0) and ((((((((- 257) <> ctinyint) and cboolean2 is not null) and ((cstring1 rlike '.*ss') and ((- 10669) < ctimestamp1))) or (ctimestamp2 = (- 10669))) or ((ctimestamp1 < 0) and (cstring2 like '%b%'))) or (cdouble = cint)) or (cboolean1 is null and (cfloat < cint)))) (type: boolean)
+                    predicate: ((ctimestamp1 <> 0) and (((((((-257 <> ctinyint) and cboolean2 is not null) and ((cstring1 rlike '.*ss') and (-10669 < ctimestamp1))) or (ctimestamp2 = -10669)) or ((ctimestamp1 < 0) and (cstring2 like '%b%'))) or (cdouble = cint)) or (cboolean1 is null and (cfloat < cint)))) (type: boolean)
                     Statistics: Num rows: 1209 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: ctimestamp1 (type: timestamp), cstring1 (type: string), cint (type: int), csmallint (type: smallint), ctinyint (type: tinyint), cfloat (type: float), cdouble (type: double)
@@ -5999,7 +5999,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14
                 Statistics: Num rows: 604 Data size: 188462 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  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)) * (- _col4)) (type: double), (- (_col2 * 10.175)) (type: double), _col6 (type: double), (_col6 + ((((- 26.28) - _col2) * (- _col2)) * (- _col4))) (type: double), (- (- _col2)) (type: double), ((- _col4) / _col2) (type: double), _col7 (type: double), (10.175 / _col3) (type: double), _col8 (type: double), _col9 (type: double), ((_col6 + ((((- 26.28) - _col2) * (- _col2)) * (- _col4))) - ((((- 26.28) - _col2) * (- _col2)) * (- _col4))) (type: double), (- (- (_col2 * 10.175))) (type: double), _col10 (type: double), (((_col6 + ((((- 26.28) - _col2) * (- _col2)) * (- _col4))) - ((((- 26.28) - _col
 2) * (- _col2)) * (- _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) / (- _col5)) (type: double), _col13 (type: double), _col14 (type: bigint), ((_col6 + ((((- 26.28) - _col2) * (- _col2)) * (- _col4))) / _col7) (type: double), (- (- _col4)) (type: bigint), _col4 (type: bigint), ((_col6 + ((((- 26.28) - _col2) * (- _col2)) * (- _col4))) % (- 26.28)) (type: double)
+                  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)) * (- _col4)) (type: double), (- (_col2 * 10.175)) (type: double), _col6 (type: double), (_col6 + (((-26.28 - _col2) * (- _col2)) * (- _col4))) (type: double), (- (- _col2)) (type: double), ((- _col4) / _col2) (type: double), _col7 (type: double), (10.175 / _col3) (type: double), _col8 (type: double), _col9 (type: double), ((_col6 + (((-26.28 - _col2) * (- _col2)) * (- _col4))) - (((-26.28 - _col2) * (- _col2)) * (- _col4))) (type: double), (- (- (_col2 * 10.175))) (type: double), _col10 (type: double), (((_col6 + (((-26.28 - _col2) * (- _col2)) * (- _col4))) - (((-26.28 - _col2) * (- _col2)) * (- _co
 l4))) * 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 / (- _col5)) (type: double), _col13 (type: double), _col14 (type: bigint), ((_col6 + (((-26.28 - _col2) * (- _col2)) * (- _col4))) / _col7) (type: double), (- (- _col4)) (type: bigint), _col4 (type: bigint), ((_col6 + (((-26.28 - _col2) * (- _col2)) * (- _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: 604 Data size: 188462 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator
@@ -6480,7 +6480,7 @@ STAGE PLANS:
                   alias: alltypesorc
                   Statistics: Num rows: 1347 Data size: 377237 Basic stats: COMPLETE Column stats: NONE
                   Filter Operator
-                    predicate: (cboolean1 is not null and (((((cdouble < csmallint) and ((cboolean2 = cboolean1) and (cbigint <= (- 863.257)))) or ((cint >= (- 257)) and (cstring1 is not null and (cboolean1 >= 1)))) or (cstring2 rlike 'b')) or ((csmallint >= ctinyint) and ctimestamp2 is null))) (type: boolean)
+                    predicate: (cboolean1 is not null and (((((cdouble < csmallint) and ((cboolean2 = cboolean1) and (cbigint <= -863.257))) or ((cint >= -257) and (cstring1 is not null and (cboolean1 >= 1)))) or (cstring2 rlike 'b')) or ((csmallint >= ctinyint) and ctimestamp2 is null))) (type: boolean)
                     Statistics: Num rows: 523 Data size: 146469 Basic stats: COMPLETE Column stats: NONE
                     Select Operator
                       expressions: cboolean1 (type: boolean), cfloat (type: float), cbigint (type: bigint), cint (type: int), cdouble (type: double), ctinyint (type: tinyint), csmallint (type: smallint)
@@ -6508,7 +6508,7 @@ STAGE PLANS:
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
                 Statistics: Num rows: 261 Data size: 73094 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col0 (type: boolean), _col1 (type: float), ((_col2 - 10.175) + _col3) (type: double), _col5 (type: bigint), _col6 (type: double), (- (10.175 + (- _col1))) (type: double), (79.553 / _col6) (type: double), (_col3 % (79.553 / _col6)) (type: double), _col7 (type: bigint), _col8 (type: double), ((- 1.389) * _col5) (type: double), (- _col1) (type: float), (_col7 - ((- 1.389) * _col5)) (type: double), _col9 (type: double), (- (_col7 - ((- 1.389) * _col5))) (type: double), _col10 (type: double), (- _col10) (type: double), (_col10 * _col7) (type: double), ((- 26.28) / _col1) (type: double), _col2 (type: bigint), (_col2 - 10.175) (type: double), _col3 (type: double), (_col3 % _col1) (type: double), (10.175 + (- _col1)) (type: double), _col4 (type: double)
+                  expressions: _col0 (type: boolean), _col1 (type: float), ((_col2 - 10.175) + _col3) (type: double), _col5 (type: bigint), _col6 (type: double), (- (10.175 + (- _col1))) (type: double), (79.553 / _col6) (type: double), (_col3 % (79.553 / _col6)) (type: double), _col7 (type: bigint), _col8 (type: double), (-1.389 * _col5) (type: double), (- _col1) (type: float), (_col7 - (-1.389 * _col5)) (type: double), _col9 (type: double), (- (_col7 - (-1.389 * _col5))) (type: double), _col10 (type: double), (- _col10) (type: double), (_col10 * _col7) (type: double), (-26.28 / _col1) (type: double), _col2 (type: bigint), (_col2 - 10.175) (type: double), _col3 (type: double), (_col3 % _col1) (type: double), (10.175 + (- _col1)) (type: double), _col4 (type: double)
                   outputColumnNames: _col0, _col1, _col10, _col11, _col12, _col13, _col14, _col15, _col17, _col18, _col19, _col2, _col20, _col21, _col22, _col23, _col24, _col25, _col3, _col4, _col5, _col6, _col7, _col8, _col9
                   Statistics: Num rows: 261 Data size: 73094 Basic stats: COMPLETE Column stats: NONE
                   Reduce Output Operator

Modified: hive/trunk/ql/src/test/results/clientpositive/vector_between_in.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_between_in.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vector_between_in.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vector_between_in.q.out Mon Aug 11 02:58:34 2014
@@ -21,7 +21,7 @@ STAGE PLANS:
             alias: decimal_date_test
             Statistics: Num rows: 12288 Data size: 2467616 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (cdate) IN (CAST( '1969-10-26' AS DATE), CAST( '1969-07-14' AS DATE)) (type: boolean)
+              predicate: (cdate) IN (1969-10-26, 1969-07-14) (type: boolean)
               Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: cdate (type: date)
@@ -67,7 +67,7 @@ STAGE PLANS:
             alias: decimal_date_test
             Statistics: Num rows: 12288 Data size: 2467616 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (not (cdate) IN (CAST( '1969-10-26' AS DATE), CAST( '1969-07-14' AS DATE), CAST( '1970-01-21' AS DATE))) (type: boolean)
+              predicate: (not (cdate) IN (1969-10-26, 1969-07-14, 1970-01-21)) (type: boolean)
               Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
@@ -121,7 +121,7 @@ STAGE PLANS:
             alias: decimal_date_test
             Statistics: Num rows: 12288 Data size: 2467616 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (cdecimal1) IN (2365.8945945946, 881.0135135135, (- 3367.6517567568)) (type: boolean)
+              predicate: (cdecimal1) IN (2365.8945945946, 881.0135135135, -3367.6517567568) (type: boolean)
               Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: cdecimal1 (type: decimal(20,10))
@@ -167,7 +167,7 @@ STAGE PLANS:
             alias: decimal_date_test
             Statistics: Num rows: 12288 Data size: 2467616 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: (not (cdecimal1) IN (2365.8945945946, 881.0135135135, (- 3367.6517567568))) (type: boolean)
+              predicate: (not (cdecimal1) IN (2365.8945945946, 881.0135135135, -3367.6517567568)) (type: boolean)
               Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
@@ -221,7 +221,7 @@ STAGE PLANS:
             alias: decimal_date_test
             Statistics: Num rows: 12288 Data size: 2467616 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: cdate BETWEEN CAST( '1969-12-30' AS DATE) AND CAST( '1970-01-02' AS DATE) (type: boolean)
+              predicate: cdate BETWEEN 1969-12-30 AND 1970-01-02 (type: boolean)
               Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: cdate (type: date)
@@ -267,7 +267,7 @@ STAGE PLANS:
             alias: decimal_date_test
             Statistics: Num rows: 12288 Data size: 2467616 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: cdate NOT BETWEEN CAST( '1968-05-01' AS DATE) AND CAST( '1971-09-01' AS DATE) (type: boolean)
+              predicate: cdate NOT BETWEEN 1968-05-01 AND 1971-09-01 (type: boolean)
               Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: cdate (type: date)
@@ -313,7 +313,7 @@ STAGE PLANS:
             alias: decimal_date_test
             Statistics: Num rows: 12288 Data size: 2467616 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: cdecimal1 BETWEEN (- 20) AND 45.9918918919 (type: boolean)
+              predicate: cdecimal1 BETWEEN -20 AND 45.9918918919 (type: boolean)
               Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 expressions: cdecimal1 (type: decimal(20,10))
@@ -359,7 +359,7 @@ STAGE PLANS:
             alias: decimal_date_test
             Statistics: Num rows: 12288 Data size: 2467616 Basic stats: COMPLETE Column stats: NONE
             Filter Operator
-              predicate: cdecimal1 NOT BETWEEN (- 2000) AND 4390.1351351351 (type: boolean)
+              predicate: cdecimal1 NOT BETWEEN -2000 AND 4390.1351351351 (type: boolean)
               Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE
               Select Operator
                 Statistics: Num rows: 6144 Data size: 1233808 Basic stats: COMPLETE Column stats: NONE

Modified: hive/trunk/ql/src/test/results/clientpositive/vector_cast_constant.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_cast_constant.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vector_cast_constant.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vector_cast_constant.q.out Mon Aug 11 02:58:34 2014
@@ -136,6 +136,7 @@ STAGE PLANS:
                   Map-reduce partition columns: _col0 (type: int)
                   Statistics: Num rows: 1049 Data size: 311170 Basic stats: COMPLETE Column stats: NONE
                   value expressions: _col1 (type: struct<count:bigint,sum:double,input:int>), _col2 (type: struct<count:bigint,sum:double,input:double>), _col3 (type: struct<count:bigint,sum:decimal(12,0),input:decimal(10,0)>)
+      Execution mode: vectorized
       Reduce Operator Tree:
         Group By Operator
           aggregations: avg(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2)

Modified: hive/trunk/ql/src/test/results/clientpositive/vector_coalesce.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_coalesce.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vector_coalesce.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vector_coalesce.q.out Mon Aug 11 02:58:34 2014
@@ -21,7 +21,7 @@ STAGE PLANS:
               predicate: cdouble is null (type: boolean)
               Statistics: Num rows: 1571 Data size: 188558 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: cdouble (type: double), cstring1 (type: string), cint (type: int), cfloat (type: float), csmallint (type: smallint), COALESCE(cdouble,cstring1,cint,cfloat,csmallint) (type: string)
+                expressions: null (type: void), cstring1 (type: string), cint (type: int), cfloat (type: float), csmallint (type: smallint), COALESCE(null,cstring1,cint,cfloat,csmallint) (type: string)
                 outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                 Statistics: Num rows: 1571 Data size: 188558 Basic stats: COMPLETE Column stats: NONE
                 Limit
@@ -153,7 +153,7 @@ STAGE PLANS:
               predicate: (cfloat is null and cbigint is null) (type: boolean)
               Statistics: Num rows: 7859 Data size: 94309 Basic stats: COMPLETE Column stats: NONE
               Select Operator
-                expressions: cfloat (type: float), cbigint (type: bigint), COALESCE(cfloat,cbigint,0) (type: float)
+                expressions: null (type: void), null (type: void), COALESCE(null,null,0) (type: float)
                 outputColumnNames: _col0, _col1, _col2
                 Statistics: Num rows: 7859 Data size: 94309 Basic stats: COMPLETE Column stats: NONE
                 Limit

Modified: hive/trunk/ql/src/test/results/clientpositive/vector_decimal_mapjoin.q.out
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/test/results/clientpositive/vector_decimal_mapjoin.q.out?rev=1617195&r1=1617194&r2=1617195&view=diff
==============================================================================
--- hive/trunk/ql/src/test/results/clientpositive/vector_decimal_mapjoin.q.out (original)
+++ hive/trunk/ql/src/test/results/clientpositive/vector_decimal_mapjoin.q.out Mon Aug 11 02:58:34 2014
@@ -46,10 +46,10 @@ STAGE PLANS:
               HashTable Sink Operator
                 condition expressions:
                   0 {cdecimal1}
-                  1 {cdecimal2} {cint}
+                  1 {cdecimal2}
                 keys:
-                  0 cint (type: int)
-                  1 cint (type: int)
+                  0 6981 (type: int)
+                  1 6981 (type: int)
 
   Stage: Stage-3
     Map Reduce
@@ -64,15 +64,15 @@ STAGE PLANS:
                 condition map:
                      Inner Join 0 to 1
                 condition expressions:
-                  0 {cdecimal1} {cint}
-                  1 {cdecimal2} {cint}
+                  0 {cdecimal1}
+                  1 {cdecimal2}
                 keys:
-                  0 cint (type: int)
-                  1 cint (type: int)
-                outputColumnNames: _col1, _col3, _col8, _col9
+                  0 6981 (type: int)
+                  1 6981 (type: int)
+                outputColumnNames: _col1, _col8
                 Statistics: Num rows: 3379 Data size: 595391 Basic stats: COMPLETE Column stats: NONE
                 Select Operator
-                  expressions: _col3 (type: int), _col9 (type: int), _col1 (type: decimal(20,10)), _col8 (type: decimal(23,14))
+                  expressions: 6981 (type: int), 6981 (type: int), _col1 (type: decimal(20,10)), _col8 (type: decimal(23,14))
                   outputColumnNames: _col0, _col1, _col2, _col3
                   Statistics: Num rows: 3379 Data size: 595391 Basic stats: COMPLETE Column stats: NONE
                   File Output Operator



Mime
View raw message