diff --git hbase-handler/src/test/results/positive/hbase_ppd_key_range.q.out hbase-handler/src/test/results/positive/hbase_ppd_key_range.q.out index d32b02c..27446b4 100644 --- hbase-handler/src/test/results/positive/hbase_ppd_key_range.q.out +++ hbase-handler/src/test/results/positive/hbase_ppd_key_range.q.out @@ -440,7 +440,7 @@ STAGE PLANS: alias: hbase_pushdown Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (CASE WHEN ((key < '90')) THEN (2) ELSE (4) END > 3) (type: boolean) + predicate: (key >= '90') (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git hbase-handler/src/test/results/positive/hbase_pushdown.q.out hbase-handler/src/test/results/positive/hbase_pushdown.q.out index b362f57..d5661be 100644 --- hbase-handler/src/test/results/positive/hbase_pushdown.q.out +++ hbase-handler/src/test/results/positive/hbase_pushdown.q.out @@ -312,7 +312,7 @@ STAGE PLANS: alias: hbase_pushdown Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (CASE WHEN ((key = 90)) THEN (2) ELSE (4) END > 3) (type: boolean) + predicate: (key <> 90) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: key (type: int), value (type: string) diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java index 4828d70..3d664c1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java @@ -25,11 +25,11 @@ import java.util.Map; import java.util.Set; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.apache.hadoop.hive.ql.exec.NodeUtils.Function; import org.apache.hadoop.hive.ql.plan.OperatorDesc; import org.apache.hadoop.mapred.OutputCollector; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java index ea200db..e02d277 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java @@ -17,8 +17,8 @@ import java.io.Serializable; import java.util.ArrayList; -import java.util.BitSet; import java.util.Arrays; +import java.util.BitSet; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -29,8 +29,6 @@ import java.util.Stack; import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.exec.ColumnInfo; import org.apache.hadoop.hive.ql.exec.FileSinkOperator; @@ -56,6 +54,7 @@ import org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; +import org.apache.hadoop.hive.ql.plan.ExprNodeDescUtils; import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc; import org.apache.hadoop.hive.ql.plan.FileSinkDesc; import org.apache.hadoop.hive.ql.plan.GroupByDesc; @@ -72,10 +71,6 @@ import org.apache.hadoop.hive.ql.udf.generic.GenericUDFNvl; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPAnd; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqual; -import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrGreaterThan; -import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqualOrLessThan; -import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPGreaterThan; -import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPLessThan; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNot; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNotEqual; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNotNull; @@ -88,19 +83,20 @@ import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters; -import org.apache.hadoop.hive.serde2.objectinspector.StandardConstantStructObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters.Converter; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils; import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory; +import org.apache.hadoop.hive.serde2.objectinspector.StandardConstantStructObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils; import org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; @@ -492,9 +488,9 @@ private static void propagate(GenericUDF udf, List newExprs, RowSc return; } // If both sides are constants, there is nothing to propagate - ExprNodeColumnDesc c = getColumnExpr(lOperand); + ExprNodeColumnDesc c = ExprNodeDescUtils.getColumnExpr(lOperand); if (null == c) { - c = getColumnExpr(rOperand); + c = ExprNodeDescUtils.getColumnExpr(rOperand); } if (null == c) { // we need a column expression on other side. @@ -527,13 +523,6 @@ private static void propagate(GenericUDF udf, List newExprs, RowSc } } - private static ExprNodeColumnDesc getColumnExpr(ExprNodeDesc expr) { - while (FunctionRegistry.isOpCast(expr)) { - expr = expr.getChildren().get(0); - } - return (expr instanceof ExprNodeColumnDesc) ? (ExprNodeColumnDesc)expr : null; - } - private static ExprNodeDesc shortcutFunction(GenericUDF udf, List newExprs, Operator op) throws UDFArgumentException { if (udf instanceof GenericUDFOPEqual) { @@ -623,9 +612,9 @@ private static ExprNodeDesc shortcutFunction(GenericUDF udf, List // Try to fold (key 86) and (key is not null) to (key 86) // where can be "=", ">=", "<=", ">", "<". // Note: (key <> 86) and (key is not null) cannot be folded - ExprNodeColumnDesc colDesc = getColumnExpr(childExpr.getChildren().get(0)); + ExprNodeColumnDesc colDesc = ExprNodeDescUtils.getColumnExpr(childExpr.getChildren().get(0)); if (null == colDesc) { - colDesc = getColumnExpr(childExpr.getChildren().get(1)); + colDesc = ExprNodeDescUtils.getColumnExpr(childExpr.getChildren().get(1)); } if (colDesc != null) { compareExprs.add(colDesc); diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java index 60240bd..f6be583 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/DynamicPartitionPruningOptimization.java @@ -26,8 +26,6 @@ import java.util.Map; import java.util.Stack; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; import org.apache.hadoop.hive.ql.exec.FilterOperator; @@ -59,12 +57,15 @@ import org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; +import org.apache.hadoop.hive.ql.plan.ExprNodeDescUtils; import org.apache.hadoop.hive.ql.plan.ExprNodeDynamicListDesc; import org.apache.hadoop.hive.ql.plan.FilterDesc; import org.apache.hadoop.hive.ql.plan.GroupByDesc; import org.apache.hadoop.hive.ql.plan.OperatorDesc; import org.apache.hadoop.hive.ql.plan.PlanUtils; import org.apache.hadoop.hive.ql.plan.SelectDesc; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * This optimization looks for expressions of the kind "x IN (RS[n])". If such @@ -77,7 +78,7 @@ static final private Logger LOG = LoggerFactory.getLogger(DynamicPartitionPruningOptimization.class .getName()); - public static class DynamicPartitionPrunerProc implements NodeProcessor { + private class DynamicPartitionPrunerProc implements NodeProcessor { /** * process simply remembers all the dynamic partition pruning expressions @@ -100,7 +101,7 @@ public Object process(Node nd, Stack stack, NodeProcessorCtx procCtx, } } - private static class DynamicListContext { + private class DynamicListContext { public ExprNodeDynamicListDesc desc; public ExprNodeDesc parent; public ExprNodeDesc grandParent; @@ -115,7 +116,7 @@ public DynamicListContext(ExprNodeDynamicListDesc desc, ExprNodeDesc parent, } } - private static class DynamicPartitionPrunerContext implements NodeProcessorCtx, + private class DynamicPartitionPrunerContext implements NodeProcessorCtx, Iterable { public List dynLists = new ArrayList(); @@ -130,27 +131,6 @@ public void addDynamicList(ExprNodeDynamicListDesc desc, ExprNodeDesc parent, } } - private String extractColName(ExprNodeDesc root) { - if (root instanceof ExprNodeColumnDesc) { - return ((ExprNodeColumnDesc) root).getColumn(); - } else { - if (root.getChildren() == null) { - return null; - } - - String column = null; - for (ExprNodeDesc d: root.getChildren()) { - String candidate = extractColName(d); - if (column != null && candidate != null) { - return null; - } else if (candidate != null) { - column = candidate; - } - } - return column; - } - } - @Override public Object process(Node nd, Stack stack, NodeProcessorCtx procCtx, Object... nodeOutputs) throws SemanticException { @@ -191,16 +171,16 @@ public Object process(Node nd, Stack stack, NodeProcessorCtx procCtx, Obje // collect the dynamic pruning conditions removerContext.dynLists.clear(); - walkExprTree(desc.getPredicate(), removerContext); + collectDynamicPruningConditions(desc.getPredicate(), removerContext); for (DynamicListContext ctx : removerContext) { - String column = extractColName(ctx.parent); + String column = ExprNodeDescUtils.extractColName(ctx.parent); if (ts != null && column != null) { Table table = ts.getConf().getTableMetadata(); if (table != null && table.isPartitionKey(column)) { - String columnType = table.getPartColByName(column).getType(); + String columnType = table.getPartColByName(column).getType(); String alias = ts.getConf().getAlias(); PrunedPartitionList plist = parseContext.getPrunedPartitions(alias, ts); if (LOG.isDebugEnabled()) { @@ -212,6 +192,8 @@ public Object process(Node nd, Stack stack, NodeProcessorCtx procCtx, Obje } } } + // If partKey is a constant, we can check whether the partitions + // have been already filtered if (plist == null || plist.getPartitions().size() != 0) { LOG.info("Dynamic partitioning: " + table.getCompleteName() + "." + column); generateEventOperatorPlan(ctx, parseContext, ts, column, columnType); @@ -253,7 +235,7 @@ private void cleanTableScanFilters(TableScanOperator ts) throws SemanticExceptio // collect the dynamic pruning conditions removerContext.dynLists.clear(); - walkExprTree(ts.getConf().getFilterExpr(), removerContext); + collectDynamicPruningConditions(ts.getConf().getFilterExpr(), removerContext); for (DynamicListContext ctx : removerContext) { // remove the condition by replacing it with "true" @@ -345,7 +327,7 @@ private void generateEventOperatorPlan(DynamicListContext ctx, ParseContext pars } } - private Map walkExprTree(ExprNodeDesc pred, NodeProcessorCtx ctx) + private Map collectDynamicPruningConditions(ExprNodeDesc pred, NodeProcessorCtx ctx) throws SemanticException { // create a walker which walks the tree in a DFS manner while maintaining diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java index c06b8fc..6150733 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/Optimizer.java @@ -23,6 +23,7 @@ import java.util.Set; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.ql.optimizer.ConstantPropagateProcCtx.ConstantPropagateOption; import org.apache.hadoop.hive.ql.optimizer.calcite.translator.HiveOpConverterPostProc; import org.apache.hadoop.hive.ql.optimizer.correlation.CorrelationOptimizer; import org.apache.hadoop.hive.ql.optimizer.correlation.ReduceSinkDeDuplication; @@ -102,16 +103,15 @@ public void initialize(HiveConf hiveConf) { transformations.add(new PredicatePushDown()); } else if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTPPD) && pctx.getContext().isCboSucceeded()) { - if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTCONSTANTPROPAGATION)) { - transformations.add(new ConstantPropagate()); - } transformations.add(new SyntheticJoinPredicate()); transformations.add(new SimplePredicatePushDown()); + transformations.add(new RedundantDynamicPruningConditionsRemoval()); } - if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTCONSTANTPROPAGATION)) { - // We run constant propagation twice because after predicate pushdown, filter expressions - // are combined and may become eligible for reduction (like is not null filter). + if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTCONSTANTPROPAGATION) && + !pctx.getContext().isCboSucceeded()) { + // We run constant propagation twice because after predicate pushdown, filter expressions + // are combined and may become eligible for reduction (like is not null filter). transformations.add(new ConstantPropagate()); } @@ -129,10 +129,15 @@ public void initialize(HiveConf hiveConf) { /* Add list bucketing pruner. */ transformations.add(new ListBucketingPruner()); } - if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTCONSTANTPROPAGATION)) { - // PartitionPruner may create more folding opportunities, run ConstantPropagate again. - transformations.add(new ConstantPropagate()); - } + } + if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTPPD) + && HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTCONSTANTPROPAGATION)) { + // PartitionPruner may create more folding opportunities, run ConstantPropagate again. + transformations.add(new ConstantPropagate()); + } else if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTCONSTANTPROPAGATION) + && pctx.getContext().isCboSucceeded()) { + // Shortcut is enough + transformations.add(new ConstantPropagate(ConstantPropagateOption.SHORTCUT)); } if (HiveConf.getBoolVar(hiveConf, HiveConf.ConfVars.HIVEOPTGROUPBY) || diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/RedundantDynamicPruningConditionsRemoval.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/RedundantDynamicPruningConditionsRemoval.java new file mode 100644 index 0000000..aa22383 --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/RedundantDynamicPruningConditionsRemoval.java @@ -0,0 +1,211 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.optimizer; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Stack; + +import org.apache.calcite.util.Pair; +import org.apache.hadoop.hive.ql.exec.FilterOperator; +import org.apache.hadoop.hive.ql.exec.FunctionRegistry; +import org.apache.hadoop.hive.ql.exec.TableScanOperator; +import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker; +import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher; +import org.apache.hadoop.hive.ql.lib.Dispatcher; +import org.apache.hadoop.hive.ql.lib.GraphWalker; +import org.apache.hadoop.hive.ql.lib.Node; +import org.apache.hadoop.hive.ql.lib.NodeProcessor; +import org.apache.hadoop.hive.ql.lib.NodeProcessorCtx; +import org.apache.hadoop.hive.ql.lib.Rule; +import org.apache.hadoop.hive.ql.lib.RuleRegExp; +import org.apache.hadoop.hive.ql.metadata.Table; +import org.apache.hadoop.hive.ql.parse.ParseContext; +import org.apache.hadoop.hive.ql.parse.SemanticException; +import org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc; +import org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc; +import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; +import org.apache.hadoop.hive.ql.plan.ExprNodeDescUtils; +import org.apache.hadoop.hive.ql.plan.ExprNodeDynamicListDesc; +import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc; +import org.apache.hadoop.hive.ql.plan.FilterDesc; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBaseCompare; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDFIn; +import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.collect.Lists; + + +/** + * Takes a Filter operator on top of a TableScan and removes dynamic pruning conditions + * if static partition pruning has been triggered already. + * + * This transformation is executed when CBO is on and hence we can guarantee that the filtering + * conditions on the partition columns will be immediately on top of the TableScan operator. + * + */ +public class RedundantDynamicPruningConditionsRemoval extends Transform { + + private static final Logger LOG = LoggerFactory.getLogger(RedundantDynamicPruningConditionsRemoval.class); + + + /** + * Transform the query tree. + * + * @param pctx the current parse context + */ + @Override + public ParseContext transform(ParseContext pctx) throws SemanticException { + Map opRules = new LinkedHashMap(); + opRules.put(new RuleRegExp("R1", TableScanOperator.getOperatorName() + "%" + + FilterOperator.getOperatorName() + "%"), new FilterTransformer()); + + Dispatcher disp = new DefaultRuleDispatcher(null, opRules, null); + GraphWalker ogw = new DefaultGraphWalker(disp); + + List topNodes = new ArrayList(); + topNodes.addAll(pctx.getTopOps().values()); + ogw.startWalking(topNodes, null); + return pctx; + } + + private class FilterTransformer implements NodeProcessor { + + @Override + public Object process(Node nd, Stack stack, NodeProcessorCtx procCtx, Object... nodeOutputs) + throws SemanticException { + FilterOperator filter = (FilterOperator) nd; + FilterDesc desc = filter.getConf(); + + TableScanOperator ts = (TableScanOperator) stack.get(stack.size() - 2); + + // collect + CollectContext removalContext = new CollectContext(); + collect(desc.getPredicate(), removalContext); + + for (Pair pair : removalContext.dynamicListNodes) { + ExprNodeDesc child = pair.left; + ExprNodeDesc columnDesc = child.getChildren().get(0); + assert child.getChildren().get(1) instanceof ExprNodeDynamicListDesc; + ExprNodeDesc parent = pair.right; + + String column = ExprNodeDescUtils.extractColName(columnDesc); + if (column != null) { + Table table = ts.getConf().getTableMetadata(); + + boolean generate = false; + if (table != null && table.isPartitionKey(column)) { + generate = true; + for (ExprNodeDesc filterColumnDesc : removalContext.comparatorNodes) { + if (columnDesc.isSame(filterColumnDesc)) { + generate = false; + break; + } + } + } + if (!generate) { + // we can safely remove the condition by replacing it with "true" + if (LOG.isInfoEnabled()) { + LOG.info("Dynamic pruning condition removed: " + child); + } + ExprNodeDesc constNode = new ExprNodeConstantDesc(TypeInfoFactory.booleanTypeInfo, Boolean.TRUE); + if (parent == null) { + desc.setPredicate(constNode); + } else { + int i = parent.getChildren().indexOf(child); + parent.getChildren().remove(i); + parent.getChildren().add(i, constNode); + } + } + } + } + + return false; + } + } + + private static void collect(ExprNodeDesc pred, CollectContext listContext) { + collect(null, pred, listContext); + } + + private static void collect(ExprNodeDesc parent, ExprNodeDesc child, CollectContext listContext) { + if (child instanceof ExprNodeGenericFuncDesc && + ((ExprNodeGenericFuncDesc)child).getGenericUDF() instanceof GenericUDFIn) { + if (child.getChildren().get(1) instanceof ExprNodeDynamicListDesc) { + listContext.dynamicListNodes.add(new Pair(child, parent)); + } + return; + } + if (child instanceof ExprNodeGenericFuncDesc && + ((ExprNodeGenericFuncDesc)child).getGenericUDF() instanceof GenericUDFBaseCompare && + child.getChildren().size() == 2) { + ExprNodeDesc leftCol = child.getChildren().get(0); + ExprNodeDesc rightCol = child.getChildren().get(1); + ExprNodeColumnDesc leftColDesc = ExprNodeDescUtils.getColumnExpr(leftCol); + if (leftColDesc != null) { + boolean rightConstant = false; + if (rightCol instanceof ExprNodeConstantDesc) { + rightConstant = true; + } else if (rightCol instanceof ExprNodeGenericFuncDesc) { + ExprNodeDesc foldedExpr = ConstantPropagateProcFactory.foldExpr((ExprNodeGenericFuncDesc)rightCol); + rightConstant = foldedExpr != null; + } + if (rightConstant) { + listContext.comparatorNodes.add(leftColDesc); + } + } else { + ExprNodeColumnDesc rightColDesc = ExprNodeDescUtils.getColumnExpr(rightCol); + if (rightColDesc != null) { + boolean leftConstant = false; + if (leftCol instanceof ExprNodeConstantDesc) { + leftConstant = true; + } else if (leftCol instanceof ExprNodeGenericFuncDesc) { + ExprNodeDesc foldedExpr = ConstantPropagateProcFactory.foldExpr((ExprNodeGenericFuncDesc)leftCol); + leftConstant = foldedExpr != null; + } + if (leftConstant) { + listContext.comparatorNodes.add(rightColDesc); + } + } + } + return; + } + if (FunctionRegistry.isOpAnd(child)) { + for (ExprNodeDesc newChild : child.getChildren()) { + collect(child, newChild, listContext); + } + } + } + + private class CollectContext implements NodeProcessorCtx { + + private final List> dynamicListNodes; + private final List comparatorNodes; + + public CollectContext() { + this.dynamicListNodes = Lists.>newArrayList(); + this.comparatorNodes = Lists.newArrayList(); + } + + } + +} diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java index 27b0457..7d9ef5d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/SortedDynPartitionOptimizer.java @@ -26,8 +26,6 @@ import java.util.Set; import java.util.Stack; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.apache.hadoop.hive.common.ObjectPair; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.hadoop.hive.metastore.api.Order; @@ -58,6 +56,7 @@ import org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc; 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.FileSinkDesc; import org.apache.hadoop.hive.ql.plan.ListBucketingCtx; import org.apache.hadoop.hive.ql.plan.OperatorDesc; @@ -66,6 +65,8 @@ import org.apache.hadoop.hive.ql.plan.SelectDesc; import org.apache.hadoop.hive.ql.plan.TableDesc; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -291,7 +292,7 @@ private boolean allStaticPartitions(Operator op, } if (op.getColumnExprMap() != null) { for(String dpCol : dpCols) { - ExprNodeDesc end = op.getColumnExprMap().get(dpCol); + ExprNodeDesc end = findConstantExprOrigin(dpCol, op); if (!(end instanceof ExprNodeConstantDesc)) { return false; } @@ -302,6 +303,37 @@ private boolean allStaticPartitions(Operator op, return true; } + // Find the constant origin of a certain column if it is originated from a constant + // Otherwise, it returns the expression that originated the column + private ExprNodeDesc findConstantExprOrigin(String dpCol, Operator op) { + ExprNodeDesc expr = op.getColumnExprMap().get(dpCol); + ExprNodeDesc foldedExpr; + // If it is a function, we try to fold it + if (expr instanceof ExprNodeGenericFuncDesc) { + foldedExpr = ConstantPropagateProcFactory.foldExpr((ExprNodeGenericFuncDesc)expr); + if (foldedExpr == null) { + foldedExpr = expr; + } + } else { + foldedExpr = expr; + } + // If it is a column reference, we will try to resolve it + if (foldedExpr instanceof ExprNodeColumnDesc) { + Operator originOp = null; + for(Operator parentOp : op.getParentOperators()) { + if (parentOp.getColumnExprMap() != null) { + originOp = parentOp; + break; + } + } + if (originOp != null) { + return findConstantExprOrigin(((ExprNodeColumnDesc)foldedExpr).getColumn(), originOp); + } + } + // Otherwise, we return the expression + return foldedExpr; + } + // Remove RS and SEL introduced by enforce bucketing/sorting config // Convert PARENT -> RS -> SEL -> FS to PARENT -> FS private boolean removeRSInsertedByEnforceBucketing(FileSinkOperator fsOp) { diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRexUtil.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRexUtil.java new file mode 100644 index 0000000..3f6dd6a --- /dev/null +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRexUtil.java @@ -0,0 +1,269 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hive.ql.optimizer.calcite; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.apache.calcite.linq4j.Ord; +import org.apache.calcite.plan.RelOptUtil; +import org.apache.calcite.rex.RexBuilder; +import org.apache.calcite.rex.RexCall; +import org.apache.calcite.rex.RexLiteral; +import org.apache.calcite.rex.RexNode; +import org.apache.calcite.rex.RexUtil; +import org.apache.calcite.sql.SqlKind; +import org.apache.calcite.sql.fun.SqlStdOperatorTable; +import org.apache.calcite.sql.type.SqlTypeName; +import org.apache.calcite.util.Pair; +import org.apache.calcite.util.Util; + +import com.google.common.collect.ImmutableList; + + +public class HiveRexUtil { + + /** + * Simplifies a boolean expression. + * + *

In particular:

+ *
    + *
  • {@code simplify(x = 1 AND y = 2 AND NOT x = 1)} + * returns {@code y = 2}
  • + *
  • {@code simplify(x = 1 AND FALSE)} + * returns {@code FALSE}
  • + *
+ */ + public static RexNode simplify(RexBuilder rexBuilder, RexNode e) { + switch (e.getKind()) { + case AND: + return simplifyAnd(rexBuilder, (RexCall) e); + case OR: + return simplifyOr(rexBuilder, (RexCall) e); + case CASE: + return simplifyCase(rexBuilder, (RexCall) e); + case IS_NULL: + return ((RexCall) e).getOperands().get(0).getType().isNullable() + ? e : rexBuilder.makeLiteral(false); + case IS_NOT_NULL: + return ((RexCall) e).getOperands().get(0).getType().isNullable() + ? e : rexBuilder.makeLiteral(true); + default: + return e; + } + } + + private static RexNode simplifyCase(RexBuilder rexBuilder, RexCall call) { + final List operands = call.getOperands(); + final List newOperands = new ArrayList<>(); + for (int i = 0; i < operands.size(); i++) { + RexNode operand = operands.get(i); + if (RexUtil.isCasePredicate(call, i)) { + if (operand.isAlwaysTrue()) { + // Predicate is always TRUE. Make value the ELSE and quit. + newOperands.add(operands.get(i + 1)); + break; + } + if (operand.isAlwaysFalse()) { + // Predicate is always FALSE. Skip predicate and value. + ++i; + continue; + } + } + newOperands.add(operand); + } + assert newOperands.size() % 2 == 1; + switch (newOperands.size()) { + case 1: + return newOperands.get(0); + } + trueFalse: + if (call.getType().getSqlTypeName() == SqlTypeName.BOOLEAN) { + // Optimize CASE where every branch returns constant true or constant + // false: + // CASE + // WHEN p1 THEN TRUE + // WHEN p2 THEN FALSE + // WHEN p3 THEN TRUE + // ELSE FALSE + // END + final List> pairs = + casePairs(rexBuilder, newOperands); + for (Ord> pair : Ord.zip(pairs)) { + if (!pair.e.getValue().isAlwaysTrue() + && !pair.e.getValue().isAlwaysFalse()) { + break trueFalse; + } + } + final List terms = new ArrayList<>(); + final List notTerms = new ArrayList<>(); + for (Ord> pair : Ord.zip(pairs)) { + if (pair.e.getValue().isAlwaysTrue()) { + terms.add(RexUtil.andNot(rexBuilder, pair.e.getKey(), notTerms)); + } else { + notTerms.add(pair.e.getKey()); + } + } + return RexUtil.composeDisjunction(rexBuilder, terms, false); + } + if (newOperands.equals(operands)) { + return call; + } + return call.clone(call.getType(), newOperands); + } + + /** Given "CASE WHEN p1 THEN v1 ... ELSE e END" + * returns [(p1, v1), ..., (true, e)]. */ + private static List> casePairs(RexBuilder rexBuilder, + List operands) { + final ImmutableList.Builder> builder = + ImmutableList.builder(); + for (int i = 0; i < operands.size() - 1; i += 2) { + builder.add(Pair.of(operands.get(i), operands.get(i + 1))); + } + builder.add( + Pair.of((RexNode) rexBuilder.makeLiteral(true), Util.last(operands))); + return builder.build(); + } + + public static RexNode simplifyAnd(RexBuilder rexBuilder, RexCall e) { + final List terms = RelOptUtil.conjunctions(e); + final List notTerms = new ArrayList<>(); + final List nullOperands = new ArrayList<>(); + final List notNullOperands = new ArrayList<>(); + final List comparedOperands = new ArrayList<>(); + for (int i = 0; i < terms.size(); i++) { + final RexNode term = terms.get(i); + switch (term.getKind()) { + case NOT: + notTerms.add( + ((RexCall) term).getOperands().get(0)); + terms.remove(i); + --i; + break; + case LITERAL: + if (!RexLiteral.booleanValue(term)) { + return term; // false + } else { + terms.remove(i); + --i; + } + break; + case EQUALS: + case NOT_EQUALS: + case LESS_THAN: + case GREATER_THAN: + case LESS_THAN_OR_EQUAL: + case GREATER_THAN_OR_EQUAL: + RexCall call = (RexCall) term; + RexNode left = call.getOperands().get(0); + comparedOperands.add(left); + // if it is a cast, we include the inner reference + if (left.getKind() == SqlKind.CAST) { + RexCall leftCast = (RexCall) left; + comparedOperands.add(leftCast.getOperands().get(0)); + } + RexNode right = call.getOperands().get(1); + comparedOperands.add(right); + // if it is a cast, we include the inner reference + if (right.getKind() == SqlKind.CAST) { + RexCall rightCast = (RexCall) right; + comparedOperands.add(rightCast.getOperands().get(0)); + } + break; + case IN: + comparedOperands.add(((RexCall) term).operands.get(0)); + break; + case BETWEEN: + comparedOperands.add(((RexCall) term).operands.get(1)); + break; + case IS_NOT_NULL: + notNullOperands.add( + ((RexCall) term).getOperands().get(0)); + terms.remove(i); + --i; + break; + case IS_NULL: + nullOperands.add( + ((RexCall) term).getOperands().get(0)); + } + } + if (terms.isEmpty() && notTerms.isEmpty() && notNullOperands.isEmpty()) { + return rexBuilder.makeLiteral(true); + } + // If one column should be null and is in a comparison predicate, + // it is not satisfiable. + // Example. IS NULL(x) AND x < 5 - not satisfiable + if (!Collections.disjoint(nullOperands, comparedOperands)) { + return rexBuilder.makeLiteral(false); + } + // Remove not necessary IS NOT NULL expressions. + // + // Example. IS NOT NULL(x) AND x < 5 : x < 5 + for (RexNode operand : notNullOperands) { + if (!comparedOperands.contains(operand)) { + terms.add( + rexBuilder.makeCall( + SqlStdOperatorTable.IS_NOT_NULL, operand)); + } + } + // If one of the not-disjunctions is a disjunction that is wholly + // contained in the disjunctions list, the expression is not + // satisfiable. + // + // Example #1. x AND y AND z AND NOT (x AND y) - not satisfiable + // Example #2. x AND y AND NOT (x AND y) - not satisfiable + // Example #3. x AND y AND NOT (x AND y AND z) - may be satisfiable + for (RexNode notDisjunction : notTerms) { + final List terms2 = RelOptUtil.conjunctions(notDisjunction); + if (terms.containsAll(terms2)) { + return rexBuilder.makeLiteral(false); + } + } + // Add the NOT disjunctions back in. + for (RexNode notDisjunction : notTerms) { + terms.add( + rexBuilder.makeCall( + SqlStdOperatorTable.NOT, notDisjunction)); + } + return RexUtil.composeConjunction(rexBuilder, terms, false); + } + + /** Simplifies OR(x, x) into x, and similar. */ + public static RexNode simplifyOr(RexBuilder rexBuilder, RexCall call) { + assert call.getKind() == SqlKind.OR; + final List terms = RelOptUtil.disjunctions(call); + for (int i = 0; i < terms.size(); i++) { + final RexNode term = terms.get(i); + switch (term.getKind()) { + case LITERAL: + if (RexLiteral.booleanValue(term)) { + return term; // true + } else { + terms.remove(i); + --i; + } + } + } + return RexUtil.composeDisjunction(rexBuilder, terms, false); + } + + + +} diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java index d736f21..8f15ec7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveReduceExpressionsRule.java @@ -16,6 +16,15 @@ */ package org.apache.hadoop.hive.ql.optimizer.calcite.rules; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + import org.apache.calcite.plan.RelOptPlanner; import org.apache.calcite.plan.RelOptPredicateList; import org.apache.calcite.plan.RelOptRule; @@ -25,6 +34,7 @@ import org.apache.calcite.rel.core.JoinInfo; import org.apache.calcite.rel.core.Project; import org.apache.calcite.rel.metadata.RelMetadataQuery; +import org.apache.calcite.rel.rules.ValuesReduceRule; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeFactory; import org.apache.calcite.rex.RexBuilder; @@ -50,22 +60,14 @@ import org.apache.calcite.util.Stacks; import org.apache.calcite.util.Util; import org.apache.hadoop.hive.ql.optimizer.calcite.HiveRelFactories; +import org.apache.hadoop.hive.ql.optimizer.calcite.HiveRexUtil; import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveFilter; -import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject; import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveJoin; +import org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveProject; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; - /** * Collection of planner rules that apply various simplifying transformations on * RexNode trees. Currently, there are two transformations: @@ -123,24 +125,23 @@ public FilterReduceExpressionsRule(Class filterClass, @Override public void onMatch(RelOptRuleCall call) { final Filter filter = call.rel(0); - final List expList = - Lists.newArrayList(filter.getCondition()); - RexNode newConditionExp; - boolean reduced; + final RexBuilder rexBuilder = filter.getCluster().getRexBuilder(); + + RexNode newConditionExp = HiveRexUtil.simplify(rexBuilder, filter.getCondition()); + final List expList = Lists.newArrayList(newConditionExp); + boolean reduced = false; final RelOptPredicateList predicates = RelMetadataQuery.instance().getPulledUpPredicates(filter.getInput()); if (reduceExpressions(filter, expList, predicates)) { assert expList.size() == 1; newConditionExp = expList.get(0); reduced = true; - } else { - // No reduction, but let's still test the original - // predicate to see if it was already a constant, - // in which case we don't need any runtime decision - // about filtering. - newConditionExp = filter.getCondition(); - reduced = false; } + + // Even if no reduction, let's still test the original + // predicate to see if it was already a constant, + // in which case we don't need any runtime decision + // about filtering. if (newConditionExp.isAlwaysTrue()) { call.transformTo( filter.getInput()); @@ -151,64 +152,17 @@ else if (newConditionExp instanceof RexLiteral // call.transformTo(call.builder().values(filter.getRowType()).build()); return; } - else if (reduced) { + else if (reduced + || !newConditionExp.toString().equals(filter.getCondition().toString())) { call.transformTo(call.builder(). - push(filter.getInput()).filter(expList.get(0)).build()); + push(filter.getInput()).filter(newConditionExp).build()); } else { - if (newConditionExp instanceof RexCall) { - RexCall rexCall = (RexCall) newConditionExp; - boolean reverse = - rexCall.getOperator() - == SqlStdOperatorTable.NOT; - if (reverse) { - rexCall = (RexCall) rexCall.getOperands().get(0); - } - reduceNotNullableFilter(call, filter, rexCall, reverse); - } return; } // New plan is absolutely better than old plan. call.getPlanner().setImportance(filter, 0.0); } - - private void reduceNotNullableFilter( - RelOptRuleCall call, - Filter filter, - RexCall rexCall, - boolean reverse) { - // If the expression is a IS [NOT] NULL on a non-nullable - // column, then we can either remove the filter or replace - // it with an Empty. - boolean alwaysTrue; - switch (rexCall.getKind()) { - case IS_NULL: - case IS_UNKNOWN: - alwaysTrue = false; - break; - case IS_NOT_NULL: - alwaysTrue = true; - break; - default: - return; - } - if (reverse) { - alwaysTrue = !alwaysTrue; - } - RexNode operand = rexCall.getOperands().get(0); - if (operand instanceof RexInputRef) { - RexInputRef inputRef = (RexInputRef) operand; - if (!inputRef.getType().isNullable()) { - if (alwaysTrue) { - call.transformTo(filter.getInput()); - } else { - // TODO: support LogicalValues - // call.transformTo(call.builder().values(filter.getRowType()).build()); - return; - } - } - } - } } /** diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java index b42e78f..739faa9 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ExprNodeConverter.java @@ -41,8 +41,6 @@ import org.apache.calcite.rex.RexWindowBound; import org.apache.calcite.sql.SqlKind; import org.apache.calcite.sql.type.SqlTypeUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.apache.hadoop.hive.common.type.HiveDecimal; import org.apache.hadoop.hive.common.type.HiveIntervalDayTime; import org.apache.hadoop.hive.common.type.HiveIntervalYearMonth; @@ -70,6 +68,8 @@ import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc; import org.apache.hadoop.hive.ql.udf.generic.GenericUDF; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.google.common.collect.ImmutableSet; @@ -151,71 +151,108 @@ public ExprNodeDesc visitCall(RexCall call) { return gfDesc; } - /** - * TODO: 1. Handle NULL - */ @Override public ExprNodeDesc visitLiteral(RexLiteral literal) { RelDataType lType = literal.getType(); - switch (literal.getType().getSqlTypeName()) { - case BOOLEAN: - return new ExprNodeConstantDesc(TypeInfoFactory.booleanTypeInfo, Boolean.valueOf(RexLiteral - .booleanValue(literal))); - case TINYINT: - return new ExprNodeConstantDesc(TypeInfoFactory.byteTypeInfo, Byte.valueOf(((Number) literal - .getValue3()).byteValue())); - case SMALLINT: - return new ExprNodeConstantDesc(TypeInfoFactory.shortTypeInfo, - Short.valueOf(((Number) literal.getValue3()).shortValue())); - case INTEGER: - return new ExprNodeConstantDesc(TypeInfoFactory.intTypeInfo, - Integer.valueOf(((Number) literal.getValue3()).intValue())); - case BIGINT: - return new ExprNodeConstantDesc(TypeInfoFactory.longTypeInfo, Long.valueOf(((Number) literal - .getValue3()).longValue())); - case FLOAT: - case REAL: - return new ExprNodeConstantDesc(TypeInfoFactory.floatTypeInfo, - Float.valueOf(((Number) literal.getValue3()).floatValue())); - case DOUBLE: - return new ExprNodeConstantDesc(TypeInfoFactory.doubleTypeInfo, - Double.valueOf(((Number) literal.getValue3()).doubleValue())); - case DATE: - return new ExprNodeConstantDesc(TypeInfoFactory.dateTypeInfo, - new Date(((Calendar)literal.getValue()).getTimeInMillis())); - case TIME: - case TIMESTAMP: { - Object value = literal.getValue3(); - if (value instanceof Long) { - value = new Timestamp((Long)value); + if (RexLiteral.value(literal) == null) { + switch (literal.getType().getSqlTypeName()) { + case BOOLEAN: + return new ExprNodeConstantDesc(TypeInfoFactory.booleanTypeInfo, null); + case TINYINT: + return new ExprNodeConstantDesc(TypeInfoFactory.byteTypeInfo, null); + case SMALLINT: + return new ExprNodeConstantDesc(TypeInfoFactory.shortTypeInfo, null); + case INTEGER: + return new ExprNodeConstantDesc(TypeInfoFactory.intTypeInfo, null); + case BIGINT: + return new ExprNodeConstantDesc(TypeInfoFactory.longTypeInfo, null); + case FLOAT: + case REAL: + return new ExprNodeConstantDesc(TypeInfoFactory.floatTypeInfo, null); + case DOUBLE: + return new ExprNodeConstantDesc(TypeInfoFactory.doubleTypeInfo, null); + case DATE: + return new ExprNodeConstantDesc(TypeInfoFactory.dateTypeInfo, null); + case TIME: + case TIMESTAMP: + return new ExprNodeConstantDesc(TypeInfoFactory.timestampTypeInfo, null); + case BINARY: + return new ExprNodeConstantDesc(TypeInfoFactory.binaryTypeInfo, null); + case DECIMAL: + return new ExprNodeConstantDesc( + TypeInfoFactory.getDecimalTypeInfo(lType.getPrecision(), lType.getScale()), null); + case VARCHAR: + case CHAR: + return new ExprNodeConstantDesc(TypeInfoFactory.stringTypeInfo, null); + case INTERVAL_YEAR_MONTH: + return new ExprNodeConstantDesc(TypeInfoFactory.intervalYearMonthTypeInfo, null); + case INTERVAL_DAY_TIME: + return new ExprNodeConstantDesc(TypeInfoFactory.intervalDayTimeTypeInfo, null); + case OTHER: + default: + return new ExprNodeConstantDesc(TypeInfoFactory.voidTypeInfo, null); + } + } else { + switch (literal.getType().getSqlTypeName()) { + case BOOLEAN: + return new ExprNodeConstantDesc(TypeInfoFactory.booleanTypeInfo, Boolean.valueOf(RexLiteral + .booleanValue(literal))); + case TINYINT: + return new ExprNodeConstantDesc(TypeInfoFactory.byteTypeInfo, Byte.valueOf(((Number) literal + .getValue3()).byteValue())); + case SMALLINT: + return new ExprNodeConstantDesc(TypeInfoFactory.shortTypeInfo, + Short.valueOf(((Number) literal.getValue3()).shortValue())); + case INTEGER: + return new ExprNodeConstantDesc(TypeInfoFactory.intTypeInfo, + Integer.valueOf(((Number) literal.getValue3()).intValue())); + case BIGINT: + return new ExprNodeConstantDesc(TypeInfoFactory.longTypeInfo, Long.valueOf(((Number) literal + .getValue3()).longValue())); + case FLOAT: + case REAL: + return new ExprNodeConstantDesc(TypeInfoFactory.floatTypeInfo, + Float.valueOf(((Number) literal.getValue3()).floatValue())); + case DOUBLE: + return new ExprNodeConstantDesc(TypeInfoFactory.doubleTypeInfo, + Double.valueOf(((Number) literal.getValue3()).doubleValue())); + case DATE: + return new ExprNodeConstantDesc(TypeInfoFactory.dateTypeInfo, + new Date(((Calendar)literal.getValue()).getTimeInMillis())); + case TIME: + case TIMESTAMP: { + Object value = literal.getValue3(); + if (value instanceof Long) { + value = new Timestamp((Long)value); + } + return new ExprNodeConstantDesc(TypeInfoFactory.timestampTypeInfo, value); + } + case BINARY: + return new ExprNodeConstantDesc(TypeInfoFactory.binaryTypeInfo, literal.getValue3()); + case DECIMAL: + return new ExprNodeConstantDesc(TypeInfoFactory.getDecimalTypeInfo(lType.getPrecision(), + lType.getScale()), HiveDecimal.create((BigDecimal)literal.getValue3())); + case VARCHAR: + case CHAR: { + return new ExprNodeConstantDesc(TypeInfoFactory.stringTypeInfo, literal.getValue3()); + } + case INTERVAL_YEAR_MONTH: { + BigDecimal monthsBd = (BigDecimal) literal.getValue(); + return new ExprNodeConstantDesc(TypeInfoFactory.intervalYearMonthTypeInfo, + new HiveIntervalYearMonth(monthsBd.intValue())); + } + case INTERVAL_DAY_TIME: { + BigDecimal millisBd = (BigDecimal) literal.getValue(); + // Calcite literal is in millis, we need to convert to seconds + BigDecimal secsBd = millisBd.divide(BigDecimal.valueOf(1000)); + return new ExprNodeConstantDesc(TypeInfoFactory.intervalDayTimeTypeInfo, + new HiveIntervalDayTime(secsBd)); + } + case OTHER: + default: + return new ExprNodeConstantDesc(TypeInfoFactory.voidTypeInfo, literal.getValue3()); } - return new ExprNodeConstantDesc(TypeInfoFactory.timestampTypeInfo, value); - } - case BINARY: - return new ExprNodeConstantDesc(TypeInfoFactory.binaryTypeInfo, literal.getValue3()); - case DECIMAL: - return new ExprNodeConstantDesc(TypeInfoFactory.getDecimalTypeInfo(lType.getPrecision(), - lType.getScale()), HiveDecimal.create((BigDecimal)literal.getValue3())); - case VARCHAR: - case CHAR: { - return new ExprNodeConstantDesc(TypeInfoFactory.stringTypeInfo, literal.getValue3()); - } - case INTERVAL_YEAR_MONTH: { - BigDecimal monthsBd = (BigDecimal) literal.getValue(); - return new ExprNodeConstantDesc(TypeInfoFactory.intervalYearMonthTypeInfo, - new HiveIntervalYearMonth(monthsBd.intValue())); - } - case INTERVAL_DAY_TIME: { - BigDecimal millisBd = (BigDecimal) literal.getValue(); - // Calcite literal is in millis, we need to convert to seconds - BigDecimal secsBd = millisBd.divide(BigDecimal.valueOf(1000)); - return new ExprNodeConstantDesc(TypeInfoFactory.intervalDayTimeTypeInfo, - new HiveIntervalDayTime(secsBd)); - } - case OTHER: - default: - return new ExprNodeConstantDesc(TypeInfoFactory.voidTypeInfo, literal.getValue3()); } } diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java index 122546f..9c929af 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/RexNodeConverter.java @@ -25,7 +25,6 @@ import java.util.Date; import java.util.GregorianCalendar; import java.util.LinkedHashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -40,8 +39,10 @@ import org.apache.calcite.rex.RexUtil; import org.apache.calcite.sql.SqlCollation; import org.apache.calcite.sql.SqlIntervalQualifier; +import org.apache.calcite.sql.SqlKind; import org.apache.calcite.sql.SqlOperator; import org.apache.calcite.sql.fun.SqlCastFunction; +import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.calcite.sql.parser.SqlParserPos; import org.apache.calcite.sql.type.SqlTypeName; import org.apache.calcite.util.ConversionUtil; @@ -67,15 +68,17 @@ import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBaseBinary; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBaseCompare; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCase; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFTimestamp; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToBinary; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToChar; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToDate; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToDecimal; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToVarchar; +import org.apache.hadoop.hive.ql.udf.generic.GenericUDFWhen; import org.apache.hadoop.hive.serde2.objectinspector.ConstantObjectInspector; -import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils; import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector.PrimitiveCategory; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils; import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.PrimitiveGrouping; @@ -88,6 +91,7 @@ import com.google.common.collect.ImmutableMap; public class RexNodeConverter { + private static class InputCtx { private final RelDataType calciteInpDataType; private final ImmutableMap hiveNameToPosMap; @@ -157,7 +161,7 @@ private RexNode convert(final ExprNodeGenericFuncDesc func) throws SemanticExcep ExprNodeDesc tmpExprNode; RexNode tmpRN; - List childRexNodeLst = new LinkedList(); + List childRexNodeLst = new ArrayList(); Builder argTypeBldr = ImmutableList. builder(); // TODO: 1) Expand to other functions as needed 2) What about types other than primitive. @@ -169,6 +173,7 @@ private RexNode convert(final ExprNodeGenericFuncDesc func) throws SemanticExcep && (PrimitiveGrouping.NUMERIC_GROUP == PrimitiveObjectInspectorUtils.getPrimitiveGrouping( ((PrimitiveTypeInfo) func.getTypeInfo()).getPrimitiveCategory()))); boolean isCompare = !isNumeric && tgtUdf instanceof GenericUDFBaseCompare; + boolean isWhenCase = tgtUdf instanceof GenericUDFWhen || tgtUdf instanceof GenericUDFCase; if (isNumeric) { tgtDT = func.getTypeInfo(); @@ -178,9 +183,14 @@ private RexNode convert(final ExprNodeGenericFuncDesc func) throws SemanticExcep } else if (isCompare && (func.getChildren().size() == 2)) { tgtDT = FunctionRegistry.getCommonClassForComparison(func.getChildren().get(0) .getTypeInfo(), func.getChildren().get(1).getTypeInfo()); + } else if (isWhenCase) { + // If it is a CASE or WHEN, we need to check that children do not contain stateful functions + // as they are not allowed + if (checkForStatefulFunctions(func.getChildren())) { + throw new SemanticException("Stateful expressions cannot be used inside of CASE"); + } } - for (ExprNodeDesc childExpr : func.getChildren()) { tmpExprNode = childExpr; if (tgtDT != null @@ -196,8 +206,8 @@ private RexNode convert(final ExprNodeGenericFuncDesc func) throws SemanticExcep } else { throw new AssertionError("Unexpected " + tgtDT + " - not a numeric op or compare"); } - } + argTypeBldr.add(TypeConverter.convert(tmpExprNode.getTypeInfo(), cluster.getTypeFactory())); tmpRN = convert(tmpExprNode); childRexNodeLst.add(tmpRN); @@ -213,6 +223,10 @@ private RexNode convert(final ExprNodeGenericFuncDesc func) throws SemanticExcep retType = TypeConverter.convert(func.getTypeInfo(), cluster.getTypeFactory()); SqlOperator calciteOp = SqlFunctionConverter.getCalciteOperator(func.getFuncText(), func.getGenericUDF(), argTypeBldr.build(), retType); + // If it is a case operator, we need to rewrite it + if (calciteOp.getKind() == SqlKind.CASE) { + childRexNodeLst = rewriteCaseChildren(func, childRexNodeLst); + } expr = cluster.getRexBuilder().makeCall(calciteOp, childRexNodeLst); } else { retType = expr.getType(); @@ -272,6 +286,70 @@ private RexNode handleExplicitCast(ExprNodeGenericFuncDesc func, List c return castExpr; } + /* + * Hive syntax allows to define CASE expressions in two ways: + * - CASE a WHEN b THEN c [WHEN d THEN e]* [ELSE f] END (translated into the + * "case" function, ELSE clause is optional) + * - CASE WHEN a THEN b [WHEN c THEN d]* [ELSE e] END (translated into the + * "when" function, ELSE clause is optional) + * However, Calcite only has the equivalent to the "when" Hive function. Thus, + * we need to transform the "case" function into "when". Further, ELSE clause is + * not optional in Calcite. + * + * Example. Consider the following statement: + * CASE x + y WHEN 1 THEN 'fee' WHEN 2 THEN 'fie' END + * It will be transformed into: + * CASE WHEN =(x + y, 1) THEN 'fee' WHEN =(x + y, 2) THEN 'fie' ELSE null END + */ + private List rewriteCaseChildren(ExprNodeGenericFuncDesc func, List childRexNodeLst) + throws SemanticException { + List newChildRexNodeLst = new ArrayList(); + if (FunctionRegistry.getNormalizedFunctionName(func.getFuncText()).equals("case")) { + RexNode firstPred = childRexNodeLst.get(0); + int length = childRexNodeLst.size() % 2 == 1 ? + childRexNodeLst.size() : childRexNodeLst.size() - 1; + for (int i = 1; i < length; i++) { + if (i % 2 == 1) { + // We rewrite it + newChildRexNodeLst.add( + cluster.getRexBuilder().makeCall( + SqlStdOperatorTable.EQUALS, firstPred, childRexNodeLst.get(i))); + } else { + newChildRexNodeLst.add(childRexNodeLst.get(i)); + } + } + // The else clause + if (length != childRexNodeLst.size()) { + newChildRexNodeLst.add(childRexNodeLst.get(childRexNodeLst.size()-1)); + } + } else { + newChildRexNodeLst.addAll(childRexNodeLst); + } + // Calcite always needs the else clause to be defined explicitly + if (newChildRexNodeLst.size() % 2 == 0) { + newChildRexNodeLst.add(cluster.getRexBuilder().makeNullLiteral( + newChildRexNodeLst.get(newChildRexNodeLst.size()-1).getType().getSqlTypeName())); + } + return newChildRexNodeLst; + } + + private static boolean checkForStatefulFunctions(List list) { + for (ExprNodeDesc node : list) { + if (node instanceof ExprNodeGenericFuncDesc) { + GenericUDF nodeUDF = ((ExprNodeGenericFuncDesc) node).getGenericUDF(); + // Stateful? + if (FunctionRegistry.isStateful(nodeUDF)) { + return true; + } + if (node.getChildren() != null && !node.getChildren().isEmpty() && + checkForStatefulFunctions(node.getChildren())) { + return true; + } + } + } + return false; + } + private InputCtx getInputCtx(ExprNodeColumnDesc col) throws SemanticException { InputCtx ctxLookingFor = null; diff --git ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java index 19aa414..1380230 100644 --- ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java +++ ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/SqlFunctionConverter.java @@ -203,6 +203,7 @@ public static ASTNode buildAST(SqlOperator op, List children) { case BETWEEN: case ROW: case IS_NOT_NULL: + case CASE: node = (ASTNode) ParseDriver.adaptor.create(HiveParser.TOK_FUNCTION, "TOK_FUNCTION"); node.addChild((ASTNode) ParseDriver.adaptor.create(hToken.type, hToken.text)); break; @@ -326,10 +327,13 @@ private static String getName(GenericUDF hiveUDF) { hToken(HiveParser.GREATERTHANOREQUALTO, ">=")); registerFunction("!", SqlStdOperatorTable.NOT, hToken(HiveParser.KW_NOT, "not")); registerFunction("<>", SqlStdOperatorTable.NOT_EQUALS, hToken(HiveParser.NOTEQUAL, "<>")); + registerDuplicateFunction("!=", SqlStdOperatorTable.NOT_EQUALS, hToken(HiveParser.NOTEQUAL, "<>")); registerFunction("in", HiveIn.INSTANCE, hToken(HiveParser.Identifier, "in")); registerFunction("between", HiveBetween.INSTANCE, hToken(HiveParser.Identifier, "between")); registerFunction("struct", SqlStdOperatorTable.ROW, hToken(HiveParser.Identifier, "struct")); registerFunction("isnotnull", SqlStdOperatorTable.IS_NOT_NULL, hToken(HiveParser.TOK_ISNOTNULL, "TOK_ISNOTNULL")); + registerFunction("when", SqlStdOperatorTable.CASE, hToken(HiveParser.Identifier, "when")); + registerDuplicateFunction("case", SqlStdOperatorTable.CASE, hToken(HiveParser.Identifier, "when")); } private void registerFunction(String name, SqlOperator calciteFn, HiveToken hiveToken) { diff --git ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java index e2d404b..243cc40 100644 --- ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java +++ ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java @@ -1077,13 +1077,13 @@ private RelNode applyPreJoinOrderingTransforms(RelNode basePlan, RelMetadataProv HiveFilterJoinRule.FILTER_ON_JOIN, new HiveFilterAggregateTransposeRule(Filter.class, HiveRelFactories.HIVE_FILTER_FACTORY, Aggregate.class), new FilterMergeRule(HiveRelFactories.HIVE_FILTER_FACTORY), + HiveReduceExpressionsRule.PROJECT_INSTANCE, + HiveReduceExpressionsRule.FILTER_INSTANCE, + HiveReduceExpressionsRule.JOIN_INSTANCE, HiveJoinAddNotNullRule.INSTANCE_JOIN, HiveJoinAddNotNullRule.INSTANCE_SEMIJOIN, HiveJoinPushTransitivePredicatesRule.INSTANCE_JOIN, - HiveJoinPushTransitivePredicatesRule.INSTANCE_SEMIJOIN, - HiveReduceExpressionsRule.PROJECT_INSTANCE, - HiveReduceExpressionsRule.FILTER_INSTANCE, - HiveReduceExpressionsRule.JOIN_INSTANCE); + HiveJoinPushTransitivePredicatesRule.INSTANCE_SEMIJOIN); perfLogger.PerfLogEnd(this.getClass().getName(), PerfLogger.OPTIMIZER, "Calcite: Prejoin ordering transformation, PPD, not null predicates, transitive inference, constant folding"); diff --git ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java index 0223038..223718e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java +++ ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeDescUtils.java @@ -28,7 +28,6 @@ import org.apache.hadoop.hive.ql.exec.FunctionRegistry; import org.apache.hadoop.hive.ql.exec.Operator; import org.apache.hadoop.hive.ql.exec.UDF; -import org.apache.hadoop.hive.ql.optimizer.ConstantPropagateProcFactory; import org.apache.hadoop.hive.ql.parse.SemanticException; import org.apache.hadoop.hive.ql.udf.generic.GenericUDF; import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge; @@ -606,4 +605,32 @@ public static ExprNodeDesc flattenExpr(ExprNodeDesc source) { // constant or null expr, just return return source; } + + public static String extractColName(ExprNodeDesc root) { + if (root instanceof ExprNodeColumnDesc) { + return ((ExprNodeColumnDesc) root).getColumn(); + } else { + if (root.getChildren() == null) { + return null; + } + + String column = null; + for (ExprNodeDesc d: root.getChildren()) { + String candidate = extractColName(d); + if (column != null && candidate != null) { + return null; + } else if (candidate != null) { + column = candidate; + } + } + return column; + } + } + + public static ExprNodeColumnDesc getColumnExpr(ExprNodeDesc expr) { + while (FunctionRegistry.isOpCast(expr)) { + expr = expr.getChildren().get(0); + } + return (expr instanceof ExprNodeColumnDesc) ? (ExprNodeColumnDesc)expr : null; + } } diff --git ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out index 8ef9984..ff95252 100644 --- ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out +++ ql/src/test/results/clientpositive/annotate_stats_join_pkfk.q.out @@ -406,7 +406,7 @@ STAGE PLANS: alias: s Statistics: Num rows: 12 Data size: 48 Basic stats: COMPLETE Column stats: PARTIAL Filter Operator - predicate: (s_store_sk is not null and (s_company_id > 0)) (type: boolean) + predicate: ((s_company_id > 0) and s_store_sk is not null) (type: boolean) Statistics: Num rows: 4 Data size: 16 Basic stats: COMPLETE Column stats: PARTIAL Select Operator expressions: s_store_sk (type: int) @@ -421,7 +421,7 @@ STAGE PLANS: alias: ss Statistics: Num rows: 1000 Data size: 7668 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (ss_store_sk is not null and (ss_quantity > 10)) (type: boolean) + predicate: ((ss_quantity > 10) and ss_store_sk is not null) (type: boolean) Statistics: Num rows: 321 Data size: 2460 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ss_store_sk (type: int) @@ -471,7 +471,7 @@ STAGE PLANS: alias: s Statistics: Num rows: 12 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (s_store_sk is not null and (s_floor_space > 0)) (type: boolean) + predicate: ((s_floor_space > 0) and s_store_sk is not null) (type: boolean) Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: s_store_sk (type: int) @@ -551,7 +551,7 @@ STAGE PLANS: alias: ss Statistics: Num rows: 1000 Data size: 7668 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (ss_store_sk is not null and (ss_quantity > 10)) (type: boolean) + predicate: ((ss_quantity > 10) and ss_store_sk is not null) (type: boolean) Statistics: Num rows: 321 Data size: 2460 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ss_store_sk (type: int) @@ -788,7 +788,7 @@ STAGE PLANS: alias: s Statistics: Num rows: 12 Data size: 96 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (s_store_sk is not null and (s_floor_space > 1000)) (type: boolean) + predicate: ((s_floor_space > 1000) and s_store_sk is not null) (type: boolean) Statistics: Num rows: 4 Data size: 32 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: s_store_sk (type: int) @@ -859,7 +859,7 @@ STAGE PLANS: alias: ss Statistics: Num rows: 1000 Data size: 7668 Basic stats: COMPLETE Column stats: COMPLETE Filter Operator - predicate: (ss_store_sk is not null and (ss_quantity > 10)) (type: boolean) + predicate: ((ss_quantity > 10) and ss_store_sk is not null) (type: boolean) Statistics: Num rows: 321 Data size: 2460 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: ss_store_sk (type: int) diff --git ql/src/test/results/clientpositive/auto_join32.q.out ql/src/test/results/clientpositive/auto_join32.q.out index e5249a2..2ebec97 100644 --- ql/src/test/results/clientpositive/auto_join32.q.out +++ ql/src/test/results/clientpositive/auto_join32.q.out @@ -412,7 +412,7 @@ STAGE PLANS: alias: s Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (name is not null and (p = 'bar')) (type: boolean) + predicate: ((p = 'bar') and name is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: name (type: string) diff --git ql/src/test/results/clientpositive/auto_join_without_localtask.q.out ql/src/test/results/clientpositive/auto_join_without_localtask.q.out index 9393aff..85df1d6 100644 --- ql/src/test/results/clientpositive/auto_join_without_localtask.q.out +++ ql/src/test/results/clientpositive/auto_join_without_localtask.q.out @@ -704,7 +704,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (UDFToDouble(key) > 100.0)) (type: boolean) + predicate: ((UDFToDouble(key) > 100.0) and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -889,7 +889,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (UDFToDouble(key) > 100.0)) (type: boolean) + predicate: ((UDFToDouble(key) > 100.0) and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -937,7 +937,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (UDFToDouble(key) > 100.0)) (type: boolean) + predicate: ((UDFToDouble(key) > 100.0) and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out index b5dfce3..fa73acf 100644 --- ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out +++ ql/src/test/results/clientpositive/bucketsortoptimize_insert_7.q.out @@ -85,7 +85,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and ((key = 0) or (key = 5))) (type: boolean) + predicate: (((key = 0) or (key = 5)) and key is not null) (type: boolean) Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) diff --git ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out index ba83ace..2d3f12b 100644 --- ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out +++ ql/src/test/results/clientpositive/cbo_rp_lineage2.q.out @@ -523,7 +523,7 @@ PREHOOK: Input: default@src1 PREHOOK: Input: default@src2 PREHOOK: Output: database:default PREHOOK: Output: default@dest3 -{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create table dest3 as\n select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"(src1.key is not null and (length(src1.key) > 1))","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key = src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"(src2.key2 is not null and (length(src2.key2) > 1))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create table dest3 as\n select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"((length(src1.key) > 1) and src1.key is not null)","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key = src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"((length(src2.key2) > 1) and src2.key2 is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} PREHOOK: query: insert overwrite table dest2 select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3 PREHOOK: type: QUERY @@ -646,7 +646,7 @@ PREHOOK: type: QUERY PREHOOK: Input: default@dest_l2 PREHOOK: Input: default@dest_l3 #### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"(a.id is not null and (a.c2 <> 10))","edgeType":"PREDICATE"},{"sources":[8,10],"targets":[0,1,2,3],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[10,7],"targets":[0,1,2,3],"expression":"(b.id is not null and (b.c3 > 0))","edgeType":"PREDICATE"},{"sources":[9],"targets":[0,1,2,3],"expression":"(count(default.dest_l2.c2) > 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"((a.c2 <> 10) and a.id is not null)","edgeType":"PREDICATE"},{"sources":[9,10],"targets":[0,1,2,3],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[7,10],"targets":[0,1,2,3],"expression":"((b.c3 > 0) and b.id is not null)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3],"expression":"(count(default.dest_l2.c2) > 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"_c0"},{"id":1,"vertexType":"COLUMN","vertexId":"_c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]} 1 1 s2 15 PREHOOK: query: drop table if exists t PREHOOK: type: DROPTABLE @@ -659,7 +659,7 @@ PREHOOK: Input: default@dest_l2 PREHOOK: Input: default@dest_l3 PREHOOK: Output: database:default PREHOOK: Output: default@t -{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on (a.id = b.id)\nwhere a.id > 0 and b.c3 = 15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id is not null and (a.id > 0))","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1],"expression":"(b.id is not null and (b.c3 = 15) and (b.id > 0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on (a.id = b.id)\nwhere a.id > 0 and b.c3 = 15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id > 0)","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1],"expression":"((b.c3 = 15) and (b.id > 0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]} PREHOOK: query: SELECT substr(src1.key,1,1), count(DISTINCT substr(src1.value,5)), concat(substr(src1.key,1,1),sum(substr(src1.value,5))) from src1 diff --git ql/src/test/results/clientpositive/constprog_partitioner.q.out ql/src/test/results/clientpositive/constprog_partitioner.q.out index 3dced2a..12ac9c8 100644 --- ql/src/test/results/clientpositive/constprog_partitioner.q.out +++ ql/src/test/results/clientpositive/constprog_partitioner.q.out @@ -108,7 +108,7 @@ STAGE PLANS: alias: li Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (l_orderkey is not null and (l_linenumber = 1)) (type: boolean) + predicate: ((l_linenumber = 1) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int), 1 (type: int) @@ -124,7 +124,7 @@ STAGE PLANS: alias: li Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((l_shipmode = 'AIR') and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_shipmode = 'AIR') and (l_linenumber = 1)) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int) diff --git ql/src/test/results/clientpositive/constprog_when_case.q.out ql/src/test/results/clientpositive/constprog_when_case.q.out index 2f939ba..4d2214a 100644 --- ql/src/test/results/clientpositive/constprog_when_case.q.out +++ ql/src/test/results/clientpositive/constprog_when_case.q.out @@ -46,7 +46,7 @@ STAGE PLANS: alias: src_orc Statistics: Num rows: 1000 Data size: 266000 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: if(CASE WHEN (bool0) THEN (true) WHEN ((not bool0)) THEN (false) END, key0, if(CASE WHEN (bool0) THEN (false) WHEN ((not bool0)) THEN (true) END, key1, key2)) (type: string) + expressions: if(CASE WHEN (bool0) THEN (true) WHEN ((not bool0)) THEN (false) ELSE (null) END, key0, if(CASE WHEN (bool0) THEN (false) WHEN ((not bool0)) THEN (true) ELSE (null) END, key1, key2)) (type: string) outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 266000 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/correlationoptimizer13.q.out ql/src/test/results/clientpositive/correlationoptimizer13.q.out index 2694df8..8aeec44 100644 --- ql/src/test/results/clientpositive/correlationoptimizer13.q.out +++ ql/src/test/results/clientpositive/correlationoptimizer13.q.out @@ -162,7 +162,7 @@ STAGE PLANS: alias: x Statistics: Num rows: 1028 Data size: 22964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) (type: boolean) + predicate: (((c2 > 100) and (c1 < 120)) and c3 is not null) (type: boolean) Statistics: Num rows: 114 Data size: 2546 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: c3 (type: string), c1 (type: int) diff --git ql/src/test/results/clientpositive/correlationoptimizer8.q.out ql/src/test/results/clientpositive/correlationoptimizer8.q.out index 0065891..1a51fc5 100644 --- ql/src/test/results/clientpositive/correlationoptimizer8.q.out +++ ql/src/test/results/clientpositive/correlationoptimizer8.q.out @@ -103,7 +103,7 @@ STAGE PLANS: alias: x Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (type: boolean) + predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -290,7 +290,7 @@ STAGE PLANS: alias: x Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (type: boolean) + predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -963,7 +963,7 @@ STAGE PLANS: alias: x Statistics: Num rows: 25 Data size: 191 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (type: boolean) + predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/correlationoptimizer9.q.out ql/src/test/results/clientpositive/correlationoptimizer9.q.out index 7c7d25c..59f6abd 100644 --- ql/src/test/results/clientpositive/correlationoptimizer9.q.out +++ ql/src/test/results/clientpositive/correlationoptimizer9.q.out @@ -464,7 +464,7 @@ STAGE PLANS: alias: x Statistics: Num rows: 1028 Data size: 22964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) (type: boolean) + predicate: (((c2 > 100) and (c1 < 120)) and c3 is not null) (type: boolean) Statistics: Num rows: 114 Data size: 2546 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: c1 (type: int), c3 (type: string) @@ -579,7 +579,7 @@ STAGE PLANS: alias: x Statistics: Num rows: 1028 Data size: 22964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((c2 > 100) and c3 is not null) and (c1 < 120)) (type: boolean) + predicate: (((c2 > 100) and (c1 < 120)) and c3 is not null) (type: boolean) Statistics: Num rows: 114 Data size: 2546 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: c1 (type: int), c3 (type: string) diff --git ql/src/test/results/clientpositive/decimal_udf.q.out ql/src/test/results/clientpositive/decimal_udf.q.out index 54c9f05..dad8663 100644 --- ql/src/test/results/clientpositive/decimal_udf.q.out +++ ql/src/test/results/clientpositive/decimal_udf.q.out @@ -973,7 +973,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (key <> 0)) (type: boolean) + predicate: (key <> 0) (type: boolean) Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (key / key) (type: decimal(38,24)) @@ -1039,7 +1039,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (value <> 0)) (type: boolean) + predicate: (value <> 0) (type: boolean) Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (key / CAST( value AS decimal(10,0))) (type: decimal(31,21)) @@ -1095,7 +1095,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (value <> 0)) (type: boolean) + predicate: (value <> 0) (type: boolean) Statistics: Num rows: 3 Data size: 359 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (UDFToDouble(key) / (UDFToDouble(value) / 2.0)) (type: double) diff --git ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out index 3b04326..ea9529d 100644 --- ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out +++ ql/src/test/results/clientpositive/dynamic_rdd_cache.q.out @@ -1025,7 +1025,7 @@ STAGE PLANS: alias: date_dim Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (((d_year = 1999) and d_date_sk is not null) and (d_moy = 3)) (type: boolean) + predicate: (((d_year = 1999) and (d_moy = 3)) and d_date_sk is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: d_date_sk (type: int) @@ -1084,10 +1084,10 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) (type: boolean) + predicate: CASE WHEN ((_col4 = 0.0)) THEN (false) ELSE (((_col5 / _col4) > 1.0)) END (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator - expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE (_col4) WHEN (0) THEN (null) ELSE ((_col5 / _col4)) END (type: double) + expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE WHEN ((_col4 = 0.0)) THEN (null) ELSE ((_col5 / _col4)) END (type: double) outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE File Output Operator @@ -1262,7 +1262,7 @@ STAGE PLANS: alias: date_dim Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (((d_year = 1999) and d_date_sk is not null) and (d_moy = 4)) (type: boolean) + predicate: (((d_year = 1999) and (d_moy = 4)) and d_date_sk is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: d_date_sk (type: int) @@ -1321,10 +1321,10 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) (type: boolean) + predicate: CASE WHEN ((_col4 = 0.0)) THEN (false) ELSE (((_col5 / _col4) > 1.0)) END (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator - expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE (_col4) WHEN (0) THEN (null) ELSE ((_col5 / _col4)) END (type: double) + expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE WHEN ((_col4 = 0.0)) THEN (null) ELSE ((_col5 / _col4)) END (type: double) outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/filter_cond_pushdown.q.out ql/src/test/results/clientpositive/filter_cond_pushdown.q.out index 0649353..738286e 100644 --- ql/src/test/results/clientpositive/filter_cond_pushdown.q.out +++ ql/src/test/results/clientpositive/filter_cond_pushdown.q.out @@ -37,7 +37,7 @@ STAGE PLANS: alias: f Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (value <> '')) and key is not null) (type: boolean) + predicate: ((value <> '') and key is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -79,7 +79,7 @@ STAGE PLANS: alias: f Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (value <> '')) (type: boolean) + predicate: (value <> '') (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) @@ -163,7 +163,7 @@ STAGE PLANS: alias: f Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (value <> '')) and key is not null) (type: boolean) + predicate: ((value <> '') and key is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -205,7 +205,7 @@ STAGE PLANS: alias: f Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (value <> '')) (type: boolean) + predicate: (value <> '') (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) @@ -419,7 +419,7 @@ STAGE PLANS: alias: f Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((key is not null and ((value = '2008-04-10') or (value = '2008-04-08'))) and value is not null) and (value <> '')) (type: boolean) + predicate: ((((value = '2008-04-10') or (value = '2008-04-08')) and (value <> '')) and key is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/filter_join_breaktask.q.out ql/src/test/results/clientpositive/filter_join_breaktask.q.out index 44add83..8ccd129 100644 --- ql/src/test/results/clientpositive/filter_join_breaktask.q.out +++ ql/src/test/results/clientpositive/filter_join_breaktask.q.out @@ -168,7 +168,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: ((key is not null and value is not null) and (value <> '')) (type: boolean) + predicate: ((value <> '') and key is not null) (type: boolean) Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -279,7 +279,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (value is not null and (value <> '')) (type: boolean) + predicate: (value <> '') (type: boolean) Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) diff --git ql/src/test/results/clientpositive/fold_case.q.out ql/src/test/results/clientpositive/fold_case.q.out index aaf1fc4..90ea0af 100644 --- ql/src/test/results/clientpositive/fold_case.q.out +++ ql/src/test/results/clientpositive/fold_case.q.out @@ -16,7 +16,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: NVL((key = '238'),false) (type: boolean) + predicate: (key = '238') (type: boolean) Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE @@ -67,10 +67,10 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (not NVL((key = '238'),false)) (type: boolean) - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + predicate: (key <> '238') (type: boolean) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count(1) mode: hash @@ -366,15 +366,15 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (not NVL((key = '238'),false)) (type: boolean) - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + predicate: (key <> '238') (type: boolean) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: CASE (key) WHEN ('238') THEN (null) ELSE (false) END (type: boolean) + expressions: CASE WHEN ((key = '238')) THEN (null) ELSE (false) END (type: boolean) outputColumnNames: _col0 - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -442,10 +442,10 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key <> '238') (type: boolean) - Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + predicate: (not (key = '238')) (type: boolean) + Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator - Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count(1) mode: hash diff --git ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out index f6badb7..106ad6b 100644 --- ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out +++ ql/src/test/results/clientpositive/fold_eq_with_case_when.q.out @@ -101,10 +101,10 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: NVL((key = '238'),false) (type: boolean) + predicate: (key = '238') (type: boolean) Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: key (type: string) + expressions: '238' (type: string) outputColumnNames: _col0 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -137,15 +137,15 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE (key) WHEN ('238') THEN (true) WHEN ('94') THEN (true) ELSE (false) END (type: boolean) - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + predicate: ((key = '238') or (key = '94')) (type: boolean) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -173,7 +173,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: NVL((key = '238'),false) (type: boolean) + predicate: CASE WHEN ((key <> '238')) THEN ((key = '238')) ELSE ((key = '238')) END (type: boolean) Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string) @@ -209,7 +209,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: CASE (key) WHEN ('238') THEN (CASE WHEN ((key <> '238')) THEN (true) WHEN ((key = '23')) THEN (true) END) END (type: boolean) + predicate: CASE WHEN ((key <> '238')) THEN ((key = '238')) WHEN ((key = '23')) THEN ((key = '238')) ELSE (null) END (type: boolean) Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string) diff --git ql/src/test/results/clientpositive/fold_when.q.out ql/src/test/results/clientpositive/fold_when.q.out index 699341e..5b68408 100644 --- ql/src/test/results/clientpositive/fold_when.q.out +++ ql/src/test/results/clientpositive/fold_when.q.out @@ -156,7 +156,7 @@ STAGE PLANS: predicate: (key = '238') (type: boolean) Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: '238' (type: string) + expressions: key (type: string) outputColumnNames: _col0 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -194,7 +194,7 @@ STAGE PLANS: predicate: (key = '238') (type: boolean) Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: '238' (type: string) + expressions: key (type: string) outputColumnNames: _col0 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -290,10 +290,10 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: NVL((key = '238'),false) (type: boolean) + predicate: (key = '238') (type: boolean) Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: key (type: string) + expressions: '238' (type: string) outputColumnNames: _col0 Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -328,15 +328,15 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (not NVL((key = '238'),false)) (type: boolean) - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + predicate: (key <> '238') (type: boolean) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat @@ -435,15 +435,15 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (not NVL((key = '11'),false)) (type: boolean) - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + predicate: (key <> '11') (type: boolean) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string) outputColumnNames: _col0 - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 250 Data size: 2656 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/index_auto_self_join.q.out ql/src/test/results/clientpositive/index_auto_self_join.q.out index 9a6c05f..189a35a 100644 --- ql/src/test/results/clientpositive/index_auto_self_join.q.out +++ ql/src/test/results/clientpositive/index_auto_self_join.q.out @@ -20,7 +20,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean) + predicate: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean) Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -36,7 +36,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean) + predicate: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and value is not null) (type: boolean) Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -172,10 +172,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: a - filterExpr: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean) + filterExpr: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean) + predicate: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean) Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -189,10 +189,10 @@ STAGE PLANS: value expressions: _col0 (type: string) TableScan alias: a - filterExpr: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean) + filterExpr: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and value is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean) + predicate: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and value is not null) (type: boolean) Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/input_part3.q.out ql/src/test/results/clientpositive/input_part3.q.out index 3514bb7..3c1b29b 100644 --- ql/src/test/results/clientpositive/input_part3.q.out +++ ql/src/test/results/clientpositive/input_part3.q.out @@ -16,7 +16,7 @@ STAGE PLANS: alias: x Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: key (type: string), value (type: string), '2008-04-08' (type: string), '11' (type: string) + expressions: key (type: string), value (type: string), '2008-04-08' (type: string), hr (type: string) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE ListSink diff --git ql/src/test/results/clientpositive/join34.q.out ql/src/test/results/clientpositive/join34.q.out index f1bf494..e2c2b1a 100644 --- ql/src/test/results/clientpositive/join34.q.out +++ ql/src/test/results/clientpositive/join34.q.out @@ -159,7 +159,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (type: boolean) + predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/join35.q.out ql/src/test/results/clientpositive/join35.q.out index 3ff41ea..663642c 100644 --- ql/src/test/results/clientpositive/join35.q.out +++ ql/src/test/results/clientpositive/join35.q.out @@ -273,7 +273,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (type: boolean) + predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/join42.q.out ql/src/test/results/clientpositive/join42.q.out index 6b08ab9..4715bb5 100644 --- ql/src/test/results/clientpositive/join42.q.out +++ ql/src/test/results/clientpositive/join42.q.out @@ -80,6 +80,8 @@ POSTHOOK: Output: default@acct POSTHOOK: Lineage: acct.acc_n EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col2, type:string, comment:), ] POSTHOOK: Lineage: acct.aid EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col1, type:string, comment:), ] POSTHOOK: Lineage: acct.brn EXPRESSION [(values__tmp__table__2)values__tmp__table__2.FieldSchema(name:tmp_values_col3, type:string, comment:), ] +Warning: Shuffle Join JOIN[25][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product +Warning: Shuffle Join JOIN[22][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: --[HIVE-10841] (WHERE col is not null) does not work sometimes for queries with many JOIN statements explain select acct.ACC_N, @@ -112,7 +114,8 @@ STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 Stage-3 depends on stages: Stage-2 - Stage-0 depends on stages: Stage-3 + Stage-4 depends on stages: Stage-3 + Stage-0 depends on stages: Stage-4 STAGE PLANS: Stage: Stage-1 @@ -127,26 +130,46 @@ STAGE PLANS: Select Operator Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 4436 (type: int) - sort order: + - Map-reduce partition columns: 4436 (type: int) + sort order: Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE TableScan alias: la Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((aid is not null and pi_id is not null) and (loan_id = 4436)) (type: boolean) + predicate: (((loan_id = 4436) and aid is not null) and pi_id is not null) (type: boolean) Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: aid (type: int), pi_id (type: int) outputColumnNames: _col1, _col2 Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 4436 (type: int) - sort order: + - Map-reduce partition columns: 4436 (type: int) + sort order: Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: int), _col2 (type: int) + Reduce Operator Tree: + Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 + 1 + outputColumnNames: _col2, _col3 + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + File Output Operator + compressed: false + table: + input format: org.apache.hadoop.mapred.SequenceFileInputFormat + output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat + serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe + + Stage: Stage-2 + Map Reduce + Map Operator Tree: + TableScan + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE + value expressions: _col2 (type: int), _col3 (type: int) TableScan alias: fr Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE @@ -156,21 +179,17 @@ STAGE PLANS: Select Operator Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 4436 (type: int) - sort order: + - Map-reduce partition columns: 4436 (type: int) + sort order: Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 - Inner Join 0 to 2 keys: - 0 _col0 (type: int) - 1 _col0 (type: int) - 2 _col0 (type: int) + 0 + 1 outputColumnNames: _col2, _col3 - Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false table: @@ -178,7 +197,7 @@ STAGE PLANS: output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe - Stage: Stage-2 + Stage: Stage-3 Map Reduce Map Operator Tree: TableScan @@ -186,7 +205,7 @@ STAGE PLANS: key expressions: _col2 (type: int) sort order: + Map-reduce partition columns: _col2 (type: int) - Statistics: Num rows: 2 Data size: 8 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1 Data size: 4 Basic stats: COMPLETE Column stats: NONE value expressions: _col3 (type: int) TableScan alias: a @@ -237,7 +256,7 @@ STAGE PLANS: output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat serde: org.apache.hadoop.hive.serde2.lazybinary.LazyBinarySerDe - Stage: Stage-3 + Stage: Stage-4 Map Reduce Map Operator Tree: TableScan @@ -289,6 +308,8 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Shuffle Join JOIN[25][tables = [$hdt$_0, $hdt$_1, $hdt$_2]] in Stage 'Stage-2:MAPRED' is a cross product +Warning: Shuffle Join JOIN[22][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: select acct.ACC_N, acct.brn diff --git ql/src/test/results/clientpositive/join_grp_diff_keys.q.out ql/src/test/results/clientpositive/join_grp_diff_keys.q.out index 29b97a0..53e33d1 100644 --- ql/src/test/results/clientpositive/join_grp_diff_keys.q.out +++ ql/src/test/results/clientpositive/join_grp_diff_keys.q.out @@ -59,7 +59,7 @@ STAGE PLANS: alias: foo Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: ((id is not null and line_id is not null) and (orders <> 'blah')) (type: boolean) + predicate: (((orders <> 'blah') and id is not null) and line_id is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: id (type: int), line_id (type: int) diff --git ql/src/test/results/clientpositive/lineage2.q.out ql/src/test/results/clientpositive/lineage2.q.out index be0b564..66929dd 100644 --- ql/src/test/results/clientpositive/lineage2.q.out +++ ql/src/test/results/clientpositive/lineage2.q.out @@ -523,14 +523,14 @@ PREHOOK: Input: default@src1 PREHOOK: Input: default@src2 PREHOOK: Output: database:default PREHOOK: Output: default@dest3 -{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create table dest3 as\n select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"(src1.key is not null and (length(src1.key) > 1))","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key = src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"(src2.key2 is not null and (length(src2.key2) > 1))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"a2c4e9a3ec678039814f5d84b1e38ce4","queryText":"create table dest3 as\n select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 1","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"((length(src1.key) > 1) and src1.key is not null)","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key = src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"((length(src2.key2) > 1) and src2.key2 is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest3.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest3.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest3.key2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest3.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} PREHOOK: query: insert overwrite table dest2 select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3 PREHOOK: type: QUERY PREHOOK: Input: default@src1 PREHOOK: Input: default@src2 PREHOOK: Output: default@dest2 -{"version":"1.0","engine":"mr","database":"default","hash":"76d84512204ddc576ad4d93f252e4358","queryText":"insert overwrite table dest2\n select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"(src1.key is not null and (length(src1.key) > 3))","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key = src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"(src2.key2 is not null and (length(src2.key2) > 3))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest2.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest2.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest2.key2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest2.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"76d84512204ddc576ad4d93f252e4358","queryText":"insert overwrite table dest2\n select * from src1 JOIN src2 ON src1.key = src2.key2 WHERE length(key) > 3","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1,2,3],"expression":"((length(src1.key) > 3) and src1.key is not null)","edgeType":"PREDICATE"},{"sources":[4,6],"targets":[0,1,2,3],"expression":"(src1.key = src2.key2)","edgeType":"PREDICATE"},{"sources":[6],"targets":[0,1,2,3],"expression":"((length(src2.key2) > 3) and src2.key2 is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest2.key"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest2.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest2.key2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest2.value2"},{"id":4,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":5,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":6,"vertexType":"COLUMN","vertexId":"default.src2.key2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.src2.value2"}]} PREHOOK: query: drop table if exists dest_l1 PREHOOK: type: DROPTABLE PREHOOK: query: CREATE TABLE dest_l1(key INT, value STRING) STORED AS TEXTFILE @@ -646,7 +646,7 @@ PREHOOK: type: QUERY PREHOOK: Input: default@dest_l2 PREHOOK: Input: default@dest_l3 #### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"(a.id is not null and (a.c2 <> 10))","edgeType":"PREDICATE"},{"sources":[8,10],"targets":[0,1,2,3],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[10,7],"targets":[0,1,2,3],"expression":"(b.id is not null and (b.c3 > 0))","edgeType":"PREDICATE"},{"sources":[9],"targets":[0,1,2,3],"expression":"(count(default.dest_l2.c2) > 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"c0"},{"id":1,"vertexType":"COLUMN","vertexId":"c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"01879c619517509d9f5b6ead998bb4bb","queryText":"select sum(a.c1), count(b.c1), b.c2, b.c3\nfrom dest_l2 a join dest_l3 b on (a.id = b.id)\nwhere a.c2 != 10 and b.c3 > 0\ngroup by a.c1, a.c2, a.id, b.c1, b.c2, b.c3\nhaving count(a.c2) > 0\norder by b.c3 limit 5","edges":[{"sources":[4],"targets":[0],"expression":"sum(default.dest_l2.c1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"count(default.dest_l3.c1)","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[8,9],"targets":[0,1,2,3],"expression":"((a.c2 <> 10) and a.id is not null)","edgeType":"PREDICATE"},{"sources":[9,10],"targets":[0,1,2,3],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[7,10],"targets":[0,1,2,3],"expression":"((b.c3 > 0) and b.id is not null)","edgeType":"PREDICATE"},{"sources":[8],"targets":[0,1,2,3],"expression":"(count(default.dest_l2.c2) > 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"c0"},{"id":1,"vertexType":"COLUMN","vertexId":"c1"},{"id":2,"vertexType":"COLUMN","vertexId":"b.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"b.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.c1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.c1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c2"},{"id":7,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"},{"id":8,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":10,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"}]} 1 1 s2 15 PREHOOK: query: drop table if exists t PREHOOK: type: DROPTABLE @@ -659,7 +659,7 @@ PREHOOK: Input: default@dest_l2 PREHOOK: Input: default@dest_l3 PREHOOK: Output: database:default PREHOOK: Output: default@t -{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on (a.id = b.id)\nwhere a.id > 0 and b.c3 = 15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id is not null and (a.id > 0))","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1],"expression":"(b.id is not null and (b.c3 = 15) and (b.id > 0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"0d2f15b494111ffe236d5be42a76fa28","queryText":"create table t as\nselect distinct a.c2, a.c3 from dest_l2 a\ninner join dest_l3 b on (a.id = b.id)\nwhere a.id > 0 and b.c3 = 15","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[4],"targets":[0,1],"expression":"(a.id > 0)","edgeType":"PREDICATE"},{"sources":[4,5],"targets":[0,1],"expression":"(a.id = b.id)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1],"expression":"((b.c3 = 15) and (b.id > 0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.t.c2"},{"id":1,"vertexType":"COLUMN","vertexId":"default.t.c3"},{"id":2,"vertexType":"COLUMN","vertexId":"default.dest_l2.c2"},{"id":3,"vertexType":"COLUMN","vertexId":"default.dest_l2.c3"},{"id":4,"vertexType":"COLUMN","vertexId":"default.dest_l2.id"},{"id":5,"vertexType":"COLUMN","vertexId":"default.dest_l3.id"},{"id":6,"vertexType":"COLUMN","vertexId":"default.dest_l3.c3"}]} PREHOOK: query: SELECT substr(src1.key,1,1), count(DISTINCT substr(src1.value,5)), concat(substr(src1.key,1,1),sum(substr(src1.value,5))) from src1 diff --git ql/src/test/results/clientpositive/lineage3.q.out ql/src/test/results/clientpositive/lineage3.q.out index ca7d6e0..0e9c2a9 100644 --- ql/src/test/results/clientpositive/lineage3.q.out +++ ql/src/test/results/clientpositive/lineage3.q.out @@ -51,7 +51,7 @@ where cint is not null and cint < 0 order by cint, cs limit 5 PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc PREHOOK: Output: default@dest_l1@ds=today -{"version":"1.0","engine":"mr","database":"default","hash":"2b5891d094ff74e23ec6acf5b4990f45","queryText":"insert into table dest_l1 partition (ds='today')\nselect cint, cast(cstring1 as varchar(128)) as cs\nfrom alltypesorc\nwhere cint is not null and cint < 0 order by cint, cs limit 5","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"CAST( alltypesorc.cstring1 AS varchar(128))","edgeType":"PROJECTION"},{"sources":[2],"targets":[0,1],"expression":"(alltypesorc.cint is not null and (alltypesorc.cint < 0))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest_l1.a"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l1.b"},{"id":2,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"2b5891d094ff74e23ec6acf5b4990f45","queryText":"insert into table dest_l1 partition (ds='today')\nselect cint, cast(cstring1 as varchar(128)) as cs\nfrom alltypesorc\nwhere cint is not null and cint < 0 order by cint, cs limit 5","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"CAST( alltypesorc.cstring1 AS varchar(128))","edgeType":"PROJECTION"},{"sources":[2],"targets":[0,1],"expression":"(alltypesorc.cint < 0)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest_l1.a"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l1.b"},{"id":2,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"}]} PREHOOK: query: insert into table dest_l1 partition (ds='tomorrow') select min(cint), cast(min(cstring1) as varchar(128)) as cs from alltypesorc @@ -61,7 +61,7 @@ having min(cbigint) > 10 PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc PREHOOK: Output: default@dest_l1@ds=tomorrow -{"version":"1.0","engine":"mr","database":"default","hash":"4ad6338a8abfe3fe0342198fcbd1f11d","queryText":"insert into table dest_l1 partition (ds='tomorrow')\nselect min(cint), cast(min(cstring1) as varchar(128)) as cs\nfrom alltypesorc\nwhere cint is not null and cboolean1 = true\ngroup by csmallint\nhaving min(cbigint) > 10","edges":[{"sources":[2],"targets":[0],"expression":"min(default.alltypesorc.cint)","edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"CAST( min(default.alltypesorc.cstring1) AS varchar(128))","edgeType":"PROJECTION"},{"sources":[2,4],"targets":[0,1],"expression":"(alltypesorc.cint is not null and (alltypesorc.cboolean1 = true))","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1],"expression":"(min(default.alltypesorc.cbigint) > 10)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest_l1.a"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l1.b"},{"id":2,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"4ad6338a8abfe3fe0342198fcbd1f11d","queryText":"insert into table dest_l1 partition (ds='tomorrow')\nselect min(cint), cast(min(cstring1) as varchar(128)) as cs\nfrom alltypesorc\nwhere cint is not null and cboolean1 = true\ngroup by csmallint\nhaving min(cbigint) > 10","edges":[{"sources":[2],"targets":[0],"expression":"min(default.alltypesorc.cint)","edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"expression":"CAST( min(default.alltypesorc.cstring1) AS varchar(128))","edgeType":"PROJECTION"},{"sources":[4,2],"targets":[0,1],"expression":"((alltypesorc.cboolean1 = true) and alltypesorc.cint is not null)","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1],"expression":"(min(default.alltypesorc.cbigint) > 10)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"default.dest_l1.a"},{"id":1,"vertexType":"COLUMN","vertexId":"default.dest_l1.b"},{"id":2,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"}]} PREHOOK: query: select cint, rank() over(order by cint) from alltypesorc where cint > 10 and cint < 10000 limit 10 PREHOOK: type: QUERY @@ -116,7 +116,7 @@ order by a.cbigint, a.ctinyint, b.cint, b.ctinyint limit 5 PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc #### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"afd760470fc5aa6d3e8348dee03af97f","queryText":"select a.cbigint, a.ctinyint, b.cint, b.ctinyint\nfrom\n (select ctinyint, cbigint from alltypesorc\n union all\n select ctinyint, cbigint from alltypesorc) a\n inner join\n alltypesorc b\n on (a.ctinyint = b.ctinyint)\nwhere b.ctinyint < 100 and a.cbigint is not null and b.cint is not null\norder by a.cbigint, a.ctinyint, b.cint, b.ctinyint limit 5","edges":[{"sources":[4],"targets":[0],"expression":"cbigint","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"ctinyint","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[5],"targets":[3],"edgeType":"PROJECTION"},{"sources":[5,4],"targets":[0,1,2,3],"expression":"(alltypesorc.ctinyint is not null and alltypesorc.cbigint is not null and (alltypesorc.ctinyint < 100))","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1,2,3],"expression":"(ctinyint = alltypesorc.ctinyint)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1,2,3],"expression":"(alltypesorc.ctinyint is not null and (alltypesorc.ctinyint < 100) and alltypesorc.cint is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"a.cbigint"},{"id":1,"vertexType":"COLUMN","vertexId":"a.ctinyint"},{"id":2,"vertexType":"COLUMN","vertexId":"b.cint"},{"id":3,"vertexType":"COLUMN","vertexId":"b.ctinyint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"afd760470fc5aa6d3e8348dee03af97f","queryText":"select a.cbigint, a.ctinyint, b.cint, b.ctinyint\nfrom\n (select ctinyint, cbigint from alltypesorc\n union all\n select ctinyint, cbigint from alltypesorc) a\n inner join\n alltypesorc b\n on (a.ctinyint = b.ctinyint)\nwhere b.ctinyint < 100 and a.cbigint is not null and b.cint is not null\norder by a.cbigint, a.ctinyint, b.cint, b.ctinyint limit 5","edges":[{"sources":[4],"targets":[0],"expression":"cbigint","edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"expression":"ctinyint","edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"edgeType":"PROJECTION"},{"sources":[5],"targets":[3],"edgeType":"PROJECTION"},{"sources":[5,4],"targets":[0,1,2,3],"expression":"((alltypesorc.ctinyint < 100) and alltypesorc.cbigint is not null)","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1,2,3],"expression":"(ctinyint = alltypesorc.ctinyint)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1,2,3],"expression":"((alltypesorc.ctinyint < 100) and alltypesorc.cint is not null)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"a.cbigint"},{"id":1,"vertexType":"COLUMN","vertexId":"a.ctinyint"},{"id":2,"vertexType":"COLUMN","vertexId":"b.cint"},{"id":3,"vertexType":"COLUMN","vertexId":"b.ctinyint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"}]} -2147311592 -51 -1071480828 -51 -2147311592 -51 -1071480828 -51 -2147311592 -51 -1067683781 -51 @@ -135,7 +135,7 @@ and x.ctinyint + length(c.cstring2) < 1000 PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc #### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"3a12ad24b2622a8958df12d0bdc60f8a","queryText":"select x.ctinyint, x.cint, c.cbigint-100, c.cstring1\nfrom alltypesorc c\njoin (\n select a.ctinyint ctinyint, b.cint cint\n from (select * from alltypesorc a where cboolean1=false) a\n join alltypesorc b on (a.cint = b.cbigint - 224870380)\n ) x on (x.cint = c.cint)\nwhere x.ctinyint > 10\nand x.cint < 4.5\nand x.ctinyint + length(c.cstring2) < 1000","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"expression":"(c.cbigint - UDFToLong(100))","edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[5],"targets":[0,1,2,3],"expression":"(c.cint is not null and (UDFToDouble(c.cint) < 4.5))","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1,2,3],"expression":"(c.cint = c.cint)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1,2,3],"expression":"(c.cbigint is not null and c.cint is not null and (UDFToDouble(c.cint) < 4.5))","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1,2,3],"expression":"((c.cbigint - UDFToLong(224870380)) = UDFToLong(c.cint))","edgeType":"PREDICATE"},{"sources":[8,5,4],"targets":[0,1,2,3],"expression":"((c.cboolean1 = false) and c.cint is not null and (c.ctinyint > 10))","edgeType":"PREDICATE"},{"sources":[4,9],"targets":[0,1,2,3],"expression":"((UDFToInteger(c.ctinyint) + length(c.cstring2)) < 1000)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"x.ctinyint"},{"id":1,"vertexType":"COLUMN","vertexId":"x.cint"},{"id":2,"vertexType":"COLUMN","vertexId":"c2"},{"id":3,"vertexType":"COLUMN","vertexId":"c.cstring1"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":7,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":8,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"},{"id":9,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring2"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"3a12ad24b2622a8958df12d0bdc60f8a","queryText":"select x.ctinyint, x.cint, c.cbigint-100, c.cstring1\nfrom alltypesorc c\njoin (\n select a.ctinyint ctinyint, b.cint cint\n from (select * from alltypesorc a where cboolean1=false) a\n join alltypesorc b on (a.cint = b.cbigint - 224870380)\n ) x on (x.cint = c.cint)\nwhere x.ctinyint > 10\nand x.cint < 4.5\nand x.ctinyint + length(c.cstring2) < 1000","edges":[{"sources":[4],"targets":[0],"edgeType":"PROJECTION"},{"sources":[5],"targets":[1],"edgeType":"PROJECTION"},{"sources":[6],"targets":[2],"expression":"(c.cbigint - UDFToLong(100))","edgeType":"PROJECTION"},{"sources":[7],"targets":[3],"edgeType":"PROJECTION"},{"sources":[5],"targets":[0,1,2,3],"expression":"(UDFToDouble(c.cint) < 4.5)","edgeType":"PREDICATE"},{"sources":[5],"targets":[0,1,2,3],"expression":"(c.cint = c.cint)","edgeType":"PREDICATE"},{"sources":[5,6],"targets":[0,1,2,3],"expression":"((UDFToDouble(c.cint) < 4.5) and c.cbigint is not null)","edgeType":"PREDICATE"},{"sources":[6,5],"targets":[0,1,2,3],"expression":"((c.cbigint - UDFToLong(224870380)) = UDFToLong(c.cint))","edgeType":"PREDICATE"},{"sources":[8,4,5],"targets":[0,1,2,3],"expression":"((c.cboolean1 = false) and (c.ctinyint > 10) and c.cint is not null)","edgeType":"PREDICATE"},{"sources":[4,9],"targets":[0,1,2,3],"expression":"((UDFToInteger(c.ctinyint) + length(c.cstring2)) < 1000)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"x.ctinyint"},{"id":1,"vertexType":"COLUMN","vertexId":"x.cint"},{"id":2,"vertexType":"COLUMN","vertexId":"c2"},{"id":3,"vertexType":"COLUMN","vertexId":"c.cstring1"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cbigint"},{"id":7,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":8,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"},{"id":9,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring2"}]} 11 -654374827 857266369 OEfPnHnIYueoup PREHOOK: query: select c1, x2, x3 from ( @@ -178,7 +178,7 @@ PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc PREHOOK: Input: default@src1 #### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"8bf193b0658183be94e2428a79d91d10","queryText":"select * from src1 a\nwhere exists\n (select cint from alltypesorc b\n where a.key = b.ctinyint + 300)\nand key > 300","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[2],"targets":[0,1],"expression":"(UDFToDouble(a.key) is not null and (UDFToDouble(a.key) > UDFToDouble(300)))","edgeType":"PREDICATE"},{"sources":[2,4],"targets":[0,1],"expression":"(UDFToDouble(a.key) = UDFToDouble((UDFToInteger(b.ctinyint) + 300)))","edgeType":"PREDICATE"},{"sources":[4],"targets":[0,1],"expression":"UDFToDouble((UDFToInteger(b.ctinyint) + 300)) is not null","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"a.key"},{"id":1,"vertexType":"COLUMN","vertexId":"a.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"8bf193b0658183be94e2428a79d91d10","queryText":"select * from src1 a\nwhere exists\n (select cint from alltypesorc b\n where a.key = b.ctinyint + 300)\nand key > 300","edges":[{"sources":[2],"targets":[0],"edgeType":"PROJECTION"},{"sources":[3],"targets":[1],"edgeType":"PROJECTION"},{"sources":[2],"targets":[0,1],"expression":"((UDFToDouble(a.key) > UDFToDouble(300)) and UDFToDouble(a.key) is not null)","edgeType":"PREDICATE"},{"sources":[2,4],"targets":[0,1],"expression":"(UDFToDouble(a.key) = UDFToDouble((UDFToInteger(b.ctinyint) + 300)))","edgeType":"PREDICATE"},{"sources":[4],"targets":[0,1],"expression":"UDFToDouble((UDFToInteger(b.ctinyint) + 300)) is not null","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"a.key"},{"id":1,"vertexType":"COLUMN","vertexId":"a.value"},{"id":2,"vertexType":"COLUMN","vertexId":"default.src1.key"},{"id":3,"vertexType":"COLUMN","vertexId":"default.src1.value"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"}]} 311 val_311 Warning: Shuffle Join JOIN[16][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product PREHOOK: query: select key, value from src1 @@ -251,7 +251,7 @@ PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc PREHOOK: Input: default@dest_v1 #### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"b0192d4da86f4bef38fe7ab1fc607906","queryText":"select t.ctinyint from (select * from dest_v1 where ctinyint is not null) t\nwhere ctinyint > 10 order by ctinyint limit 2","edges":[{"sources":[1],"targets":[0],"edgeType":"PROJECTION"},{"sources":[1],"targets":[0],"expression":"(alltypesorc.ctinyint is not null and (alltypesorc.ctinyint > 10))","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"t.ctinyint"},{"id":1,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"b0192d4da86f4bef38fe7ab1fc607906","queryText":"select t.ctinyint from (select * from dest_v1 where ctinyint is not null) t\nwhere ctinyint > 10 order by ctinyint limit 2","edges":[{"sources":[1],"targets":[0],"edgeType":"PROJECTION"},{"sources":[1],"targets":[0],"expression":"(alltypesorc.ctinyint > 10)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"t.ctinyint"},{"id":1,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"}]} 11 11 PREHOOK: query: drop view if exists dest_v2 @@ -317,7 +317,7 @@ PREHOOK: type: QUERY PREHOOK: Input: default@alltypesorc PREHOOK: Input: default@dest_v3 #### A masked pattern was here #### -{"version":"1.0","engine":"mr","database":"default","hash":"40bccc0722002f798d0548b59e369e83","queryText":"select * from dest_v3 limit 2","edges":[{"sources":[3,4,5,6,7],"targets":[0],"expression":"(tok_function sum (. (tok_table_or_col $hdt$_0) ctinyint) (tok_windowspec (tok_partitioningspec (tok_distributeby (. (tok_table_or_col $hdt$_0) csmallint)) (tok_orderby (tok_tabsortcolnameasc (. (tok_table_or_col $hdt$_0) csmallint)))) (tok_windowvalues (preceding 2147483647) current)))","edgeType":"PROJECTION"},{"sources":[6],"targets":[1],"expression":"count(default.alltypesorc.cstring1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[2],"edgeType":"PROJECTION"},{"sources":[7,8],"targets":[0,1,2],"expression":"(a.cint is not null and (a.cboolean2 = true))","edgeType":"PREDICATE"},{"sources":[7],"targets":[0,1,2],"expression":"(a.cint = a.cint)","edgeType":"PREDICATE"},{"sources":[7,9],"targets":[0,1,2],"expression":"(a.cint is not null and (a.cfloat > 0.0))","edgeType":"PREDICATE"},{"sources":[7],"targets":[0,1,2],"expression":"(count(default.alltypesorc.cint) > 10)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"dest_v3.a"},{"id":1,"vertexType":"COLUMN","vertexId":"dest_v3.x"},{"id":2,"vertexType":"COLUMN","vertexId":"dest_v3.cboolean1"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.csmallint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":7,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":8,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cfloat"}]} +{"version":"1.0","engine":"mr","database":"default","hash":"40bccc0722002f798d0548b59e369e83","queryText":"select * from dest_v3 limit 2","edges":[{"sources":[3,4,5,6,7],"targets":[0],"expression":"(tok_function sum (. (tok_table_or_col $hdt$_0) ctinyint) (tok_windowspec (tok_partitioningspec (tok_distributeby (. (tok_table_or_col $hdt$_0) csmallint)) (tok_orderby (tok_tabsortcolnameasc (. (tok_table_or_col $hdt$_0) csmallint)))) (tok_windowvalues (preceding 2147483647) current)))","edgeType":"PROJECTION"},{"sources":[6],"targets":[1],"expression":"count(default.alltypesorc.cstring1)","edgeType":"PROJECTION"},{"sources":[5],"targets":[2],"edgeType":"PROJECTION"},{"sources":[8,7],"targets":[0,1,2],"expression":"((a.cboolean2 = true) and a.cint is not null)","edgeType":"PREDICATE"},{"sources":[7],"targets":[0,1,2],"expression":"(a.cint = a.cint)","edgeType":"PREDICATE"},{"sources":[9,7],"targets":[0,1,2],"expression":"((a.cfloat > 0.0) and a.cint is not null)","edgeType":"PREDICATE"},{"sources":[7],"targets":[0,1,2],"expression":"(count(default.alltypesorc.cint) > 10)","edgeType":"PREDICATE"}],"vertices":[{"id":0,"vertexType":"COLUMN","vertexId":"dest_v3.a"},{"id":1,"vertexType":"COLUMN","vertexId":"dest_v3.x"},{"id":2,"vertexType":"COLUMN","vertexId":"dest_v3.cboolean1"},{"id":3,"vertexType":"COLUMN","vertexId":"default.alltypesorc.ctinyint"},{"id":4,"vertexType":"COLUMN","vertexId":"default.alltypesorc.csmallint"},{"id":5,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean1"},{"id":6,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cstring1"},{"id":7,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cint"},{"id":8,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cboolean2"},{"id":9,"vertexType":"COLUMN","vertexId":"default.alltypesorc.cfloat"}]} 38 216 false 38 229 true PREHOOK: query: drop table if exists src_dp diff --git ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out index fd0f538..227d372 100644 --- ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out +++ ql/src/test/results/clientpositive/llap/dynamic_partition_pruning.q.out @@ -226,10 +226,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -353,10 +353,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -480,10 +480,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -607,10 +607,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -724,10 +724,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -758,10 +758,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 10 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -909,10 +909,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -928,10 +928,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 10 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -1072,10 +1072,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 108 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -1214,10 +1214,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 108 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -1339,10 +1339,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -1466,10 +1466,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -1589,10 +1589,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1716,10 +1716,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1843,10 +1843,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1955,10 +1955,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -2080,10 +2080,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -2225,20 +2225,16 @@ STAGE PLANS: alias: srcpart filterExpr: (ds = '2008-04-08') (type: boolean) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: '2008-04-08' (type: string) - outputColumnNames: ds + Group By Operator + keys: '2008-04-08' (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: ds (type: string) - mode: hash - outputColumnNames: _col0 + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Execution mode: llap Reducer 2 Execution mode: llap @@ -2248,7 +2244,7 @@ STAGE PLANS: Inner Join 0 to 1 keys: 0 _col0 (type: string) - 1 _col0 (type: string) + 1 '2008-04-08' (type: string) Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() @@ -2278,30 +2274,32 @@ STAGE PLANS: Execution mode: llap Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: string) + keys: '2008-04-08' (type: string) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: string) - outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string) - mode: hash + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '2008-04-08' (type: string) outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Dynamic Partitioning Event Operator - Target column: ds (string) - Target Input: srcpart - Partition key expr: ds + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Target Vertex: Map 1 + Dynamic Partitioning Event Operator + Target column: ds (string) + Target Input: srcpart + Partition key expr: ds + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Stage: Stage-0 Fetch Operator @@ -2955,23 +2953,24 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ds (type: string) - outputColumnNames: _col0 + expressions: ds (type: string), hr (type: string) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) Execution mode: llap Map 5 Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3014,6 +3013,21 @@ STAGE PLANS: sort order: + Map-reduce partition columns: '11' (type: string) Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '11' (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Dynamic Partitioning Event Operator + Target column: hr (string) + Target Input: srcpart + Partition key expr: hr + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Execution mode: llap Reducer 2 Execution mode: llap @@ -3024,11 +3038,12 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) + outputColumnNames: _col1 Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: '11' (type: string) + key expressions: _col1 (type: string) sort order: + - Map-reduce partition columns: '11' (type: string) + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE Reducer 3 Execution mode: llap @@ -3037,7 +3052,7 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 '11' (type: string) + 0 _col1 (type: string) 1 '11' (type: string) Statistics: Num rows: 1210 Data size: 12854 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -3114,10 +3129,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + filterExpr: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + predicate: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: ds (type: string) @@ -3133,10 +3148,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3973,10 +3988,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4110,10 +4125,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4246,10 +4261,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4280,10 +4295,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 10 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -4418,10 +4433,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 108 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -4568,10 +4583,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4679,10 +4694,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -4801,10 +4816,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -4926,48 +4941,46 @@ STAGE PLANS: alias: srcpart filterExpr: (ds = '2008-04-08') (type: boolean) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: '2008-04-08' (type: string) - outputColumnNames: ds + Group By Operator + keys: '2008-04-08' (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: ds (type: string) - mode: hash - outputColumnNames: _col0 + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Execution mode: llap Reducer 3 Execution mode: llap Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: string) + keys: '2008-04-08' (type: string) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Map Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col0 (type: string) - 1 _col0 (type: string) - input vertices: - 0 Map 1 - Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE - HybridGraceHashJoin: true - Group By Operator - aggregations: count() - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: + Select Operator + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: string) + 1 '2008-04-08' (type: string) + input vertices: + 0 Map 1 + Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Group By Operator + aggregations: count() + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: bigint) + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) Reducer 4 Execution mode: uber Reduce Operator Tree: @@ -5328,8 +5341,8 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ds (type: string) - outputColumnNames: _col0 + expressions: ds (type: string), hr (type: string) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Map Join Operator condition map: @@ -5337,6 +5350,7 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) + outputColumnNames: _col1 input vertices: 1 Map 3 Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE @@ -5345,7 +5359,7 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 '11' (type: string) + 0 _col1 (type: string) 1 '11' (type: string) input vertices: 1 Map 4 @@ -5365,10 +5379,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -5411,6 +5425,21 @@ STAGE PLANS: sort order: + Map-reduce partition columns: '11' (type: string) Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '11' (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Dynamic Partitioning Event Operator + Target column: hr (string) + Target Input: srcpart + Partition key expr: hr + Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Execution mode: llap Reducer 2 Execution mode: uber @@ -5476,10 +5505,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + filterExpr: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + predicate: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: ds (type: string) @@ -5495,10 +5524,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -5873,10 +5902,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and ((date = '2008-04-08') or (date = '2008-04-09'))) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: (((((date = '2008-04-08') or (date = '2008-04-09')) and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 108 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and ((date = '2008-04-08') or (date = '2008-04-09'))) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: (((((date = '2008-04-08') or (date = '2008-04-09')) and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 54 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) diff --git ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out index 7db8f2d..13b85d9 100644 --- ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out +++ ql/src/test/results/clientpositive/llap/dynamic_partition_pruning_2.q.out @@ -571,6 +571,7 @@ bar baz baz baz +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: EXPLAIN SELECT agg.amount FROM agg_01 agg, dim_shops d1 @@ -609,13 +610,12 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 1 (type: int) - 1 1 (type: int) + 0 + 1 outputColumnNames: _col0 input vertices: 1 Map 2 Statistics: Num rows: 3 Data size: 9 Basic stats: COMPLETE Column stats: NONE - HybridGraceHashJoin: true File Output Operator compressed: false Statistics: Num rows: 3 Data size: 9 Basic stats: COMPLETE Column stats: NONE @@ -636,9 +636,7 @@ STAGE PLANS: Select Operator Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 1 (type: int) - sort order: + - Map-reduce partition columns: 1 (type: int) + sort order: Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Execution mode: llap @@ -648,6 +646,7 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: SELECT agg.amount FROM agg_01 agg, dim_shops d1 diff --git ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out index f0b1b8d..f3e9ac7 100644 --- ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out +++ ql/src/test/results/clientpositive/llap/hybridgrace_hashjoin_1.q.out @@ -1274,6 +1274,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@alltypesorc POSTHOOK: Output: database:default POSTHOOK: Output: default@decimal_mapjoin +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: EXPLAIN SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2 FROM decimal_mapjoin l JOIN decimal_mapjoin r ON l.cint = r.cint @@ -1312,8 +1313,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 6981 (type: int) - 1 6981 (type: int) + 0 + 1 outputColumnNames: _col0, _col2 input vertices: 1 Map 2 @@ -1343,9 +1344,7 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 6981 (type: int) - sort order: + - Map-reduce partition columns: 6981 (type: int) + sort order: Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: decimal(23,14)) Execution mode: vectorized, llap @@ -1356,6 +1355,7 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2 FROM decimal_mapjoin l JOIN decimal_mapjoin r ON l.cint = r.cint @@ -1470,6 +1470,7 @@ POSTHOOK: Input: default@decimal_mapjoin 6981 6981 -515.6210729730 NULL 6981 6981 -515.6210729730 NULL 6981 6981 -515.6210729730 NULL +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: EXPLAIN SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2 FROM decimal_mapjoin l JOIN decimal_mapjoin r ON l.cint = r.cint @@ -1508,13 +1509,12 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 6981 (type: int) - 1 6981 (type: int) + 0 + 1 outputColumnNames: _col0, _col2 input vertices: 1 Map 2 Statistics: Num rows: 6758 Data size: 1190783 Basic stats: COMPLETE Column stats: NONE - HybridGraceHashJoin: true Select Operator expressions: 6981 (type: int), 6981 (type: int), _col0 (type: decimal(20,10)), _col2 (type: decimal(23,14)) outputColumnNames: _col0, _col1, _col2, _col3 @@ -1540,9 +1540,7 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 6981 (type: int) - sort order: + - Map-reduce partition columns: 6981 (type: int) + sort order: Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: decimal(23,14)) Execution mode: vectorized, llap @@ -1553,6 +1551,7 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2 FROM decimal_mapjoin l JOIN decimal_mapjoin r ON l.cint = r.cint diff --git ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out index 55be604..610dc93 100644 --- ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out +++ ql/src/test/results/clientpositive/llap/tez_dynpart_hashjoin_1.q.out @@ -34,7 +34,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -53,7 +53,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -164,7 +164,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -182,7 +182,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -290,7 +290,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cint (type: int) @@ -309,7 +309,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -441,7 +441,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -460,7 +460,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -574,7 +574,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -592,7 +592,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -703,7 +703,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cint (type: int) @@ -722,7 +722,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) diff --git ql/src/test/results/clientpositive/llap/tez_self_join.q.out ql/src/test/results/clientpositive/llap/tez_self_join.q.out index 9659c8d..4c19478 100644 --- ql/src/test/results/clientpositive/llap/tez_self_join.q.out +++ ql/src/test/results/clientpositive/llap/tez_self_join.q.out @@ -83,7 +83,7 @@ STAGE PLANS: alias: self1 Statistics: Num rows: 3 Data size: 21 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (id1 is not null and (id2 = 'ab')) (type: boolean) + predicate: ((id2 = 'ab') and id1 is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: id1 (type: int), id3 (type: string) diff --git ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out index 8abd6f8..c249974 100644 --- ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out +++ ql/src/test/results/clientpositive/llap/tez_vector_dynpart_hashjoin_1.q.out @@ -34,7 +34,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -53,7 +53,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -164,7 +164,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -182,7 +182,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -290,7 +290,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cint (type: int) @@ -309,7 +309,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -441,7 +441,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -460,7 +460,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -574,7 +574,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -592,7 +592,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -703,7 +703,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cint (type: int) @@ -722,7 +722,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) diff --git ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out index c46a81a..a1d1d99 100644 --- ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out +++ ql/src/test/results/clientpositive/llap/vectorized_dynamic_partition_pruning.q.out @@ -226,10 +226,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -353,10 +353,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -483,10 +483,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -517,10 +517,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 344 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -668,10 +668,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -687,10 +687,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 344 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -831,10 +831,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 1440 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 360 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -973,10 +973,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 1440 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 360 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -1098,10 +1098,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -1225,10 +1225,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -1348,10 +1348,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1475,10 +1475,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1602,10 +1602,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1714,10 +1714,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1839,10 +1839,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1984,20 +1984,16 @@ STAGE PLANS: alias: srcpart filterExpr: (ds = '2008-04-08') (type: boolean) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: '2008-04-08' (type: string) - outputColumnNames: ds + Group By Operator + keys: '2008-04-08' (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: ds (type: string) - mode: hash - outputColumnNames: _col0 + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Execution mode: llap Reducer 2 Execution mode: llap @@ -2007,7 +2003,7 @@ STAGE PLANS: Inner Join 0 to 1 keys: 0 _col0 (type: string) - 1 _col0 (type: string) + 1 '2008-04-08' (type: string) Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() @@ -2037,30 +2033,32 @@ STAGE PLANS: Execution mode: vectorized, llap Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: string) + keys: '2008-04-08' (type: string) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: string) - outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string) - mode: hash + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '2008-04-08' (type: string) outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Dynamic Partitioning Event Operator - Target column: ds (string) - Target Input: srcpart - Partition key expr: ds + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Target Vertex: Map 1 + Dynamic Partitioning Event Operator + Target column: ds (string) + Target Input: srcpart + Partition key expr: ds + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Stage: Stage-0 Fetch Operator @@ -2714,23 +2712,24 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ds (type: string) - outputColumnNames: _col0 + expressions: ds (type: string), hr (type: string) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) Execution mode: llap Map 5 Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -2773,6 +2772,21 @@ STAGE PLANS: sort order: + Map-reduce partition columns: '11' (type: string) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '11' (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Dynamic Partitioning Event Operator + Target column: hr (string) + Target Input: srcpart + Partition key expr: hr + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Execution mode: vectorized, llap Reducer 2 Execution mode: llap @@ -2783,11 +2797,12 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) + outputColumnNames: _col1 Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: '11' (type: string) + key expressions: _col1 (type: string) sort order: + - Map-reduce partition columns: '11' (type: string) + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE Reducer 3 Execution mode: llap @@ -2796,7 +2811,7 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 '11' (type: string) + 0 _col1 (type: string) 1 '11' (type: string) Statistics: Num rows: 1210 Data size: 12854 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -2873,10 +2888,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + filterExpr: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + predicate: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: ds (type: string) @@ -2892,10 +2907,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3732,10 +3747,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3881,10 +3896,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3915,10 +3930,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 344 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -4053,10 +4068,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 1440 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 360 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -4203,10 +4218,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4314,10 +4329,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -4436,10 +4451,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -4561,48 +4576,46 @@ STAGE PLANS: alias: srcpart filterExpr: (ds = '2008-04-08') (type: boolean) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: '2008-04-08' (type: string) - outputColumnNames: ds + Group By Operator + keys: '2008-04-08' (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: ds (type: string) - mode: hash - outputColumnNames: _col0 + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Execution mode: llap Reducer 3 Execution mode: vectorized, llap Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: string) + keys: '2008-04-08' (type: string) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Map Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col0 (type: string) - 1 _col0 (type: string) - input vertices: - 0 Map 1 - Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE - HybridGraceHashJoin: true - Group By Operator - aggregations: count() - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: + Select Operator + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: string) + 1 '2008-04-08' (type: string) + input vertices: + 0 Map 1 + Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Group By Operator + aggregations: count() + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: bigint) + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) Reducer 4 Execution mode: vectorized, uber Reduce Operator Tree: @@ -4963,8 +4976,8 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ds (type: string) - outputColumnNames: _col0 + expressions: ds (type: string), hr (type: string) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Map Join Operator condition map: @@ -4972,6 +4985,7 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) + outputColumnNames: _col1 input vertices: 1 Map 3 Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE @@ -4980,7 +4994,7 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 '11' (type: string) + 0 _col1 (type: string) 1 '11' (type: string) input vertices: 1 Map 4 @@ -5000,10 +5014,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -5046,6 +5060,21 @@ STAGE PLANS: sort order: + Map-reduce partition columns: '11' (type: string) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '11' (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Dynamic Partitioning Event Operator + Target column: hr (string) + Target Input: srcpart + Partition key expr: hr + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Execution mode: vectorized, llap Reducer 2 Execution mode: vectorized, uber @@ -5111,10 +5140,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + filterExpr: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + predicate: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: ds (type: string) @@ -5130,10 +5159,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -5508,10 +5537,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and ((date = '2008-04-08') or (date = '2008-04-09'))) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: (((((date = '2008-04-08') or (date = '2008-04-09')) and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 1440 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and ((date = '2008-04-08') or (date = '2008-04-09'))) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: (((((date = '2008-04-08') or (date = '2008-04-09')) and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 720 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) diff --git ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out index 44d4768..a32986c 100644 --- ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out +++ ql/src/test/results/clientpositive/mapjoin_mapjoin.q.out @@ -512,7 +512,7 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (value > 'val_450')) (type: boolean) + predicate: ((value > 'val_450') and key is not null) (type: boolean) Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/merge_dynamic_partition.q.out ql/src/test/results/clientpositive/merge_dynamic_partition.q.out index da19b32..07102b1 100644 --- ql/src/test/results/clientpositive/merge_dynamic_partition.q.out +++ ql/src/test/results/clientpositive/merge_dynamic_partition.q.out @@ -1291,7 +1291,7 @@ STAGE PLANS: alias: srcpart_merge_dp Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: key (type: string), value (type: string), '2008-04-08' (type: string), '11' (type: string) + expressions: key (type: string), value (type: string), '2008-04-08' (type: string), hr (type: string) outputColumnNames: _col0, _col1, _col2, _col3 Statistics: Num rows: 29 Data size: 5812 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/perf/query21.q.out ql/src/test/results/clientpositive/perf/query21.q.out index cbd1177..e6b12d4 100644 --- ql/src/test/results/clientpositive/perf/query21.q.out +++ ql/src/test/results/clientpositive/perf/query21.q.out @@ -74,7 +74,7 @@ Stage-0 <-Reducer 5 [SIMPLE_EDGE] SHUFFLE [RS_28] Filter Operator [FIL_26] (rows=69877 width=1436) - predicate:CASE WHEN ((_col2 > 0)) THEN ((UDFToDouble(_col3) / UDFToDouble(_col2))) ELSE (null) END BETWEEN 0.6666666666666666 AND 1.5 + predicate:CASE WHEN ((_col2 > 0)) THEN ((UDFToDouble(_col3) / UDFToDouble(_col2)) BETWEEN 0.6666666666666666 AND 1.5) ELSE (null) END Group By Operator [GBY_25] (rows=139755 width=1436) Output:["_col0","_col1","_col2","_col3"],aggregations:["sum(VALUE._col0)","sum(VALUE._col1)"],keys:KEY._col0, KEY._col1 <-Reducer 4 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query31.q.out ql/src/test/results/clientpositive/perf/query31.q.out index a16eead..a3c47a5 100644 --- ql/src/test/results/clientpositive/perf/query31.q.out +++ ql/src/test/results/clientpositive/perf/query31.q.out @@ -33,15 +33,15 @@ Stage-0 Stage-1 Reducer 7 File Output Operator [FS_141] - Select Operator [SEL_140] (rows=11831111 width=1014) + Select Operator [SEL_140] (rows=26620001 width=1014) Output:["_col0","_col1","_col2","_col3","_col4","_col5"] <-Reducer 6 [SIMPLE_EDGE] SHUFFLE [RS_139] - Select Operator [SEL_138] (rows=11831111 width=1014) + Select Operator [SEL_138] (rows=26620001 width=1014) Output:["_col0","_col2","_col3","_col4","_col5"] - Filter Operator [FIL_137] (rows=11831111 width=1014) - predicate:(CASE WHEN ((_col19 > 0)) THEN ((_col23 / _col19)) ELSE (null) END > CASE WHEN ((_col7 > 0)) THEN ((_col11 / _col7)) ELSE (null) END) - Merge Join Operator [MERGEJOIN_281] (rows=35493334 width=1014) + Filter Operator [FIL_137] (rows=26620001 width=1014) + predicate:CASE WHEN ((_col7 > 0)) THEN (CASE WHEN ((_col19 > 0)) THEN (((_col23 / _col19) > (_col11 / _col7))) ELSE ((null > (_col11 / _col7))) END) ELSE (CASE WHEN ((_col19 > 0)) THEN (((_col23 / _col19) > null)) ELSE (null) END) END + Merge Join Operator [MERGEJOIN_281] (rows=53240002 width=1014) Conds:RS_134._col12=RS_135._col0(Inner),Output:["_col0","_col3","_col7","_col11","_col15","_col19","_col23"] <-Reducer 37 [SIMPLE_EDGE] SHUFFLE [RS_135] @@ -88,16 +88,16 @@ Stage-0 Select Operator [SEL_118] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_266] (rows=18262 width=1119) - predicate:((d_date_sk is not null and (d_qoy = 3)) and (d_year = 1998)) + predicate:(((d_qoy = 3) and (d_year = 1998)) and d_date_sk is not null) TableScan [TS_116] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"] <-Reducer 5 [SIMPLE_EDGE] SHUFFLE [RS_134] PartitionCols:_col12 - Select Operator [SEL_112] (rows=32266667 width=1014) + Select Operator [SEL_112] (rows=48400001 width=1014) Output:["_col0","_col11","_col12","_col15","_col19","_col3","_col7"] - Filter Operator [FIL_111] (rows=32266667 width=1014) - predicate:(CASE WHEN ((_col15 > 0)) THEN ((_col19 / _col15)) ELSE (null) END > CASE WHEN ((_col3 > 0)) THEN ((_col7 / _col3)) ELSE (null) END) + Filter Operator [FIL_111] (rows=48400001 width=1014) + predicate:CASE WHEN ((_col3 > 0)) THEN (CASE WHEN ((_col15 > 0)) THEN (((_col19 / _col15) > (_col7 / _col3))) ELSE ((null > (_col7 / _col3))) END) ELSE (CASE WHEN ((_col15 > 0)) THEN (((_col19 / _col15) > null)) ELSE (null) END) END Merge Join Operator [MERGEJOIN_280] (rows=96800002 width=1014) Conds:RS_105._col0=RS_106._col0(Inner),RS_106._col0=RS_107._col0(Inner),RS_105._col0=RS_108._col0(Inner),RS_108._col0=RS_109._col0(Inner),Output:["_col0","_col3","_col7","_col11","_col12","_col15","_col19"] <-Reducer 13 [SIMPLE_EDGE] @@ -145,7 +145,7 @@ Stage-0 Select Operator [SEL_26] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_254] (rows=18262 width=1119) - predicate:((d_date_sk is not null and (d_qoy = 2)) and (d_year = 1998)) + predicate:(((d_qoy = 2) and (d_year = 1998)) and d_date_sk is not null) TableScan [TS_24] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"] <-Reducer 19 [SIMPLE_EDGE] @@ -193,7 +193,7 @@ Stage-0 Select Operator [SEL_47] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_257] (rows=18262 width=1119) - predicate:((d_date_sk is not null and (d_qoy = 3)) and (d_year = 1998)) + predicate:(((d_qoy = 3) and (d_year = 1998)) and d_date_sk is not null) TableScan [TS_45] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"] <-Reducer 25 [SIMPLE_EDGE] @@ -241,7 +241,7 @@ Stage-0 Select Operator [SEL_68] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_260] (rows=18262 width=1119) - predicate:((d_date_sk is not null and (d_qoy = 1)) and (d_year = 1998)) + predicate:(((d_qoy = 1) and (d_year = 1998)) and d_date_sk is not null) TableScan [TS_66] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"] <-Reducer 31 [SIMPLE_EDGE] @@ -289,7 +289,7 @@ Stage-0 Select Operator [SEL_89] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_263] (rows=18262 width=1119) - predicate:((d_date_sk is not null and (d_qoy = 2)) and (d_year = 1998)) + predicate:(((d_qoy = 2) and (d_year = 1998)) and d_date_sk is not null) TableScan [TS_87] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"] <-Reducer 4 [SIMPLE_EDGE] @@ -337,7 +337,7 @@ Stage-0 Select Operator [SEL_5] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_251] (rows=18262 width=1119) - predicate:((d_date_sk is not null and (d_qoy = 1)) and (d_year = 1998)) + predicate:(((d_qoy = 1) and (d_year = 1998)) and d_date_sk is not null) TableScan [TS_3] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"] diff --git ql/src/test/results/clientpositive/perf/query32.q.out ql/src/test/results/clientpositive/perf/query32.q.out index dc085dd..f9cfd69 100644 --- ql/src/test/results/clientpositive/perf/query32.q.out +++ ql/src/test/results/clientpositive/perf/query32.q.out @@ -69,7 +69,7 @@ Stage-0 Select Operator [SEL_12] (rows=231000 width=1436) Output:["_col0"] Filter Operator [FIL_54] (rows=231000 width=1436) - predicate:(i_item_sk is not null and (i_manufact_id = 436)) + predicate:((i_manufact_id = 436) and i_item_sk is not null) TableScan [TS_10] (rows=462000 width=1436) default@item,i,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_manufact_id"] <-Reducer 2 [SIMPLE_EDGE] @@ -94,7 +94,7 @@ Stage-0 Select Operator [SEL_5] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_53] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_date BETWEEN '2000-01-27' AND '2000-04-27') + predicate:(d_date BETWEEN '2000-01-27' AND '2000-04-27' and d_date_sk is not null) TableScan [TS_3] (rows=73049 width=1119) default@date_dim,d,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"] <-Reducer 9 [SIMPLE_EDGE] @@ -117,7 +117,7 @@ Stage-0 Select Operator [SEL_18] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_56] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_date BETWEEN '2000-01-27' AND '2000-04-27') + predicate:(d_date BETWEEN '2000-01-27' AND '2000-04-27' and d_date_sk is not null) TableScan [TS_16] (rows=73049 width=1119) default@date_dim,d,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"] <-Map 7 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query34.q.out ql/src/test/results/clientpositive/perf/query34.q.out index 037bc76..6fa6985 100644 --- ql/src/test/results/clientpositive/perf/query34.q.out +++ ql/src/test/results/clientpositive/perf/query34.q.out @@ -54,10 +54,10 @@ Stage-0 <-Map 10 [SIMPLE_EDGE] SHUFFLE [RS_19] PartitionCols:_col0 - Select Operator [SEL_11] (rows=800 width=107) + Select Operator [SEL_11] (rows=1200 width=107) Output:["_col0"] - Filter Operator [FIL_55] (rows=800 width=107) - predicate:(((((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000')) and (hd_vehicle_count > 0)) and (CASE WHEN ((hd_vehicle_count > 0)) THEN ((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count))) ELSE (null) END > 1.2)) and hd_demo_sk is not null) + Filter Operator [FIL_55] (rows=1200 width=107) + predicate:(((((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000')) and (hd_vehicle_count > 0)) and CASE WHEN ((hd_vehicle_count > 0)) THEN (((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count)) > 1.2)) ELSE (null) END) and hd_demo_sk is not null) TableScan [TS_9] (rows=7200 width=107) default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_buy_potential","hd_dep_count","hd_vehicle_count"] <-Reducer 3 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query39.q.out ql/src/test/results/clientpositive/perf/query39.q.out index 7dcf01d..fb77c7e 100644 --- ql/src/test/results/clientpositive/perf/query39.q.out +++ ql/src/test/results/clientpositive/perf/query39.q.out @@ -22,21 +22,21 @@ Stage-0 Stage-1 Reducer 7 File Output Operator [FS_62] - Select Operator [SEL_61] (rows=112735 width=1436) + Select Operator [SEL_61] (rows=169103 width=1436) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9"] <-Reducer 6 [SIMPLE_EDGE] SHUFFLE [RS_60] - Select Operator [SEL_59] (rows=112735 width=1436) + Select Operator [SEL_59] (rows=169103 width=1436) Output:["_col0","_col1","_col3","_col4","_col5","_col6","_col8","_col9"] - Merge Join Operator [MERGEJOIN_105] (rows=112735 width=1436) + Merge Join Operator [MERGEJOIN_105] (rows=169103 width=1436) Conds:RS_56._col2, _col1=RS_57._col2, _col1(Inner),Output:["_col1","_col2","_col4","_col5","_col7","_col8","_col10","_col11"] <-Reducer 15 [SIMPLE_EDGE] SHUFFLE [RS_57] PartitionCols:_col2, _col1 - Select Operator [SEL_55] (rows=102487 width=1436) + Select Operator [SEL_55] (rows=153730 width=1436) Output:["_col1","_col2","_col4","_col5"] - Filter Operator [FIL_54] (rows=102487 width=1436) - predicate:(CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) + Filter Operator [FIL_54] (rows=153730 width=1436) + predicate:CASE WHEN ((_col4 = 0.0)) THEN (false) ELSE (((_col5 / _col4) > 1.0)) END Select Operator [SEL_97] (rows=307461 width=1436) Output:["_col1","_col2","_col4","_col5"] Group By Operator [GBY_53] (rows=307461 width=1436) @@ -56,7 +56,7 @@ Stage-0 Select Operator [SEL_39] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_96] (rows=18262 width=1119) - predicate:(((d_year = 1999) and d_date_sk is not null) and (d_moy = 4)) + predicate:(((d_year = 1999) and (d_moy = 4)) and d_date_sk is not null) TableScan [TS_37] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"] <-Reducer 13 [SIMPLE_EDGE] @@ -99,10 +99,10 @@ Stage-0 <-Reducer 5 [SIMPLE_EDGE] SHUFFLE [RS_56] PartitionCols:_col2, _col1 - Select Operator [SEL_27] (rows=102487 width=1436) + Select Operator [SEL_27] (rows=153730 width=1436) Output:["_col1","_col2","_col4","_col5"] - Filter Operator [FIL_26] (rows=102487 width=1436) - predicate:(CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) + Filter Operator [FIL_26] (rows=153730 width=1436) + predicate:CASE WHEN ((_col4 = 0.0)) THEN (false) ELSE (((_col5 / _col4) > 1.0)) END Select Operator [SEL_98] (rows=307461 width=1436) Output:["_col1","_col2","_col4","_col5"] Group By Operator [GBY_25] (rows=307461 width=1436) @@ -122,7 +122,7 @@ Stage-0 Select Operator [SEL_11] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_92] (rows=18262 width=1119) - predicate:(((d_year = 1999) and d_date_sk is not null) and (d_moy = 3)) + predicate:(((d_year = 1999) and (d_moy = 3)) and d_date_sk is not null) TableScan [TS_9] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_moy"] <-Reducer 3 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query45.q.out ql/src/test/results/clientpositive/perf/query45.q.out index 35befff..2985ba9 100644 --- ql/src/test/results/clientpositive/perf/query45.q.out +++ ql/src/test/results/clientpositive/perf/query45.q.out @@ -74,7 +74,7 @@ Stage-0 Select Operator [SEL_11] (rows=18262 width=1119) Output:["_col0"] Filter Operator [FIL_65] (rows=18262 width=1119) - predicate:((d_date_sk is not null and (d_qoy = 2)) and (d_year = 2000)) + predicate:(((d_qoy = 2) and (d_year = 2000)) and d_date_sk is not null) TableScan [TS_9] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year","d_qoy"] <-Reducer 3 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query58.q.out ql/src/test/results/clientpositive/perf/query58.q.out index bfda69f..2475d92 100644 --- ql/src/test/results/clientpositive/perf/query58.q.out +++ ql/src/test/results/clientpositive/perf/query58.q.out @@ -203,7 +203,7 @@ Stage-0 Select Operator [SEL_85] (rows=36524 width=1119) Output:["_col1"] Filter Operator [FIL_188] (rows=36524 width=1119) - predicate:(d_week_seq is not null and (d_date = '1998-08-04')) + predicate:((d_date = '1998-08-04') and d_week_seq is not null) TableScan [TS_83] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"] <-Reducer 6 [SIMPLE_EDGE] @@ -284,7 +284,7 @@ Stage-0 Select Operator [SEL_47] (rows=36524 width=1119) Output:["_col1"] Filter Operator [FIL_183] (rows=36524 width=1119) - predicate:(d_week_seq is not null and (d_date = '1998-08-04')) + predicate:((d_date = '1998-08-04') and d_week_seq is not null) TableScan [TS_45] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"] <-Reducer 5 [SIMPLE_EDGE] @@ -321,7 +321,7 @@ Stage-0 Select Operator [SEL_14] (rows=36524 width=1119) Output:["_col1"] Filter Operator [FIL_178] (rows=36524 width=1119) - predicate:(d_week_seq is not null and (d_date = '1998-08-04')) + predicate:((d_date = '1998-08-04') and d_week_seq is not null) TableScan [TS_12] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date","d_week_seq"] <-Reducer 3 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query64.q.out ql/src/test/results/clientpositive/perf/query64.q.out index 2f52a47..dddcc80 100644 --- ql/src/test/results/clientpositive/perf/query64.q.out +++ ql/src/test/results/clientpositive/perf/query64.q.out @@ -84,7 +84,7 @@ Stage-0 Select Operator [SEL_76] (rows=57750 width=1436) Output:["_col0","_col3"] Filter Operator [FIL_660] (rows=57750 width=1436) - predicate:(((i_item_sk is not null and (i_color) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate')) and i_current_price BETWEEN 35 AND 45) and i_current_price BETWEEN 36 AND 50) + predicate:((((i_color) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate') and i_current_price BETWEEN 35 AND 45) and i_current_price BETWEEN 36 AND 50) and i_item_sk is not null) TableScan [TS_74] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_current_price","i_color","i_product_name"] <-Reducer 16 [SIMPLE_EDGE] @@ -270,7 +270,7 @@ Stage-0 Select Operator [SEL_11] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_647] (rows=36524 width=1119) - predicate:(d_date_sk is not null and (d_year = 2000)) + predicate:((d_year = 2000) and d_date_sk is not null) TableScan [TS_9] (rows=73049 width=1119) default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"] <-Reducer 3 [SIMPLE_EDGE] @@ -368,7 +368,7 @@ Stage-0 Select Operator [SEL_200] (rows=57750 width=1436) Output:["_col0","_col3"] Filter Operator [FIL_679] (rows=57750 width=1436) - predicate:(((i_item_sk is not null and (i_color) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate')) and i_current_price BETWEEN 35 AND 45) and i_current_price BETWEEN 36 AND 50) + predicate:((((i_color) IN ('maroon', 'burnished', 'dim', 'steel', 'navajo', 'chocolate') and i_current_price BETWEEN 35 AND 45) and i_current_price BETWEEN 36 AND 50) and i_item_sk is not null) TableScan [TS_198] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_current_price","i_color","i_product_name"] <-Reducer 56 [SIMPLE_EDGE] @@ -554,7 +554,7 @@ Stage-0 Select Operator [SEL_135] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_666] (rows=36524 width=1119) - predicate:(d_date_sk is not null and (d_year = 2001)) + predicate:((d_year = 2001) and d_date_sk is not null) TableScan [TS_133] (rows=73049 width=1119) default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"] <-Reducer 43 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query70.q.out ql/src/test/results/clientpositive/perf/query70.q.out index 9b58fdb..2521e0e 100644 --- ql/src/test/results/clientpositive/perf/query70.q.out +++ ql/src/test/results/clientpositive/perf/query70.q.out @@ -31,12 +31,12 @@ Stage-0 Select Operator [SEL_57] (rows=66289 width=1119) Output:["_col0","_col1","_col2","_col3","_col4"] PTF Operator [PTF_56] (rows=66289 width=1119) - Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col4","partition by:":"_col5, CASE WHEN ((_col5 = 2)) THEN (_col0) END"}] + Function definitions:[{},{"name:":"windowingtablefunction","order by:":"_col4","partition by:":"_col5, CASE WHEN ((_col5 = 2)) THEN (_col0) ELSE (null) END"}] Select Operator [SEL_55] (rows=66289 width=1119) Output:["_col0","_col1","_col4","_col5"] <-Reducer 4 [SIMPLE_EDGE] SHUFFLE [RS_54] - PartitionCols:_col5, CASE WHEN ((_col5 = 2)) THEN (_col0) END + PartitionCols:_col5, CASE WHEN ((_col5 = 2)) THEN (_col0) ELSE (null) END Select Operator [SEL_53] (rows=66289 width=1119) Output:["_col0","_col1","_col4","_col5"] Group By Operator [GBY_52] (rows=66289 width=1119) @@ -70,7 +70,7 @@ Stage-0 Select Operator [SEL_5] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_81] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) + predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) TableScan [TS_3] (rows=73049 width=1119) default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"] <-Reducer 9 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query71.q.out ql/src/test/results/clientpositive/perf/query71.q.out index 11c3a0c..504705b 100644 --- ql/src/test/results/clientpositive/perf/query71.q.out +++ ql/src/test/results/clientpositive/perf/query71.q.out @@ -40,7 +40,7 @@ Stage-0 Select Operator [SEL_38] (rows=86400 width=471) Output:["_col0","_col1","_col2"] Filter Operator [FIL_82] (rows=86400 width=471) - predicate:(t_time_sk is not null and ((t_meal_time = 'breakfast') or (t_meal_time = 'dinner'))) + predicate:(((t_meal_time = 'breakfast') or (t_meal_time = 'dinner')) and t_time_sk is not null) TableScan [TS_36] (rows=86400 width=471) default@time_dim,time_dim,Tbl:COMPLETE,Col:NONE,Output:["t_time_sk","t_hour","t_minute","t_meal_time"] <-Reducer 2 [SIMPLE_EDGE] @@ -54,7 +54,7 @@ Stage-0 Select Operator [SEL_2] (rows=231000 width=1436) Output:["_col0","_col1","_col2"] Filter Operator [FIL_75] (rows=231000 width=1436) - predicate:(i_item_sk is not null and (i_manager_id = 1)) + predicate:((i_manager_id = 1) and i_item_sk is not null) TableScan [TS_0] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_brand","i_manager_id"] <-Union 8 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query72.q.out ql/src/test/results/clientpositive/perf/query72.q.out index 99e00a7..6d8bd36 100644 --- ql/src/test/results/clientpositive/perf/query72.q.out +++ ql/src/test/results/clientpositive/perf/query72.q.out @@ -105,7 +105,7 @@ Stage-0 Select Operator [SEL_25] (rows=36524 width=1119) Output:["_col0","_col1","_col2"] Filter Operator [FIL_128] (rows=36524 width=1119) - predicate:((d_date_sk is not null and (d_year = 2001)) and d_week_seq is not null) + predicate:(((d_year = 2001) and d_date_sk is not null) and d_week_seq is not null) TableScan [TS_23] (rows=73049 width=1119) default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_week_seq","d_year"] <-Reducer 6 [SIMPLE_EDGE] @@ -119,7 +119,7 @@ Stage-0 Select Operator [SEL_22] (rows=3600 width=107) Output:["_col0"] Filter Operator [FIL_127] (rows=3600 width=107) - predicate:(hd_demo_sk is not null and (hd_buy_potential = '1001-5000')) + predicate:((hd_buy_potential = '1001-5000') and hd_demo_sk is not null) TableScan [TS_20] (rows=7200 width=107) default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_buy_potential"] <-Reducer 5 [SIMPLE_EDGE] @@ -133,7 +133,7 @@ Stage-0 Select Operator [SEL_19] (rows=9900 width=362) Output:["_col0"] Filter Operator [FIL_126] (rows=9900 width=362) - predicate:(cd_demo_sk is not null and (cd_marital_status = 'M')) + predicate:((cd_marital_status = 'M') and cd_demo_sk is not null) TableScan [TS_17] (rows=19800 width=362) default@customer_demographics,customer_demographics,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status"] <-Reducer 4 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query73.q.out ql/src/test/results/clientpositive/perf/query73.q.out index af359d0..e367f51 100644 --- ql/src/test/results/clientpositive/perf/query73.q.out +++ ql/src/test/results/clientpositive/perf/query73.q.out @@ -54,10 +54,10 @@ Stage-0 <-Map 10 [SIMPLE_EDGE] SHUFFLE [RS_19] PartitionCols:_col0 - Select Operator [SEL_11] (rows=800 width=107) + Select Operator [SEL_11] (rows=1200 width=107) Output:["_col0"] - Filter Operator [FIL_55] (rows=800 width=107) - predicate:(((((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000')) and (hd_vehicle_count > 0)) and (CASE WHEN ((hd_vehicle_count > 0)) THEN ((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count))) ELSE (null) END > 1.0)) and hd_demo_sk is not null) + Filter Operator [FIL_55] (rows=1200 width=107) + predicate:(((((hd_buy_potential = '1001-5000') or (hd_buy_potential = '5001-10000')) and (hd_vehicle_count > 0)) and CASE WHEN ((hd_vehicle_count > 0)) THEN (((UDFToDouble(hd_dep_count) / UDFToDouble(hd_vehicle_count)) > 1.0)) ELSE (null) END) and hd_demo_sk is not null) TableScan [TS_9] (rows=7200 width=107) default@household_demographics,household_demographics,Tbl:COMPLETE,Col:NONE,Output:["hd_demo_sk","hd_buy_potential","hd_dep_count","hd_vehicle_count"] <-Reducer 3 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query75.q.out ql/src/test/results/clientpositive/perf/query75.q.out index 3791621..25a8776 100644 --- ql/src/test/results/clientpositive/perf/query75.q.out +++ ql/src/test/results/clientpositive/perf/query75.q.out @@ -83,7 +83,7 @@ Stage-0 Select Operator [SEL_82] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_231] (rows=36524 width=1119) - predicate:(d_date_sk is not null and (d_year = 2001)) + predicate:((d_year = 2001) and d_date_sk is not null) TableScan [TS_80] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"] <-Reducer 27 [SIMPLE_EDGE] @@ -106,7 +106,7 @@ Stage-0 Select Operator [SEL_79] (rows=231000 width=1436) Output:["_col0","_col1","_col2","_col3","_col5"] Filter Operator [FIL_230] (rows=231000 width=1436) - predicate:(((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) + predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) TableScan [TS_77] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"] <-Reducer 38 [CONTAINS] @@ -140,7 +140,7 @@ Stage-0 Select Operator [SEL_104] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_235] (rows=36524 width=1119) - predicate:(d_date_sk is not null and (d_year = 2001)) + predicate:((d_year = 2001) and d_date_sk is not null) TableScan [TS_102] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"] <-Reducer 36 [SIMPLE_EDGE] @@ -163,7 +163,7 @@ Stage-0 Select Operator [SEL_101] (rows=231000 width=1436) Output:["_col0","_col1","_col2","_col3","_col5"] Filter Operator [FIL_234] (rows=231000 width=1436) - predicate:(((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) + predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) TableScan [TS_99] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"] <-Reducer 45 [CONTAINS] @@ -197,7 +197,7 @@ Stage-0 Select Operator [SEL_128] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_239] (rows=36524 width=1119) - predicate:(d_date_sk is not null and (d_year = 2001)) + predicate:((d_year = 2001) and d_date_sk is not null) TableScan [TS_126] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"] <-Reducer 43 [SIMPLE_EDGE] @@ -220,7 +220,7 @@ Stage-0 Select Operator [SEL_125] (rows=231000 width=1436) Output:["_col0","_col1","_col2","_col3","_col5"] Filter Operator [FIL_238] (rows=231000 width=1436) - predicate:(((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) + predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) TableScan [TS_123] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"] <-Reducer 6 [SIMPLE_EDGE] @@ -260,7 +260,7 @@ Stage-0 Select Operator [SEL_30] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_223] (rows=36524 width=1119) - predicate:(d_date_sk is not null and (d_year = 2002)) + predicate:((d_year = 2002) and d_date_sk is not null) TableScan [TS_28] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"] <-Reducer 13 [SIMPLE_EDGE] @@ -283,7 +283,7 @@ Stage-0 Select Operator [SEL_27] (rows=231000 width=1436) Output:["_col0","_col1","_col2","_col3","_col5"] Filter Operator [FIL_222] (rows=231000 width=1436) - predicate:(((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) + predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) TableScan [TS_25] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"] <-Reducer 22 [CONTAINS] @@ -317,7 +317,7 @@ Stage-0 Select Operator [SEL_54] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_227] (rows=36524 width=1119) - predicate:(d_date_sk is not null and (d_year = 2002)) + predicate:((d_year = 2002) and d_date_sk is not null) TableScan [TS_52] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"] <-Reducer 20 [SIMPLE_EDGE] @@ -340,7 +340,7 @@ Stage-0 Select Operator [SEL_51] (rows=231000 width=1436) Output:["_col0","_col1","_col2","_col3","_col5"] Filter Operator [FIL_226] (rows=231000 width=1436) - predicate:(((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) + predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) TableScan [TS_49] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"] <-Reducer 4 [CONTAINS] @@ -374,7 +374,7 @@ Stage-0 Select Operator [SEL_8] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_219] (rows=36524 width=1119) - predicate:(d_date_sk is not null and (d_year = 2002)) + predicate:((d_year = 2002) and d_date_sk is not null) TableScan [TS_6] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_year"] <-Reducer 2 [SIMPLE_EDGE] @@ -397,7 +397,7 @@ Stage-0 Select Operator [SEL_5] (rows=231000 width=1436) Output:["_col0","_col1","_col2","_col3","_col5"] Filter Operator [FIL_218] (rows=231000 width=1436) - predicate:(((((i_item_sk is not null and (i_category = 'Sports')) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) + predicate:((((((i_category = 'Sports') and i_item_sk is not null) and i_brand_id is not null) and i_class_id is not null) and i_category_id is not null) and i_manufact_id is not null) TableScan [TS_3] (rows=462000 width=1436) default@item,item,Tbl:COMPLETE,Col:NONE,Output:["i_item_sk","i_brand_id","i_class_id","i_category_id","i_category","i_manufact_id"] diff --git ql/src/test/results/clientpositive/perf/query85.q.out ql/src/test/results/clientpositive/perf/query85.q.out index ad9aa89..72ac500 100644 --- ql/src/test/results/clientpositive/perf/query85.q.out +++ ql/src/test/results/clientpositive/perf/query85.q.out @@ -92,7 +92,7 @@ Stage-0 Select Operator [SEL_25] (rows=19800 width=362) Output:["_col0","_col1","_col2"] Filter Operator [FIL_97] (rows=19800 width=362) - predicate:((((cd_demo_sk is not null and cd_marital_status is not null) and cd_education_status is not null) and ((cd_education_status = '4 yr Degree') or (cd_education_status = 'Primary') or (cd_education_status = 'Advanced Degree'))) and ((cd_marital_status = 'M') or (cd_marital_status = 'D') or (cd_marital_status = 'U'))) + predicate:((((((cd_education_status = '4 yr Degree') or (cd_education_status = 'Primary') or (cd_education_status = 'Advanced Degree')) and ((cd_marital_status = 'M') or (cd_marital_status = 'D') or (cd_marital_status = 'U'))) and cd_demo_sk is not null) and cd_marital_status is not null) and cd_education_status is not null) TableScan [TS_23] (rows=19800 width=362) default@customer_demographics,cd1,Tbl:COMPLETE,Col:NONE,Output:["cd_demo_sk","cd_marital_status","cd_education_status"] <-Reducer 4 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query87.q.out ql/src/test/results/clientpositive/perf/query87.q.out index 734b334..5b08630 100644 --- ql/src/test/results/clientpositive/perf/query87.q.out +++ ql/src/test/results/clientpositive/perf/query87.q.out @@ -78,7 +78,7 @@ Stage-0 Select Operator [SEL_50] (rows=36524 width=1119) Output:["_col0","_col1"] Filter Operator [FIL_103] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) + predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) TableScan [TS_48] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"] <-Reducer 5 [SIMPLE_EDGE] @@ -133,7 +133,7 @@ Stage-0 Select Operator [SEL_25] (rows=36524 width=1119) Output:["_col0","_col1"] Filter Operator [FIL_100] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) + predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) TableScan [TS_23] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"] <-Reducer 4 [SIMPLE_EDGE] @@ -179,7 +179,7 @@ Stage-0 Select Operator [SEL_5] (rows=36524 width=1119) Output:["_col0","_col1"] Filter Operator [FIL_97] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) + predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) TableScan [TS_3] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date","d_month_seq"] diff --git ql/src/test/results/clientpositive/perf/query89.q.out ql/src/test/results/clientpositive/perf/query89.q.out index 4d0fb37..71db5d4 100644 --- ql/src/test/results/clientpositive/perf/query89.q.out +++ ql/src/test/results/clientpositive/perf/query89.q.out @@ -70,14 +70,14 @@ Stage-0 File Output Operator [FS_36] Limit [LIM_35] (rows=100 width=1436) Number of rows:100 - Select Operator [SEL_34] (rows=51243 width=1436) + Select Operator [SEL_34] (rows=76865 width=1436) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] <-Reducer 6 [SIMPLE_EDGE] SHUFFLE [RS_33] - Select Operator [SEL_30] (rows=51243 width=1436) + Select Operator [SEL_30] (rows=76865 width=1436) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7"] - Filter Operator [FIL_46] (rows=51243 width=1436) - predicate:(CASE WHEN ((avg_window_0 <> 0)) THEN ((abs((_col6 - avg_window_0)) / avg_window_0)) ELSE (null) END > 0.1) + Filter Operator [FIL_46] (rows=76865 width=1436) + predicate:CASE WHEN ((avg_window_0 <> 0)) THEN (((abs((_col6 - avg_window_0)) / avg_window_0) > 0.1)) ELSE (null) END Select Operator [SEL_29] (rows=153730 width=1436) Output:["avg_window_0","_col0","_col1","_col2","_col3","_col4","_col5","_col6"] PTF Operator [PTF_28] (rows=153730 width=1436) diff --git ql/src/test/results/clientpositive/perf/query92.q.out ql/src/test/results/clientpositive/perf/query92.q.out index 8ec1db2..9327f5a 100644 --- ql/src/test/results/clientpositive/perf/query92.q.out +++ ql/src/test/results/clientpositive/perf/query92.q.out @@ -57,7 +57,7 @@ Stage-0 Select Operator [SEL_5] (rows=8116 width=1119) Output:["_col0"] Filter Operator [FIL_43] (rows=8116 width=1119) - predicate:((d_date_sk is not null and (d_month_seq >= 1206)) and (d_month_seq <= 1217)) + predicate:(((d_month_seq >= 1206) and (d_month_seq <= 1217)) and d_date_sk is not null) TableScan [TS_3] (rows=73049 width=1119) default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"] <-Reducer 9 [SIMPLE_EDGE] @@ -78,7 +78,7 @@ Stage-0 Select Operator [SEL_19] (rows=8116 width=1119) Output:["_col0"] Filter Operator [FIL_45] (rows=8116 width=1119) - predicate:((d_date_sk is not null and (d_month_seq >= 1206)) and (d_month_seq <= 1217)) + predicate:(((d_month_seq >= 1206) and (d_month_seq <= 1217)) and d_date_sk is not null) TableScan [TS_17] (rows=73049 width=1119) default@date_dim,d1,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"] <-Map 7 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query94.q.out ql/src/test/results/clientpositive/perf/query94.q.out index 876a9ed..76c12cd 100644 --- ql/src/test/results/clientpositive/perf/query94.q.out +++ ql/src/test/results/clientpositive/perf/query94.q.out @@ -53,7 +53,7 @@ Stage-0 Select Operator [SEL_22] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_77] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_date BETWEEN '1999-05-01' AND '1999-07-01') + predicate:(d_date BETWEEN '1999-05-01' AND '1999-07-01' and d_date_sk is not null) TableScan [TS_20] (rows=73049 width=1119) default@date_dim,d,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"] <-Reducer 4 [SIMPLE_EDGE] @@ -67,7 +67,7 @@ Stage-0 Select Operator [SEL_19] (rows=42 width=1850) Output:["_col0"] Filter Operator [FIL_76] (rows=42 width=1850) - predicate:(web_site_sk is not null and (web_company_name = 'pri')) + predicate:((web_company_name = 'pri') and web_site_sk is not null) TableScan [TS_17] (rows=84 width=1850) default@web_site,s,Tbl:COMPLETE,Col:NONE,Output:["web_site_sk","web_company_name"] <-Reducer 3 [SIMPLE_EDGE] @@ -81,7 +81,7 @@ Stage-0 Select Operator [SEL_16] (rows=20000000 width=1014) Output:["_col0"] Filter Operator [FIL_75] (rows=20000000 width=1014) - predicate:(ca_address_sk is not null and (ca_state = 'TX')) + predicate:((ca_state = 'TX') and ca_address_sk is not null) TableScan [TS_14] (rows=40000000 width=1014) default@customer_address,ca,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state"] <-Reducer 2 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query95.q.out ql/src/test/results/clientpositive/perf/query95.q.out index 2c682e7..6447b37 100644 --- ql/src/test/results/clientpositive/perf/query95.q.out +++ ql/src/test/results/clientpositive/perf/query95.q.out @@ -34,7 +34,7 @@ Stage-0 Select Operator [SEL_40] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_115] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_date BETWEEN '2002-05-01' AND '2002-06-30') + predicate:(d_date BETWEEN '2002-05-01' AND '2002-06-30' and d_date_sk is not null) TableScan [TS_38] (rows=73049 width=1119) default@date_dim,d,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_date"] <-Reducer 4 [SIMPLE_EDGE] @@ -48,7 +48,7 @@ Stage-0 Select Operator [SEL_37] (rows=42 width=1850) Output:["_col0"] Filter Operator [FIL_114] (rows=42 width=1850) - predicate:(web_site_sk is not null and (web_company_name = 'pri')) + predicate:((web_company_name = 'pri') and web_site_sk is not null) TableScan [TS_35] (rows=84 width=1850) default@web_site,s,Tbl:COMPLETE,Col:NONE,Output:["web_site_sk","web_company_name"] <-Reducer 3 [SIMPLE_EDGE] @@ -62,7 +62,7 @@ Stage-0 Select Operator [SEL_34] (rows=20000000 width=1014) Output:["_col0"] Filter Operator [FIL_113] (rows=20000000 width=1014) - predicate:(ca_address_sk is not null and (ca_state = 'GA')) + predicate:((ca_state = 'GA') and ca_address_sk is not null) TableScan [TS_32] (rows=40000000 width=1014) default@customer_address,ca,Tbl:COMPLETE,Col:NONE,Output:["ca_address_sk","ca_state"] <-Reducer 2 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/perf/query97.q.out ql/src/test/results/clientpositive/perf/query97.q.out index 812333a..2f610bd 100644 --- ql/src/test/results/clientpositive/perf/query97.q.out +++ ql/src/test/results/clientpositive/perf/query97.q.out @@ -59,7 +59,7 @@ Stage-0 Select Operator [SEL_5] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_44] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) + predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) TableScan [TS_3] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"] <-Reducer 9 [SIMPLE_EDGE] @@ -80,7 +80,7 @@ Stage-0 Select Operator [SEL_19] (rows=36524 width=1119) Output:["_col0"] Filter Operator [FIL_46] (rows=36524 width=1119) - predicate:(d_date_sk is not null and d_month_seq BETWEEN 1193 AND 1204) + predicate:(d_month_seq BETWEEN 1193 AND 1204 and d_date_sk is not null) TableScan [TS_17] (rows=73049 width=1119) default@date_dim,date_dim,Tbl:COMPLETE,Col:NONE,Output:["d_date_sk","d_month_seq"] <-Map 7 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/ppd2.q.out ql/src/test/results/clientpositive/ppd2.q.out index 6ec934d..2562156 100644 --- ql/src/test/results/clientpositive/ppd2.q.out +++ ql/src/test/results/clientpositive/ppd2.q.out @@ -303,15 +303,15 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (CASE WHEN (((value like 'aaa%') or (value like 'vvv%'))) THEN (1) ELSE (0) END > 0) (type: boolean) - Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE + predicate: ((value like 'aaa%') or (value like 'vvv%')) (type: boolean) + Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: UDFToInteger(key) (type: int) outputColumnNames: _col0 - Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat diff --git ql/src/test/results/clientpositive/ppd_join2.q.out ql/src/test/results/clientpositive/ppd_join2.q.out index 9261d77..9487678 100644 --- ql/src/test/results/clientpositive/ppd_join2.q.out +++ ql/src/test/results/clientpositive/ppd_join2.q.out @@ -39,7 +39,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((((((key <> '302') and (key < '400')) and (key <> '305')) and value is not null) and (key <> '311')) and ((value <> 'val_50') or (key > '1'))) and (key <> '14')) (type: boolean) + predicate: (((((((key <> '302') and (key < '400')) and (key <> '305')) and (key <> '311')) and ((value <> 'val_50') or (key > '1'))) and (key <> '14')) and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -97,7 +97,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((key <> '306') and value is not null) and (sqrt(key) <> 13.0)) (type: boolean) + predicate: (((key <> '306') and (sqrt(key) <> 13.0)) and value is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) @@ -1723,7 +1723,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((((((key <> '302') and (key < '400')) and (key <> '305')) and value is not null) and (key <> '311')) and ((value <> 'val_50') or (key > '1'))) and (key <> '14')) (type: boolean) + predicate: (((((((key <> '302') and (key < '400')) and (key <> '305')) and (key <> '311')) and ((value <> 'val_50') or (key > '1'))) and (key <> '14')) and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -1781,7 +1781,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((key <> '306') and value is not null) and (sqrt(key) <> 13.0)) (type: boolean) + predicate: (((key <> '306') and (sqrt(key) <> 13.0)) and value is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) diff --git ql/src/test/results/clientpositive/ppd_join5.q.out ql/src/test/results/clientpositive/ppd_join5.q.out index a49db5d..f464c17 100644 --- ql/src/test/results/clientpositive/ppd_join5.q.out +++ ql/src/test/results/clientpositive/ppd_join5.q.out @@ -71,7 +71,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (id is not null and (d <= 1)) (type: boolean) + predicate: ((d <= 1) and id is not null) (type: boolean) Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: id (type: string), d (type: int) @@ -191,7 +191,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (id is not null and (d <= 1)) (type: boolean) + predicate: ((d <= 1) and id is not null) (type: boolean) Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: id (type: string), d (type: int) diff --git ql/src/test/results/clientpositive/ppd_repeated_alias.q.out ql/src/test/results/clientpositive/ppd_repeated_alias.q.out index 833dca1..3dbd258 100644 --- ql/src/test/results/clientpositive/ppd_repeated_alias.q.out +++ ql/src/test/results/clientpositive/ppd_repeated_alias.q.out @@ -210,7 +210,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (foo is not null and (bar = 3)) (type: boolean) + predicate: ((bar = 3) and foo is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: foo (type: int) diff --git ql/src/test/results/clientpositive/ppd_udf_case.q.out ql/src/test/results/clientpositive/ppd_udf_case.q.out index c2be025..bfe61c2 100644 --- ql/src/test/results/clientpositive/ppd_udf_case.q.out +++ ql/src/test/results/clientpositive/ppd_udf_case.q.out @@ -37,7 +37,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and CASE (key) WHEN ('27') THEN (true) WHEN ('38') THEN (false) ELSE (null) END) (type: boolean) + predicate: (((ds = '2008-04-08') and CASE WHEN ((key = '27')) THEN (true) WHEN ((key = '38')) THEN (false) ELSE (null) END) and key is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string), hr (type: string) @@ -53,7 +53,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and CASE (key) WHEN ('27') THEN (true) WHEN ('38') THEN (false) ELSE (null) END) (type: boolean) + predicate: (((ds = '2008-04-08') and CASE WHEN ((key = '27')) THEN (true) WHEN ((key = '38')) THEN (false) ELSE (null) END) and key is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string), hr (type: string) @@ -183,7 +183,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and CASE (key) WHEN ('27') THEN (true) WHEN ('38') THEN (false) ELSE (null) END) (type: boolean) + predicate: (CASE WHEN ((key = '27')) THEN (true) WHEN ((key = '38')) THEN (false) ELSE (null) END and key is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string), hr (type: string) @@ -199,7 +199,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and CASE (key) WHEN ('27') THEN (true) WHEN ('38') THEN (false) ELSE (null) END) (type: boolean) + predicate: (CASE WHEN ((key = '27')) THEN (true) WHEN ((key = '38')) THEN (false) ELSE (null) END and key is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string), hr (type: string) diff --git ql/src/test/results/clientpositive/ppd_union_view.q.out ql/src/test/results/clientpositive/ppd_union_view.q.out index 40e20a6..210cece 100644 --- ql/src/test/results/clientpositive/ppd_union_view.q.out +++ ql/src/test/results/clientpositive/ppd_union_view.q.out @@ -177,13 +177,13 @@ STAGE PLANS: predicate: keymap is not null (type: boolean) Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: keymap (type: string), value (type: string) - outputColumnNames: _col0, _col1 + expressions: keymap (type: string), value (type: string), ds (type: string) + outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: _col0 (type: string), '2011-10-13' (type: string) + key expressions: _col0 (type: string), _col2 (type: string) sort order: ++ - Map-reduce partition columns: _col0 (type: string), '2011-10-13' (type: string) + Map-reduce partition columns: _col0 (type: string), _col2 (type: string) Statistics: Num rows: 1 Data size: 14 Basic stats: COMPLETE Column stats: NONE tag: 0 value expressions: _col1 (type: string) @@ -197,13 +197,13 @@ STAGE PLANS: predicate: keymap is not null (type: boolean) Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: key (type: string), keymap (type: string) - outputColumnNames: _col0, _col1 + expressions: key (type: string), keymap (type: string), ds (type: string) + outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: _col1 (type: string), '2011-10-13' (type: string) + key expressions: _col1 (type: string), _col2 (type: string) sort order: ++ - Map-reduce partition columns: _col1 (type: string), '2011-10-13' (type: string) + Map-reduce partition columns: _col1 (type: string), _col2 (type: string) Statistics: Num rows: 1 Data size: 12 Basic stats: COMPLETE Column stats: NONE tag: 1 value expressions: _col0 (type: string) @@ -521,7 +521,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (keymap is not null and (ds = '2011-10-15')) (type: boolean) + predicate: ((ds = '2011-10-15') and keymap is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: keymap (type: string), value (type: string) @@ -541,7 +541,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (keymap is not null and (ds = '2011-10-15')) (type: boolean) + predicate: ((ds = '2011-10-15') and keymap is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: key (type: string), keymap (type: string) diff --git ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out index 95146ed..b1f280f 100644 --- ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out +++ ql/src/test/results/clientpositive/ppr_allchildsarenull.q.out @@ -74,18 +74,18 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (CASE WHEN (((value like 'aaa%') or (value like 'vvv%'))) THEN (1) ELSE (0) END > 0) (type: boolean) - Statistics: Num rows: 333 Data size: 3537 Basic stats: COMPLETE Column stats: NONE + predicate: ((value like 'aaa%') or (value like 'vvv%')) (type: boolean) + Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: UDFToInteger(key) (type: int), value (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 333 Data size: 3537 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 - Statistics: Num rows: 333 Data size: 3537 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat @@ -307,18 +307,18 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: ((ds = '2008-04-08') and (CASE WHEN (((value like 'aaa%') or (value like 'vvv%'))) THEN (1) ELSE (0) END > 0)) (type: boolean) - Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE + predicate: ((ds = '2008-04-08') and ((value like 'aaa%') or (value like 'vvv%'))) (type: boolean) + Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: UDFToInteger(key) (type: int), value (type: string) outputColumnNames: _col0, _col1 - Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false GlobalTableId: 0 #### A masked pattern was here #### NumFilesPerFileSink: 1 - Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE #### A masked pattern was here #### table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat diff --git ql/src/test/results/clientpositive/semijoin.q.out ql/src/test/results/clientpositive/semijoin.q.out index b068ccc..7624fa7 100644 --- ql/src/test/results/clientpositive/semijoin.q.out +++ ql/src/test/results/clientpositive/semijoin.q.out @@ -2528,7 +2528,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 163 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 51 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) diff --git ql/src/test/results/clientpositive/semijoin4.q.out ql/src/test/results/clientpositive/semijoin4.q.out index 0da9eb3..e42668b 100644 --- ql/src/test/results/clientpositive/semijoin4.q.out +++ ql/src/test/results/clientpositive/semijoin4.q.out @@ -69,7 +69,7 @@ STAGE PLANS: alias: t1 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (((decimal1309_col_65 is not null and bigint_col_13 is not null) and UDFToInteger(tinyint_col_46) is not null) and (UDFToInteger(tinyint_col_46) = -92)) (type: boolean) + predicate: ((((UDFToInteger(tinyint_col_46) = -92) and decimal1309_col_65 is not null) and bigint_col_13 is not null) and UDFToInteger(tinyint_col_46) is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: bigint_col_13 (type: bigint), smallint_col_24 (type: smallint), double_col_60 (type: double), decimal1309_col_65 (type: decimal(13,9)) @@ -85,7 +85,7 @@ STAGE PLANS: alias: t2 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (((tinyint_col_18 is not null and decimal2709_col_9 is not null) and UDFToInteger(tinyint_col_21) is not null) and (UDFToInteger(tinyint_col_21) = -92)) (type: boolean) + predicate: ((((UDFToInteger(tinyint_col_21) = -92) and tinyint_col_18 is not null) and decimal2709_col_9 is not null) and UDFToInteger(tinyint_col_21) is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: decimal2709_col_9 (type: decimal(27,9)), tinyint_col_18 (type: tinyint) diff --git ql/src/test/results/clientpositive/smb_mapjoin_25.q.out ql/src/test/results/clientpositive/smb_mapjoin_25.q.out index 130c029..b0db59e 100644 --- ql/src/test/results/clientpositive/smb_mapjoin_25.q.out +++ ql/src/test/results/clientpositive/smb_mapjoin_25.q.out @@ -46,6 +46,8 @@ POSTHOOK: query: load data local inpath '../../data/files/smbbucket_3.rc' overwr POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@smb_bucket_3 +Warning: Shuffle Join JOIN[9][tables = [$hdt$_0, $hdt$_1]] in Stage 'Stage-1:MAPRED' is a cross product +Warning: Shuffle Join JOIN[20][tables = [$hdt$_1, $hdt$_2]] in Stage 'Stage-4:MAPRED' is a cross product PREHOOK: query: explain select * from (select a.key from smb_bucket_1 a join smb_bucket_2 b on (a.key = b.key) where a.key = 5) t1 left outer join (select c.key from smb_bucket_2 c join smb_bucket_3 d on (c.key = d.key) where c.key=5) t2 on (t1.key=t2.key) where t2.key=5 PREHOOK: type: QUERY @@ -71,9 +73,7 @@ STAGE PLANS: Select Operator Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 5 (type: int) - sort order: + - Map-reduce partition columns: 5 (type: int) + sort order: Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: NONE TableScan alias: b @@ -84,17 +84,15 @@ STAGE PLANS: Select Operator Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 5 (type: int) - sort order: + - Map-reduce partition columns: 5 (type: int) + sort order: Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 keys: - 0 _col0 (type: int) - 1 _col0 (type: int) + 0 + 1 Statistics: Num rows: 28 Data size: 114 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -123,8 +121,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 _col0 (type: int) - 1 _col0 (type: int) + 0 5 (type: int) + 1 5 (type: int) Statistics: Num rows: 31 Data size: 129 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: 5 (type: int), 5 (type: int) @@ -150,9 +148,7 @@ STAGE PLANS: Select Operator Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 5 (type: int) - sort order: + - Map-reduce partition columns: 5 (type: int) + sort order: Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE TableScan alias: d @@ -163,17 +159,15 @@ STAGE PLANS: Select Operator Statistics: Num rows: 27 Data size: 108 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 5 (type: int) - sort order: + - Map-reduce partition columns: 5 (type: int) + sort order: Statistics: Num rows: 27 Data size: 108 Basic stats: COMPLETE Column stats: NONE Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 keys: - 0 _col0 (type: int) - 1 _col0 (type: int) + 0 + 1 Statistics: Num rows: 29 Data size: 118 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -188,6 +182,8 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[37][bigTable=?] in task 'Stage-9:MAPRED' is a cross product +Warning: Map Join MAPJOIN[38][bigTable=?] in task 'Stage-10:MAPRED' is a cross product PREHOOK: query: -- explain -- select * from smb_bucket_1 a left outer join smb_bucket_2 b on a.key = b.key left outer join src c on a.key=c.value @@ -236,8 +232,8 @@ STAGE PLANS: Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE HashTable Sink Operator keys: - 0 5 (type: int) - 1 5 (type: int) + 0 + 1 Stage: Stage-9 Map Reduce @@ -254,8 +250,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 5 (type: int) - 1 5 (type: int) + 0 + 1 Statistics: Num rows: 28 Data size: 114 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -367,8 +363,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 _col0 (type: int) - 1 _col0 (type: int) + 0 5 (type: int) + 1 5 (type: int) Statistics: Num rows: 31 Data size: 129 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: 5 (type: int), 5 (type: int) @@ -400,8 +396,8 @@ STAGE PLANS: Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE HashTable Sink Operator keys: - 0 5 (type: int) - 1 5 (type: int) + 0 + 1 Stage: Stage-10 Map Reduce @@ -418,8 +414,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 5 (type: int) - 1 5 (type: int) + 0 + 1 Statistics: Num rows: 29 Data size: 118 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false @@ -436,6 +432,8 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[37][bigTable=?] in task 'Stage-9:MAPRED' is a cross product +Warning: Map Join MAPJOIN[38][bigTable=?] in task 'Stage-10:MAPRED' is a cross product PREHOOK: query: select * from (select a.key from smb_bucket_1 a join smb_bucket_2 b on (a.key = b.key) where a.key = 5) t1 left outer join (select c.key from smb_bucket_2 c join smb_bucket_3 d on (c.key = d.key) where c.key=5) t2 on (t1.key=t2.key) where t2.key=5 PREHOOK: type: QUERY PREHOOK: Input: default@smb_bucket_1 diff --git ql/src/test/results/clientpositive/spark/auto_join32.q.out ql/src/test/results/clientpositive/spark/auto_join32.q.out index 340bba8..3909481 100644 --- ql/src/test/results/clientpositive/spark/auto_join32.q.out +++ ql/src/test/results/clientpositive/spark/auto_join32.q.out @@ -459,7 +459,7 @@ STAGE PLANS: alias: s Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (name is not null and (p = 'bar')) (type: boolean) + predicate: ((p = 'bar') and name is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: name (type: string) diff --git ql/src/test/results/clientpositive/spark/auto_join_without_localtask.q.out ql/src/test/results/clientpositive/spark/auto_join_without_localtask.q.out index 9a8e248..eda2c54 100644 --- ql/src/test/results/clientpositive/spark/auto_join_without_localtask.q.out +++ ql/src/test/results/clientpositive/spark/auto_join_without_localtask.q.out @@ -337,7 +337,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (UDFToDouble(key) > 100.0)) (type: boolean) + predicate: ((UDFToDouble(key) > 100.0) and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out index 5bc777d..0b64a87 100644 --- ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out +++ ql/src/test/results/clientpositive/spark/bucketsortoptimize_insert_7.q.out @@ -89,7 +89,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and ((key = 0) or (key = 5))) (type: boolean) + predicate: (((key = 0) or (key = 5)) and key is not null) (type: boolean) Statistics: Num rows: 10 Data size: 70 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -114,7 +114,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 84 Data size: 736 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and ((key = 0) or (key = 5))) (type: boolean) + predicate: (((key = 0) or (key = 5)) and key is not null) (type: boolean) Statistics: Num rows: 84 Data size: 736 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) diff --git ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out index dc14397..6877ee7 100644 --- ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out +++ ql/src/test/results/clientpositive/spark/constprog_partitioner.q.out @@ -121,7 +121,7 @@ STAGE PLANS: alias: li Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (l_orderkey is not null and (l_linenumber = 1)) (type: boolean) + predicate: ((l_linenumber = 1) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int), 1 (type: int) @@ -139,7 +139,7 @@ STAGE PLANS: alias: li Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((l_shipmode = 'AIR') and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_shipmode = 'AIR') and (l_linenumber = 1)) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int) diff --git ql/src/test/results/clientpositive/spark/dynamic_rdd_cache.q.out ql/src/test/results/clientpositive/spark/dynamic_rdd_cache.q.out index ea19b92..a7c1e78 100644 --- ql/src/test/results/clientpositive/spark/dynamic_rdd_cache.q.out +++ ql/src/test/results/clientpositive/spark/dynamic_rdd_cache.q.out @@ -749,7 +749,7 @@ STAGE PLANS: alias: date_dim Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (((d_year = 1999) and d_date_sk is not null) and (d_moy = 3)) (type: boolean) + predicate: (((d_year = 1999) and (d_moy = 3)) and d_date_sk is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: d_date_sk (type: int) @@ -819,7 +819,7 @@ STAGE PLANS: alias: date_dim Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (((d_year = 1999) and d_date_sk is not null) and (d_moy = 4)) (type: boolean) + predicate: (((d_year = 1999) and (d_moy = 4)) and d_date_sk is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: d_date_sk (type: int) @@ -936,10 +936,10 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) (type: boolean) + predicate: CASE WHEN ((_col4 = 0.0)) THEN (false) ELSE (((_col5 / _col4) > 1.0)) END (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator - expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE (_col4) WHEN (0) THEN (null) ELSE ((_col5 / _col4)) END (type: double) + expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE WHEN ((_col4 = 0.0)) THEN (null) ELSE ((_col5 / _col4)) END (type: double) outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Reduce Output Operator @@ -1019,10 +1019,10 @@ STAGE PLANS: outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (CASE (_col4) WHEN (0) THEN (0) ELSE ((_col5 / _col4)) END > 1.0) (type: boolean) + predicate: CASE WHEN ((_col4 = 0.0)) THEN (false) ELSE (((_col5 / _col4) > 1.0)) END (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator - expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE (_col4) WHEN (0) THEN (null) ELSE ((_col5 / _col4)) END (type: double) + expressions: _col1 (type: int), _col2 (type: int), _col4 (type: double), CASE WHEN ((_col4 = 0.0)) THEN (null) ELSE ((_col5 / _col4)) END (type: double) outputColumnNames: _col1, _col2, _col4, _col5 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Reduce Output Operator diff --git ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out index a8935ac..425be20 100644 --- ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out +++ ql/src/test/results/clientpositive/spark/filter_join_breaktask.q.out @@ -225,7 +225,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: ((key is not null and value is not null) and (value <> '')) (type: boolean) + predicate: ((value <> '') and key is not null) (type: boolean) Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -297,7 +297,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (value is not null and (value <> '')) (type: boolean) + predicate: (value <> '') (type: boolean) Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) diff --git ql/src/test/results/clientpositive/spark/index_auto_self_join.q.out ql/src/test/results/clientpositive/spark/index_auto_self_join.q.out index 541197e..3cd2340 100644 --- ql/src/test/results/clientpositive/spark/index_auto_self_join.q.out +++ ql/src/test/results/clientpositive/spark/index_auto_self_join.q.out @@ -25,7 +25,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean) + predicate: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean) Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -43,7 +43,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean) + predicate: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and value is not null) (type: boolean) Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -141,10 +141,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: a - filterExpr: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean) + filterExpr: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (UDFToDouble(key) > 80.0)) and (UDFToDouble(key) < 100.0)) (type: boolean) + predicate: (((UDFToDouble(key) > 80.0) and (UDFToDouble(key) < 100.0)) and value is not null) (type: boolean) Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -160,10 +160,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: a - filterExpr: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean) + filterExpr: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and value is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((value is not null and (UDFToDouble(key) > 70.0)) and (UDFToDouble(key) < 90.0)) (type: boolean) + predicate: (((UDFToDouble(key) > 70.0) and (UDFToDouble(key) < 90.0)) and value is not null) (type: boolean) Statistics: Num rows: 55 Data size: 584 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/spark/join34.q.out ql/src/test/results/clientpositive/spark/join34.q.out index e99fd5b..a4cbc79 100644 --- ql/src/test/results/clientpositive/spark/join34.q.out +++ ql/src/test/results/clientpositive/spark/join34.q.out @@ -300,7 +300,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (type: boolean) + predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/spark/join35.q.out ql/src/test/results/clientpositive/spark/join35.q.out index 817ae5d..598143f 100644 --- ql/src/test/results/clientpositive/spark/join35.q.out +++ ql/src/test/results/clientpositive/spark/join35.q.out @@ -322,7 +322,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (key is not null and ((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0))) (type: boolean) + predicate: (((UDFToDouble(key) < 20.0) or (UDFToDouble(key) > 100.0)) and key is not null) (type: boolean) Statistics: Num rows: 16 Data size: 122 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out index 46eae00..fcc1dc2 100644 --- ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out +++ ql/src/test/results/clientpositive/spark/mapjoin_mapjoin.q.out @@ -532,7 +532,7 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (value > 'val_450')) (type: boolean) + predicate: ((value > 'val_450') and key is not null) (type: boolean) Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/spark/ppd_join2.q.out ql/src/test/results/clientpositive/spark/ppd_join2.q.out index dbf315b..386a876 100644 --- ql/src/test/results/clientpositive/spark/ppd_join2.q.out +++ ql/src/test/results/clientpositive/spark/ppd_join2.q.out @@ -44,7 +44,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((key <> '306') and value is not null) and (sqrt(key) <> 13.0)) (type: boolean) + predicate: (((key <> '306') and (sqrt(key) <> 13.0)) and value is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) @@ -61,7 +61,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((((((key <> '302') and (key < '400')) and (key <> '305')) and value is not null) and (key <> '311')) and ((value <> 'val_50') or (key > '1'))) and (key <> '14')) (type: boolean) + predicate: (((((((key <> '302') and (key < '400')) and (key <> '305')) and (key <> '311')) and ((value <> 'val_50') or (key > '1'))) and (key <> '14')) and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -1728,7 +1728,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((key <> '306') and value is not null) and (sqrt(key) <> 13.0)) (type: boolean) + predicate: (((key <> '306') and (sqrt(key) <> 13.0)) and value is not null) (type: boolean) Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) @@ -1745,7 +1745,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((((((key <> '302') and (key < '400')) and (key <> '305')) and value is not null) and (key <> '311')) and ((value <> 'val_50') or (key > '1'))) and (key <> '14')) (type: boolean) + predicate: (((((((key <> '302') and (key < '400')) and (key <> '305')) and (key <> '311')) and ((value <> 'val_50') or (key > '1'))) and (key <> '14')) and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/spark/ppd_join5.q.out ql/src/test/results/clientpositive/spark/ppd_join5.q.out index 4354686..1c2b592 100644 --- ql/src/test/results/clientpositive/spark/ppd_join5.q.out +++ ql/src/test/results/clientpositive/spark/ppd_join5.q.out @@ -78,7 +78,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (id is not null and (d <= 1)) (type: boolean) + predicate: ((d <= 1) and id is not null) (type: boolean) Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: id (type: string), d (type: int) @@ -198,7 +198,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (id is not null and (d <= 1)) (type: boolean) + predicate: ((d <= 1) and id is not null) (type: boolean) Statistics: Num rows: 1 Data size: 3 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: id (type: string), d (type: int) diff --git ql/src/test/results/clientpositive/spark/semijoin.q.out ql/src/test/results/clientpositive/spark/semijoin.q.out index c0f761a..3ed8c02 100644 --- ql/src/test/results/clientpositive/spark/semijoin.q.out +++ ql/src/test/results/clientpositive/spark/semijoin.q.out @@ -2520,7 +2520,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 163 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 51 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) diff --git ql/src/test/results/clientpositive/spark/smb_mapjoin_25.q.out ql/src/test/results/clientpositive/spark/smb_mapjoin_25.q.out index 6fdee3c..4b392ba 100644 --- ql/src/test/results/clientpositive/spark/smb_mapjoin_25.q.out +++ ql/src/test/results/clientpositive/spark/smb_mapjoin_25.q.out @@ -46,6 +46,8 @@ POSTHOOK: query: load data local inpath '../../data/files/smbbucket_3.rc' overwr POSTHOOK: type: LOAD #### A masked pattern was here #### POSTHOOK: Output: default@smb_bucket_3 +Warning: Shuffle Join JOIN[9][tables = [$hdt$_0, $hdt$_1]] in Work 'Reducer 2' is a cross product +Warning: Shuffle Join JOIN[20][tables = [$hdt$_1, $hdt$_2]] in Work 'Reducer 6' is a cross product PREHOOK: query: explain select * from (select a.key from smb_bucket_1 a join smb_bucket_2 b on (a.key = b.key) where a.key = 5) t1 left outer join (select c.key from smb_bucket_2 c join smb_bucket_3 d on (c.key = d.key) where c.key=5) t2 on (t1.key=t2.key) where t2.key=5 PREHOOK: type: QUERY @@ -60,8 +62,8 @@ STAGE PLANS: Stage: Stage-1 Spark Edges: - Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 2), Map 4 (PARTITION-LEVEL SORT, 2) - Reducer 6 <- Map 5 (PARTITION-LEVEL SORT, 2), Map 7 (PARTITION-LEVEL SORT, 2) + Reducer 2 <- Map 1 (PARTITION-LEVEL SORT, 1), Map 4 (PARTITION-LEVEL SORT, 1) + Reducer 6 <- Map 5 (PARTITION-LEVEL SORT, 1), Map 7 (PARTITION-LEVEL SORT, 1) Reducer 3 <- Reducer 2 (PARTITION-LEVEL SORT, 2), Reducer 6 (PARTITION-LEVEL SORT, 2) #### A masked pattern was here #### Vertices: @@ -76,9 +78,7 @@ STAGE PLANS: Select Operator Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 5 (type: int) - sort order: + - Map-reduce partition columns: 5 (type: int) + sort order: Statistics: Num rows: 26 Data size: 104 Basic stats: COMPLETE Column stats: NONE Map 4 Map Operator Tree: @@ -91,9 +91,7 @@ STAGE PLANS: Select Operator Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 5 (type: int) - sort order: + - Map-reduce partition columns: 5 (type: int) + sort order: Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Map 5 Map Operator Tree: @@ -106,9 +104,7 @@ STAGE PLANS: Select Operator Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 5 (type: int) - sort order: + - Map-reduce partition columns: 5 (type: int) + sort order: Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Map 7 Map Operator Tree: @@ -121,9 +117,7 @@ STAGE PLANS: Select Operator Statistics: Num rows: 27 Data size: 108 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 5 (type: int) - sort order: + - Map-reduce partition columns: 5 (type: int) + sort order: Statistics: Num rows: 27 Data size: 108 Basic stats: COMPLETE Column stats: NONE Reducer 2 Reduce Operator Tree: @@ -131,8 +125,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 _col0 (type: int) - 1 _col0 (type: int) + 0 + 1 Statistics: Num rows: 28 Data size: 114 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 5 (type: int) @@ -145,8 +139,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 _col0 (type: int) - 1 _col0 (type: int) + 0 5 (type: int) + 1 5 (type: int) Statistics: Num rows: 31 Data size: 129 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: 5 (type: int), 5 (type: int) @@ -165,8 +159,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 _col0 (type: int) - 1 _col0 (type: int) + 0 + 1 Statistics: Num rows: 29 Data size: 118 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: 5 (type: int) @@ -180,6 +174,8 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[33][bigTable=?] in task 'Stage-1:MAPRED' is a cross product +Warning: Map Join MAPJOIN[32][bigTable=?] in task 'Stage-2:MAPRED' is a cross product PREHOOK: query: -- explain -- select * from smb_bucket_1 a left outer join smb_bucket_2 b on a.key = b.key left outer join src c on a.key=c.value @@ -219,8 +215,8 @@ STAGE PLANS: Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: - 0 5 (type: int) - 1 5 (type: int) + 0 + 1 Local Work: Map Reduce Local Work @@ -242,8 +238,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 5 (type: int) - 1 5 (type: int) + 0 + 1 input vertices: 1 Map 2 Statistics: Num rows: 28 Data size: 114 Basic stats: COMPLETE Column stats: NONE @@ -265,8 +261,8 @@ STAGE PLANS: Statistics: Num rows: 25 Data size: 100 Basic stats: COMPLETE Column stats: NONE Spark HashTable Sink Operator keys: - 0 5 (type: int) - 1 5 (type: int) + 0 + 1 Local Work: Map Reduce Local Work @@ -288,8 +284,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 5 (type: int) - 1 5 (type: int) + 0 + 1 input vertices: 0 Map 3 Statistics: Num rows: 29 Data size: 118 Basic stats: COMPLETE Column stats: NONE @@ -322,6 +318,8 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[33][bigTable=?] in task 'Stage-1:MAPRED' is a cross product +Warning: Map Join MAPJOIN[32][bigTable=?] in task 'Stage-2:MAPRED' is a cross product PREHOOK: query: select * from (select a.key from smb_bucket_1 a join smb_bucket_2 b on (a.key = b.key) where a.key = 5) t1 left outer join (select c.key from smb_bucket_2 c join smb_bucket_3 d on (c.key = d.key) where c.key=5) t2 on (t1.key=t2.key) where t2.key=5 PREHOOK: type: QUERY PREHOOK: Input: default@smb_bucket_1 diff --git ql/src/test/results/clientpositive/spark/subquery_exists.q.out ql/src/test/results/clientpositive/spark/subquery_exists.q.out index 22fb77e..0d89ec5 100644 --- ql/src/test/results/clientpositive/spark/subquery_exists.q.out +++ ql/src/test/results/clientpositive/spark/subquery_exists.q.out @@ -41,7 +41,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (value > 'val_9')) (type: boolean) + predicate: ((value > 'val_9') and key is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/spark/subquery_in.q.out ql/src/test/results/clientpositive/spark/subquery_in.q.out index 66840ec..16b7684 100644 --- ql/src/test/results/clientpositive/spark/subquery_in.q.out +++ ql/src/test/results/clientpositive/spark/subquery_in.q.out @@ -149,7 +149,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > '9')) (type: boolean) + predicate: ((key > '9') and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -629,7 +629,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > '9')) (type: boolean) + predicate: ((key > '9') and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -785,7 +785,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int) diff --git ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out index f2c7b08..bbf24fd 100644 --- ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out +++ ql/src/test/results/clientpositive/spark/table_access_keys_stats.q.out @@ -509,7 +509,7 @@ Keys:val,key Table:default@t2 Keys:key -Operator:GBY_16 +Operator:GBY_17 Table:default@t3 Keys:val diff --git ql/src/test/results/clientpositive/spark/union_remove_19.q.out ql/src/test/results/clientpositive/spark/union_remove_19.q.out index df0fecd..4686b8e 100644 --- ql/src/test/results/clientpositive/spark/union_remove_19.q.out +++ ql/src/test/results/clientpositive/spark/union_remove_19.q.out @@ -248,25 +248,25 @@ STAGE PLANS: Map Operator Tree: TableScan alias: inputtbl1 - Statistics: Num rows: 10 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 30 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (UDFToDouble(key) = 7.0) (type: boolean) - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: '7' (type: string) outputColumnNames: _col0 - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count(1) keys: _col0 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint) Reducer 2 Reduce Operator Tree: @@ -275,10 +275,10 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 7 Data size: 7 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 4 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 14 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -291,10 +291,10 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 7 Data size: 7 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 4 Data size: 12 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 14 Data size: 14 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat diff --git ql/src/test/results/clientpositive/spark/vector_mapjoin_reduce.q.out ql/src/test/results/clientpositive/spark/vector_mapjoin_reduce.q.out index 85cee4d..e3a0379 100644 --- ql/src/test/results/clientpositive/spark/vector_mapjoin_reduce.q.out +++ ql/src/test/results/clientpositive/spark/vector_mapjoin_reduce.q.out @@ -100,7 +100,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int) @@ -202,7 +202,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((l_shipmode = 'AIR') and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_shipmode = 'AIR') and (l_linenumber = 1)) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int) @@ -262,7 +262,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int), 1 (type: int) diff --git ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out index b744927..f7eadaf 100644 --- ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out +++ ql/src/test/results/clientpositive/spark/vectorization_short_regress.q.out @@ -2678,7 +2678,7 @@ STAGE PLANS: alias: alltypesorc Statistics: Num rows: 12288 Data size: 377237 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cboolean1 is not null and (((cdouble < UDFToDouble(csmallint)) and (cboolean2 = cboolean1) and (UDFToDouble(cbigint) <= -863.257)) or ((cint >= -257) and cstring1 is not null and (cboolean1 >= 1)) or cstring2 regexp 'b' or ((csmallint >= UDFToShort(ctinyint)) and ctimestamp2 is null))) (type: boolean) + predicate: ((((cdouble < UDFToDouble(csmallint)) and (cboolean2 = cboolean1) and (UDFToDouble(cbigint) <= -863.257)) or ((cint >= -257) and cstring1 is not null and (cboolean1 >= 1)) or cstring2 regexp 'b' or ((csmallint >= UDFToShort(ctinyint)) and ctimestamp2 is null)) and cboolean1 is not null) (type: boolean) Statistics: Num rows: 10239 Data size: 314333 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) diff --git ql/src/test/results/clientpositive/spark/vectorized_case.q.out ql/src/test/results/clientpositive/spark/vectorized_case.q.out index 7d15136..c06ea94 100644 --- ql/src/test/results/clientpositive/spark/vectorized_case.q.out +++ ql/src/test/results/clientpositive/spark/vectorized_case.q.out @@ -52,7 +52,7 @@ STAGE PLANS: predicate: ((csmallint = 418) or (csmallint = 12205) or (csmallint = 10583)) (type: boolean) Statistics: Num rows: 12288 Data size: 377237 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string), CASE (csmallint) WHEN (418) THEN ('a') WHEN (12205) THEN ('b') ELSE ('c') END (type: string) + expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 12288 Data size: 377237 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -166,7 +166,7 @@ STAGE PLANS: predicate: ((csmallint = 418) or (csmallint = 12205) or (csmallint = 10583)) (type: boolean) Statistics: Num rows: 12288 Data size: 377237 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE (null) END (type: string), CASE (csmallint) WHEN (418) THEN ('a') WHEN (12205) THEN (null) ELSE ('c') END (type: string) + expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE (null) END (type: string), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN (null) ELSE ('c') END (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 12288 Data size: 377237 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/subquery_exists.q.out ql/src/test/results/clientpositive/subquery_exists.q.out index 26b9a38..1a17274 100644 --- ql/src/test/results/clientpositive/subquery_exists.q.out +++ ql/src/test/results/clientpositive/subquery_exists.q.out @@ -36,7 +36,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (value > 'val_9')) (type: boolean) + predicate: ((value > 'val_9') and key is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/subquery_in.q.out ql/src/test/results/clientpositive/subquery_in.q.out index 8f5c43c..f75f7d8 100644 --- ql/src/test/results/clientpositive/subquery_in.q.out +++ ql/src/test/results/clientpositive/subquery_in.q.out @@ -136,7 +136,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > '9')) (type: boolean) + predicate: ((key > '9') and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -669,7 +669,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > '9')) (type: boolean) + predicate: ((key > '9') and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -790,7 +790,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int) diff --git ql/src/test/results/clientpositive/subquery_notin.q.out ql/src/test/results/clientpositive/subquery_notin.q.out index 090bdec..f1fceba 100644 --- ql/src/test/results/clientpositive/subquery_notin.q.out +++ ql/src/test/results/clientpositive/subquery_notin.q.out @@ -1475,7 +1475,7 @@ STAGE PLANS: alias: src Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((key < '11') and CASE WHEN ((key > '104')) THEN (null) ELSE (key) END is null) (type: boolean) + predicate: ((key < '11') and CASE WHEN ((key > '104')) THEN (true) ELSE (key is null) END) (type: boolean) Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE Select Operator Statistics: Num rows: 83 Data size: 881 Basic stats: COMPLETE Column stats: NONE diff --git ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out index 7aa2375..6f2e5ca 100644 --- ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out +++ ql/src/test/results/clientpositive/subquery_unqualcolumnrefs.q.out @@ -52,7 +52,7 @@ STAGE PLANS: alias: src11 Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (value1 is not null and (key1 > '9')) (type: boolean) + predicate: ((key1 > '9') and value1 is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: key1 (type: string), value1 (type: string) @@ -122,7 +122,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > '9')) (type: boolean) + predicate: ((key > '9') and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -586,7 +586,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > '9')) (type: boolean) + predicate: ((key > '9') and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/table_access_keys_stats.q.out ql/src/test/results/clientpositive/table_access_keys_stats.q.out index f2c7b08..bbf24fd 100644 --- ql/src/test/results/clientpositive/table_access_keys_stats.q.out +++ ql/src/test/results/clientpositive/table_access_keys_stats.q.out @@ -509,7 +509,7 @@ Keys:val,key Table:default@t2 Keys:key -Operator:GBY_16 +Operator:GBY_17 Table:default@t3 Keys:val diff --git ql/src/test/results/clientpositive/tez/dynamic_partition_pruning.q.out ql/src/test/results/clientpositive/tez/dynamic_partition_pruning.q.out index bee95c1..fb16b40 100644 --- ql/src/test/results/clientpositive/tez/dynamic_partition_pruning.q.out +++ ql/src/test/results/clientpositive/tez/dynamic_partition_pruning.q.out @@ -223,10 +223,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -346,10 +346,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -469,10 +469,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -592,10 +592,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -705,10 +705,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -738,10 +738,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 10 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -884,10 +884,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -902,10 +902,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 10 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -1041,10 +1041,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 108 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -1179,10 +1179,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 108 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -1300,10 +1300,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -1423,10 +1423,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -1542,10 +1542,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1665,10 +1665,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1788,10 +1788,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1896,10 +1896,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -2017,10 +2017,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -2158,20 +2158,16 @@ STAGE PLANS: alias: srcpart filterExpr: (ds = '2008-04-08') (type: boolean) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: '2008-04-08' (type: string) - outputColumnNames: ds + Group By Operator + keys: '2008-04-08' (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: ds (type: string) - mode: hash - outputColumnNames: _col0 + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Reducer 2 Reduce Operator Tree: Merge Join Operator @@ -2179,7 +2175,7 @@ STAGE PLANS: Inner Join 0 to 1 keys: 0 _col0 (type: string) - 1 _col0 (type: string) + 1 '2008-04-08' (type: string) Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() @@ -2207,30 +2203,32 @@ STAGE PLANS: Reducer 5 Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: string) + keys: '2008-04-08' (type: string) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: string) - outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string) - mode: hash + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '2008-04-08' (type: string) outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Dynamic Partitioning Event Operator - Target column: ds (string) - Target Input: srcpart - Partition key expr: ds + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Target Vertex: Map 1 + Dynamic Partitioning Event Operator + Target column: ds (string) + Target Input: srcpart + Partition key expr: ds + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Stage: Stage-0 Fetch Operator @@ -2864,22 +2862,23 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ds (type: string) - outputColumnNames: _col0 + expressions: ds (type: string), hr (type: string) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) Map 5 Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -2929,11 +2928,12 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) + outputColumnNames: _col1 Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: '11' (type: string) + key expressions: _col1 (type: string) sort order: + - Map-reduce partition columns: '11' (type: string) + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE Reducer 3 Reduce Operator Tree: @@ -2941,7 +2941,7 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 '11' (type: string) + 0 _col1 (type: string) 1 '11' (type: string) Statistics: Num rows: 1210 Data size: 12854 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -3017,10 +3017,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + filterExpr: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + predicate: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: ds (type: string) @@ -3035,10 +3035,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3846,10 +3846,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3980,10 +3980,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4113,10 +4113,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4146,10 +4146,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 10 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -4281,10 +4281,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 108 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 27 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -4428,10 +4428,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4536,10 +4536,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -4655,10 +4655,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 14 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -4777,46 +4777,44 @@ STAGE PLANS: alias: srcpart filterExpr: (ds = '2008-04-08') (type: boolean) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: '2008-04-08' (type: string) - outputColumnNames: ds + Group By Operator + keys: '2008-04-08' (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: ds (type: string) - mode: hash - outputColumnNames: _col0 + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Reducer 3 Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: string) + keys: '2008-04-08' (type: string) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Map Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col0 (type: string) - 1 _col0 (type: string) - input vertices: - 0 Map 1 - Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE - HybridGraceHashJoin: true - Group By Operator - aggregations: count() - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: + Select Operator + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: string) + 1 '2008-04-08' (type: string) + input vertices: + 0 Map 1 + Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Group By Operator + aggregations: count() + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: bigint) + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) Reducer 4 Reduce Operator Tree: Group By Operator @@ -5167,8 +5165,8 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ds (type: string) - outputColumnNames: _col0 + expressions: ds (type: string), hr (type: string) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Map Join Operator condition map: @@ -5176,6 +5174,7 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) + outputColumnNames: _col1 input vertices: 1 Map 3 Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE @@ -5184,7 +5183,7 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 '11' (type: string) + 0 _col1 (type: string) 1 '11' (type: string) input vertices: 1 Map 4 @@ -5203,10 +5202,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -5311,10 +5310,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + filterExpr: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + predicate: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: ds (type: string) @@ -5329,10 +5328,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 42 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 21 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -5697,10 +5696,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and ((date = '2008-04-08') or (date = '2008-04-09'))) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: (((((date = '2008-04-08') or (date = '2008-04-09')) and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 108 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and ((date = '2008-04-08') or (date = '2008-04-09'))) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: (((((date = '2008-04-08') or (date = '2008-04-09')) and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 54 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) diff --git ql/src/test/results/clientpositive/tez/dynamic_partition_pruning_2.q.out ql/src/test/results/clientpositive/tez/dynamic_partition_pruning_2.q.out index 341a549..e129795 100644 --- ql/src/test/results/clientpositive/tez/dynamic_partition_pruning_2.q.out +++ ql/src/test/results/clientpositive/tez/dynamic_partition_pruning_2.q.out @@ -561,6 +561,7 @@ bar baz baz baz +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: EXPLAIN SELECT agg.amount FROM agg_01 agg, dim_shops d1 @@ -599,13 +600,12 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 1 (type: int) - 1 1 (type: int) + 0 + 1 outputColumnNames: _col0 input vertices: 1 Map 2 Statistics: Num rows: 3 Data size: 9 Basic stats: COMPLETE Column stats: NONE - HybridGraceHashJoin: true File Output Operator compressed: false Statistics: Num rows: 3 Data size: 9 Basic stats: COMPLETE Column stats: NONE @@ -625,9 +625,7 @@ STAGE PLANS: Select Operator Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 1 (type: int) - sort order: + - Map-reduce partition columns: 1 (type: int) + sort order: Statistics: Num rows: 1 Data size: 5 Basic stats: COMPLETE Column stats: NONE Stage: Stage-0 @@ -636,6 +634,7 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: SELECT agg.amount FROM agg_01 agg, dim_shops d1 diff --git ql/src/test/results/clientpositive/tez/explainuser_1.q.out ql/src/test/results/clientpositive/tez/explainuser_1.q.out index b39d2fc..5f64dfd 100644 --- ql/src/test/results/clientpositive/tez/explainuser_1.q.out +++ ql/src/test/results/clientpositive/tez/explainuser_1.q.out @@ -1575,17 +1575,17 @@ Stage-0 Stage-1 Reducer 2 File Output Operator [FS_12] - Select Operator [SEL_11] (rows=7 width=4) + Select Operator [SEL_11] (rows=6 width=4) Output:["_col0"] - Merge Join Operator [MERGEJOIN_17] (rows=7 width=4) + Merge Join Operator [MERGEJOIN_17] (rows=6 width=4) Conds:RS_8._col0=RS_9._col0(Left Semi),Output:["_col1"] <-Map 1 [SIMPLE_EDGE] SHUFFLE [RS_8] PartitionCols:_col0 - Select Operator [SEL_2] (rows=6 width=77) + Select Operator [SEL_2] (rows=5 width=74) Output:["_col0","_col1"] - Filter Operator [FIL_15] (rows=6 width=77) - predicate:((key is not null and ((c_int + 1) = 2)) and ((c_int > 0) or (c_float >= 0.0))) + Filter Operator [FIL_15] (rows=5 width=74) + predicate:((((c_int + 1) = 2) and ((c_int > 0) or (c_float >= 0.0))) and key is not null) TableScan [TS_0] (rows=20 width=83) default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE,Output:["key","c_int","c_float"] <-Map 3 [SIMPLE_EDGE] @@ -1801,27 +1801,35 @@ Stage-0 limit:-1 Stage-1 Reducer 3 - File Output Operator [FS_14] - Group By Operator [GBY_12] (rows=1 width=8) + File Output Operator [FS_15] + Group By Operator [GBY_13] (rows=1 width=8) Output:["_col0"],aggregations:["count(VALUE._col0)"] <-Reducer 2 [SIMPLE_EDGE] - SHUFFLE [RS_11] - Group By Operator [GBY_10] (rows=1 width=8) - Output:["_col0"],aggregations:["count(_col0)"] - Select Operator [SEL_9] (rows=400 width=0) - Output:["_col0"] - Merge Join Operator [MERGEJOIN_19] (rows=400 width=0) - Conds:RS_6.'2014'=RS_7.'2014'(Inner) - <-Map 1 [SIMPLE_EDGE] - SHUFFLE [RS_6] - PartitionCols:'2014' + SHUFFLE [RS_12] + Group By Operator [GBY_11] (rows=1 width=8) + Output:["_col0"],aggregations:["count('2014')"] + Merge Join Operator [MERGEJOIN_26] (rows=400 width=0) + Conds:RS_6._col0=RS_7._col0(Inner) + <-Map 1 [SIMPLE_EDGE] + SHUFFLE [RS_6] + PartitionCols:_col0 + Select Operator [SEL_2] (rows=20 width=184) + Output:["_col0"] TableScan [TS_0] (rows=20 width=13) default@cbo_t1,cbo_t1,Tbl:COMPLETE,Col:COMPLETE - <-Map 4 [SIMPLE_EDGE] - SHUFFLE [RS_7] - PartitionCols:'2014' + <-Map 4 [SIMPLE_EDGE] + SHUFFLE [RS_7] + PartitionCols:_col0 + Select Operator [SEL_5] (rows=20 width=184) + Output:["_col0"] TableScan [TS_3] (rows=20 width=13) default@cbo_t2,cbo_t2,Tbl:COMPLETE,Col:COMPLETE + Dynamic Partitioning Event Operator [EVENT_22] (rows=1 width=184) + Group By Operator [GBY_21] (rows=1 width=184) + Output:["_col0"],keys:_col0 + Select Operator [SEL_20] (rows=20 width=184) + Output:["_col0"] + Please refer to the previous Select Operator [SEL_5] PREHOOK: query: explain select * from src_cbo b @@ -1986,7 +1994,7 @@ Stage-0 Select Operator [SEL_2] (rows=166 width=178) Output:["_col0","_col1"] Filter Operator [FIL_15] (rows=166 width=178) - predicate:(key is not null and (value > 'val_9')) + predicate:((value > 'val_9') and key is not null) TableScan [TS_0] (rows=500 width=178) default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] <-Map 3 [SIMPLE_EDGE] @@ -2038,7 +2046,7 @@ Stage-0 Select Operator [SEL_2] (rows=166 width=178) Output:["_col0","_col1"] Filter Operator [FIL_15] (rows=166 width=178) - predicate:(key is not null and (value > 'val_9')) + predicate:((value > 'val_9') and key is not null) TableScan [TS_0] (rows=500 width=178) default@src_cbo,b,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] <-Map 3 [SIMPLE_EDGE] @@ -2133,7 +2141,7 @@ Stage-0 Select Operator [SEL_2] (rows=16 width=16) Output:["_col0","_col1","_col2","_col3"] Filter Operator [FIL_28] (rows=16 width=16) - predicate:((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) + predicate:(((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) TableScan [TS_0] (rows=100 width=16) default@lineitem,lineitem,Tbl:COMPLETE,Col:COMPLETE,Output:["l_orderkey","l_partkey","l_suppkey","l_linenumber"] <-Map 4 [SIMPLE_EDGE] @@ -2144,7 +2152,7 @@ Stage-0 Select Operator [SEL_5] (rows=14 width=4) Output:["_col0"] Filter Operator [FIL_29] (rows=14 width=96) - predicate:(((l_shipmode = 'AIR') and l_orderkey is not null) and (l_linenumber = 1)) + predicate:(((l_shipmode = 'AIR') and (l_linenumber = 1)) and l_orderkey is not null) TableScan [TS_3] (rows=100 width=96) default@lineitem,lineitem,Tbl:COMPLETE,Col:COMPLETE,Output:["l_orderkey","l_linenumber","l_shipmode"] <-Reducer 6 [SIMPLE_EDGE] @@ -4178,7 +4186,7 @@ Stage-0 <-Select Operator [SEL_2] (rows=666 width=178) Output:["_col0","_col1"] Filter Operator [FIL_22] (rows=666 width=178) - predicate:(key is not null and (value > 'val_450')) + predicate:((value > 'val_450') and key is not null) TableScan [TS_0] (rows=2000 width=178) default@srcpart,srcpart,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] <-Map 4 [SIMPLE_EDGE] @@ -4226,7 +4234,7 @@ Stage-0 <-Select Operator [SEL_2] (rows=666 width=178) Output:["_col0","_col1"] Filter Operator [FIL_22] (rows=666 width=178) - predicate:(key is not null and (value > 'val_450')) + predicate:((value > 'val_450') and key is not null) TableScan [TS_0] (rows=2000 width=178) default@srcpart,srcpart,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] <-Map 4 [SIMPLE_EDGE] @@ -4274,7 +4282,7 @@ Stage-0 <-Select Operator [SEL_2] (rows=666 width=178) Output:["_col0","_col1"] Filter Operator [FIL_22] (rows=666 width=178) - predicate:(key is not null and (value > 'val_450')) + predicate:((value > 'val_450') and key is not null) TableScan [TS_0] (rows=2000 width=178) default@srcpart,srcpart,Tbl:COMPLETE,Col:COMPLETE,Output:["key","value"] <-Map 4 [SIMPLE_EDGE] diff --git ql/src/test/results/clientpositive/tez/explainuser_4.q.out ql/src/test/results/clientpositive/tez/explainuser_4.q.out index 3a3e17d..661f95f 100644 --- ql/src/test/results/clientpositive/tez/explainuser_4.q.out +++ ql/src/test/results/clientpositive/tez/explainuser_4.q.out @@ -40,7 +40,7 @@ Stage-0 Select Operator [SEL_2] (rows=6144 width=215) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"] Filter Operator [FIL_15] (rows=6144 width=215) - predicate:(cint is not null and cint BETWEEN 1000000 AND 3000000) + predicate:cint BETWEEN 1000000 AND 3000000 TableScan [TS_0] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"] <-Map 4 [SIMPLE_EDGE] @@ -49,7 +49,7 @@ Stage-0 Select Operator [SEL_5] (rows=6144 width=215) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"] Filter Operator [FIL_16] (rows=6144 width=215) - predicate:((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) + predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is not null) TableScan [TS_3] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"] @@ -121,7 +121,7 @@ Stage-0 Select Operator [SEL_2] (rows=6144 width=215) Output:["_col0"] Filter Operator [FIL_17] (rows=6144 width=215) - predicate:(cint is not null and cint BETWEEN 1000000 AND 3000000) + predicate:cint BETWEEN 1000000 AND 3000000 TableScan [TS_0] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint"] <-Map 4 [SIMPLE_EDGE] @@ -130,7 +130,7 @@ Stage-0 Select Operator [SEL_5] (rows=6144 width=215) Output:["_col0"] Filter Operator [FIL_18] (rows=6144 width=215) - predicate:((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) + predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is not null) TableScan [TS_3] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"] @@ -201,7 +201,7 @@ Stage-0 Select Operator [SEL_2] (rows=6144 width=215) Output:["_col0","_col1"] Filter Operator [FIL_19] (rows=6144 width=215) - predicate:(cint is not null and cint BETWEEN 1000000 AND 3000000) + predicate:cint BETWEEN 1000000 AND 3000000 TableScan [TS_0] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["csmallint","cint"] <-Map 5 [SIMPLE_EDGE] @@ -210,7 +210,7 @@ Stage-0 Select Operator [SEL_5] (rows=6144 width=215) Output:["_col0"] Filter Operator [FIL_20] (rows=6144 width=215) - predicate:((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) + predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is not null) TableScan [TS_3] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"] @@ -281,7 +281,7 @@ Stage-0 Select Operator [SEL_5] (rows=6144 width=215) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"] Filter Operator [FIL_16] (rows=6144 width=215) - predicate:((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) + predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is not null) TableScan [TS_3] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"] <-Map 1 [CUSTOM_SIMPLE_EDGE] @@ -290,7 +290,7 @@ Stage-0 Select Operator [SEL_2] (rows=6144 width=215) Output:["_col0","_col1","_col2","_col3","_col4","_col5","_col6","_col7","_col8","_col9","_col10","_col11"] Filter Operator [FIL_15] (rows=6144 width=215) - predicate:(cint is not null and cint BETWEEN 1000000 AND 3000000) + predicate:cint BETWEEN 1000000 AND 3000000 TableScan [TS_0] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["ctinyint","csmallint","cint","cbigint","cfloat","cdouble","cstring1","cstring2","ctimestamp1","ctimestamp2","cboolean1","cboolean2"] @@ -362,7 +362,7 @@ Stage-0 Select Operator [SEL_5] (rows=6144 width=215) Output:["_col0"] Filter Operator [FIL_18] (rows=6144 width=215) - predicate:((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) + predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is not null) TableScan [TS_3] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"] <-Map 1 [CUSTOM_SIMPLE_EDGE] @@ -371,7 +371,7 @@ Stage-0 Select Operator [SEL_2] (rows=6144 width=215) Output:["_col0"] Filter Operator [FIL_17] (rows=6144 width=215) - predicate:(cint is not null and cint BETWEEN 1000000 AND 3000000) + predicate:cint BETWEEN 1000000 AND 3000000 TableScan [TS_0] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint"] @@ -442,7 +442,7 @@ Stage-0 Select Operator [SEL_5] (rows=6144 width=215) Output:["_col0"] Filter Operator [FIL_20] (rows=6144 width=215) - predicate:((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) + predicate:(cint BETWEEN 1000000 AND 3000000 and cbigint is not null) TableScan [TS_3] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["cint","cbigint"] <-Map 1 [CUSTOM_SIMPLE_EDGE] @@ -451,7 +451,7 @@ Stage-0 Select Operator [SEL_2] (rows=6144 width=215) Output:["_col0","_col1"] Filter Operator [FIL_19] (rows=6144 width=215) - predicate:(cint is not null and cint BETWEEN 1000000 AND 3000000) + predicate:cint BETWEEN 1000000 AND 3000000 TableScan [TS_0] (rows=12288 width=215) default@alltypesorc,a,Tbl:COMPLETE,Col:NONE,Output:["csmallint","cint"] diff --git ql/src/test/results/clientpositive/tez/filter_join_breaktask.q.out ql/src/test/results/clientpositive/tez/filter_join_breaktask.q.out index 3aba57d..83c4734 100644 --- ql/src/test/results/clientpositive/tez/filter_join_breaktask.q.out +++ ql/src/test/results/clientpositive/tez/filter_join_breaktask.q.out @@ -226,7 +226,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: ((key is not null and value is not null) and (value <> '')) (type: boolean) + predicate: ((value <> '') and key is not null) (type: boolean) Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -298,7 +298,7 @@ STAGE PLANS: GatherStats: false Filter Operator isSamplingPred: false - predicate: (value is not null and (value <> '')) (type: boolean) + predicate: (value <> '') (type: boolean) Statistics: Num rows: 25 Data size: 211 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: value (type: string) diff --git ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_1.q.out ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_1.q.out index 5ccee00..3a1b937 100644 --- ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_1.q.out +++ ql/src/test/results/clientpositive/tez/hybridgrace_hashjoin_1.q.out @@ -1244,6 +1244,7 @@ POSTHOOK: type: CREATETABLE_AS_SELECT POSTHOOK: Input: default@alltypesorc POSTHOOK: Output: database:default POSTHOOK: Output: default@decimal_mapjoin +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: EXPLAIN SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2 FROM decimal_mapjoin l JOIN decimal_mapjoin r ON l.cint = r.cint @@ -1282,8 +1283,8 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 6981 (type: int) - 1 6981 (type: int) + 0 + 1 outputColumnNames: _col0, _col2 input vertices: 1 Map 2 @@ -1313,9 +1314,7 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 6981 (type: int) - sort order: + - Map-reduce partition columns: 6981 (type: int) + sort order: Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: decimal(23,14)) Execution mode: vectorized @@ -1326,6 +1325,7 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2 FROM decimal_mapjoin l JOIN decimal_mapjoin r ON l.cint = r.cint @@ -1440,6 +1440,7 @@ POSTHOOK: Input: default@decimal_mapjoin 6981 6981 -515.6210729730 NULL 6981 6981 -515.6210729730 NULL 6981 6981 -515.6210729730 NULL +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: EXPLAIN SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2 FROM decimal_mapjoin l JOIN decimal_mapjoin r ON l.cint = r.cint @@ -1478,13 +1479,12 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 6981 (type: int) - 1 6981 (type: int) + 0 + 1 outputColumnNames: _col0, _col2 input vertices: 1 Map 2 Statistics: Num rows: 6758 Data size: 1190783 Basic stats: COMPLETE Column stats: NONE - HybridGraceHashJoin: true Select Operator expressions: 6981 (type: int), 6981 (type: int), _col0 (type: decimal(20,10)), _col2 (type: decimal(23,14)) outputColumnNames: _col0, _col1, _col2, _col3 @@ -1510,9 +1510,7 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: 6981 (type: int) - sort order: + - Map-reduce partition columns: 6981 (type: int) + sort order: Statistics: Num rows: 6144 Data size: 1082530 Basic stats: COMPLETE Column stats: NONE value expressions: _col0 (type: decimal(23,14)) Execution mode: vectorized @@ -1523,6 +1521,7 @@ STAGE PLANS: Processor Tree: ListSink +Warning: Map Join MAPJOIN[14][bigTable=?] in task 'Map 1' is a cross product PREHOOK: query: SELECT l.cint, r.cint, l.cdecimal1, r.cdecimal2 FROM decimal_mapjoin l JOIN decimal_mapjoin r ON l.cint = r.cint diff --git ql/src/test/results/clientpositive/tez/mapjoin_mapjoin.q.out ql/src/test/results/clientpositive/tez/mapjoin_mapjoin.q.out index 4aebb1f..62fe941 100644 --- ql/src/test/results/clientpositive/tez/mapjoin_mapjoin.q.out +++ ql/src/test/results/clientpositive/tez/mapjoin_mapjoin.q.out @@ -491,7 +491,7 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 2000 Data size: 21248 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (value > 'val_450')) (type: boolean) + predicate: ((value > 'val_450') and key is not null) (type: boolean) Statistics: Num rows: 666 Data size: 7075 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/tez/subquery_exists.q.out ql/src/test/results/clientpositive/tez/subquery_exists.q.out index 1c1a885..b8b399b 100644 --- ql/src/test/results/clientpositive/tez/subquery_exists.q.out +++ ql/src/test/results/clientpositive/tez/subquery_exists.q.out @@ -41,7 +41,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (value > 'val_9')) (type: boolean) + predicate: ((value > 'val_9') and key is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) diff --git ql/src/test/results/clientpositive/tez/subquery_in.q.out ql/src/test/results/clientpositive/tez/subquery_in.q.out index 7cd4113..523430b 100644 --- ql/src/test/results/clientpositive/tez/subquery_in.q.out +++ ql/src/test/results/clientpositive/tez/subquery_in.q.out @@ -150,7 +150,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > '9')) (type: boolean) + predicate: ((key > '9') and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -633,7 +633,7 @@ STAGE PLANS: alias: b Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > '9')) (type: boolean) + predicate: ((key > '9') and value is not null) (type: boolean) Statistics: Num rows: 166 Data size: 1763 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: string), value (type: string) @@ -790,7 +790,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int) diff --git ql/src/test/results/clientpositive/tez/tez_dynpart_hashjoin_1.q.out ql/src/test/results/clientpositive/tez/tez_dynpart_hashjoin_1.q.out index 1304e7d..e3168c3 100644 --- ql/src/test/results/clientpositive/tez/tez_dynpart_hashjoin_1.q.out +++ ql/src/test/results/clientpositive/tez/tez_dynpart_hashjoin_1.q.out @@ -34,7 +34,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -52,7 +52,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -160,7 +160,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -177,7 +177,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -282,7 +282,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cint (type: int) @@ -300,7 +300,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -428,7 +428,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -446,7 +446,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -557,7 +557,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -574,7 +574,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -682,7 +682,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cint (type: int) @@ -700,7 +700,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) diff --git ql/src/test/results/clientpositive/tez/tez_self_join.q.out ql/src/test/results/clientpositive/tez/tez_self_join.q.out index 8228453..f5375b2 100644 --- ql/src/test/results/clientpositive/tez/tez_self_join.q.out +++ ql/src/test/results/clientpositive/tez/tez_self_join.q.out @@ -83,7 +83,7 @@ STAGE PLANS: alias: self1 Statistics: Num rows: 3 Data size: 21 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (id1 is not null and (id2 = 'ab')) (type: boolean) + predicate: ((id2 = 'ab') and id1 is not null) (type: boolean) Statistics: Num rows: 1 Data size: 7 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: id1 (type: int), id3 (type: string) diff --git ql/src/test/results/clientpositive/tez/tez_vector_dynpart_hashjoin_1.q.out ql/src/test/results/clientpositive/tez/tez_vector_dynpart_hashjoin_1.q.out index bf8cf22..7abc24e 100644 --- ql/src/test/results/clientpositive/tez/tez_vector_dynpart_hashjoin_1.q.out +++ ql/src/test/results/clientpositive/tez/tez_vector_dynpart_hashjoin_1.q.out @@ -34,7 +34,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -52,7 +52,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -160,7 +160,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -177,7 +177,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -282,7 +282,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cint (type: int) @@ -300,7 +300,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -428,7 +428,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -447,7 +447,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ctinyint (type: tinyint), csmallint (type: smallint), cint (type: int), cbigint (type: bigint), cfloat (type: float), cdouble (type: double), cstring1 (type: string), cstring2 (type: string), ctimestamp1 (type: timestamp), ctimestamp2 (type: timestamp), cboolean1 (type: boolean), cboolean2 (type: boolean) @@ -561,7 +561,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -579,7 +579,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) @@ -690,7 +690,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cint is not null and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: cint BETWEEN 1000000 AND 3000000 (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: csmallint (type: smallint), cint (type: int) @@ -709,7 +709,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((cint is not null and cbigint is not null) and cint BETWEEN 1000000 AND 3000000) (type: boolean) + predicate: (cint BETWEEN 1000000 AND 3000000 and cbigint is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cint (type: int) diff --git ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out index 92cca66..54bad12 100644 --- ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out +++ ql/src/test/results/clientpositive/tez/vector_decimal_udf.q.out @@ -1239,7 +1239,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (key <> 0)) (type: boolean) + predicate: (key <> 0) (type: boolean) Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (key / key) (type: decimal(38,24)) @@ -1321,7 +1321,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (value <> 0)) (type: boolean) + predicate: (value <> 0) (type: boolean) Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (key / CAST( value AS decimal(10,0))) (type: decimal(31,21)) @@ -1393,7 +1393,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (value <> 0)) (type: boolean) + predicate: (value <> 0) (type: boolean) Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (UDFToDouble(key) / (UDFToDouble(value) / 2.0)) (type: double) diff --git ql/src/test/results/clientpositive/tez/vector_if_expr.q.out ql/src/test/results/clientpositive/tez/vector_if_expr.q.out index e76d782..475bc37 100644 --- ql/src/test/results/clientpositive/tez/vector_if_expr.q.out +++ ql/src/test/results/clientpositive/tez/vector_if_expr.q.out @@ -21,7 +21,7 @@ STAGE PLANS: alias: alltypesorc Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cboolean1 is not null and cboolean1) (type: boolean) + predicate: (cboolean1 and cboolean1 is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cboolean1 (type: boolean), if(cboolean1, 'first', 'second') (type: string) diff --git ql/src/test/results/clientpositive/tez/vector_leftsemi_mapjoin.q.out ql/src/test/results/clientpositive/tez/vector_leftsemi_mapjoin.q.out index aa1146e..59499c7 100644 --- ql/src/test/results/clientpositive/tez/vector_leftsemi_mapjoin.q.out +++ ql/src/test/results/clientpositive/tez/vector_leftsemi_mapjoin.q.out @@ -2316,7 +2316,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -4584,7 +4584,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -6902,7 +6902,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -9237,7 +9237,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -11557,7 +11557,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -13892,7 +13892,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) diff --git ql/src/test/results/clientpositive/tez/vector_mapjoin_reduce.q.out ql/src/test/results/clientpositive/tez/vector_mapjoin_reduce.q.out index 9a1cd93..dd2c208 100644 --- ql/src/test/results/clientpositive/tez/vector_mapjoin_reduce.q.out +++ ql/src/test/results/clientpositive/tez/vector_mapjoin_reduce.q.out @@ -40,7 +40,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int) @@ -196,7 +196,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int), 1 (type: int) @@ -241,7 +241,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((l_shipmode = 'AIR') and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_shipmode = 'AIR') and (l_linenumber = 1)) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int) diff --git ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out index 57afbbd..483b7bc 100644 --- ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out +++ ql/src/test/results/clientpositive/tez/vectorization_short_regress.q.out @@ -2689,7 +2689,7 @@ STAGE PLANS: alias: alltypesorc Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cboolean1 is not null and (((cdouble < UDFToDouble(csmallint)) and (cboolean2 = cboolean1) and (UDFToDouble(cbigint) <= -863.257)) or ((cint >= -257) and cstring1 is not null and (cboolean1 >= 1)) or cstring2 regexp 'b' or ((csmallint >= UDFToShort(ctinyint)) and ctimestamp2 is null))) (type: boolean) + predicate: ((((cdouble < UDFToDouble(csmallint)) and (cboolean2 = cboolean1) and (UDFToDouble(cbigint) <= -863.257)) or ((cint >= -257) and cstring1 is not null and (cboolean1 >= 1)) or cstring2 regexp 'b' or ((csmallint >= UDFToShort(ctinyint)) and ctimestamp2 is null)) and cboolean1 is not null) (type: boolean) Statistics: Num rows: 10239 Data size: 2201421 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) diff --git ql/src/test/results/clientpositive/tez/vectorized_case.q.out ql/src/test/results/clientpositive/tez/vectorized_case.q.out index f576cd5..28b7f9b 100644 --- ql/src/test/results/clientpositive/tez/vectorized_case.q.out +++ ql/src/test/results/clientpositive/tez/vectorized_case.q.out @@ -52,7 +52,7 @@ STAGE PLANS: predicate: ((csmallint = 418) or (csmallint = 12205) or (csmallint = 10583)) (type: boolean) Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string), CASE (csmallint) WHEN (418) THEN ('a') WHEN (12205) THEN ('b') ELSE ('c') END (type: string) + expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -166,7 +166,7 @@ STAGE PLANS: predicate: ((csmallint = 418) or (csmallint = 12205) or (csmallint = 10583)) (type: boolean) Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE (null) END (type: string), CASE (csmallint) WHEN (418) THEN ('a') WHEN (12205) THEN (null) ELSE ('c') END (type: string) + expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE (null) END (type: string), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN (null) ELSE ('c') END (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out index f29b4d4..9351096 100644 --- ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out +++ ql/src/test/results/clientpositive/tez/vectorized_dynamic_partition_pruning.q.out @@ -224,10 +224,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -349,10 +349,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -477,10 +477,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -511,10 +511,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 344 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -659,10 +659,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -678,10 +678,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 344 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -819,10 +819,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 1440 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 360 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -959,10 +959,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 1440 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 360 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -1082,10 +1082,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -1207,10 +1207,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -1328,10 +1328,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1453,10 +1453,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1578,10 +1578,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1688,10 +1688,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1811,10 +1811,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -1954,20 +1954,16 @@ STAGE PLANS: alias: srcpart filterExpr: (ds = '2008-04-08') (type: boolean) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: '2008-04-08' (type: string) - outputColumnNames: ds + Group By Operator + keys: '2008-04-08' (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: ds (type: string) - mode: hash - outputColumnNames: _col0 + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Reducer 2 Reduce Operator Tree: Merge Join Operator @@ -1975,7 +1971,7 @@ STAGE PLANS: Inner Join 0 to 1 keys: 0 _col0 (type: string) - 1 _col0 (type: string) + 1 '2008-04-08' (type: string) Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count() @@ -2005,30 +2001,32 @@ STAGE PLANS: Execution mode: vectorized Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: string) + keys: '2008-04-08' (type: string) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: _col0 (type: string) - outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: _col0 (type: string) - mode: hash + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '2008-04-08' (type: string) outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Dynamic Partitioning Event Operator - Target column: ds (string) - Target Input: srcpart - Partition key expr: ds + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Target Vertex: Map 1 + Dynamic Partitioning Event Operator + Target column: ds (string) + Target Input: srcpart + Partition key expr: ds + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Stage: Stage-0 Fetch Operator @@ -2672,22 +2670,23 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ds (type: string) - outputColumnNames: _col0 + expressions: ds (type: string), hr (type: string) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE + value expressions: _col1 (type: string) Map 5 Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -2730,6 +2729,21 @@ STAGE PLANS: sort order: + Map-reduce partition columns: '11' (type: string) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '11' (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Dynamic Partitioning Event Operator + Target column: hr (string) + Target Input: srcpart + Partition key expr: hr + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Execution mode: vectorized Reducer 2 Reduce Operator Tree: @@ -2739,11 +2753,12 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) + outputColumnNames: _col1 Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator - key expressions: '11' (type: string) + key expressions: _col1 (type: string) sort order: + - Map-reduce partition columns: '11' (type: string) + Map-reduce partition columns: _col1 (type: string) Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE Reducer 3 Reduce Operator Tree: @@ -2751,7 +2766,7 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 '11' (type: string) + 0 _col1 (type: string) 1 '11' (type: string) Statistics: Num rows: 1210 Data size: 12854 Basic stats: COMPLETE Column stats: NONE Group By Operator @@ -2828,10 +2843,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + filterExpr: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + predicate: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: ds (type: string) @@ -2847,10 +2862,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3671,10 +3686,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3819,10 +3834,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -3853,10 +3868,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 344 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: string) @@ -3990,10 +4005,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 1440 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and (date = '2008-04-08')) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((((date = '2008-04-08') and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 360 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) @@ -4139,10 +4154,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + filterExpr: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = 'I DONT EXIST')) (type: boolean) + predicate: ((date = 'I DONT EXIST') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4249,10 +4264,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -4370,10 +4385,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_double_hour - filterExpr: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 188 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (hr is not null and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: ((UDFToDouble(hour) = 11.0) and hr is not null) (type: boolean) Statistics: Num rows: 1 Data size: 94 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: hr (type: double) @@ -4494,47 +4509,45 @@ STAGE PLANS: alias: srcpart filterExpr: (ds = '2008-04-08') (type: boolean) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Select Operator - expressions: '2008-04-08' (type: string) - outputColumnNames: ds + Group By Operator + keys: '2008-04-08' (type: string) + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Group By Operator - keys: ds (type: string) - mode: hash - outputColumnNames: _col0 + Reduce Output Operator + key expressions: '2008-04-08' (type: string) + sort order: + + Map-reduce partition columns: '2008-04-08' (type: string) Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - key expressions: _col0 (type: string) - sort order: + - Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Reducer 3 Execution mode: vectorized Reduce Operator Tree: Group By Operator - keys: KEY._col0 (type: string) + keys: '2008-04-08' (type: string) mode: mergepartial outputColumnNames: _col0 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE - Map Join Operator - condition map: - Inner Join 0 to 1 - keys: - 0 _col0 (type: string) - 1 _col0 (type: string) - input vertices: - 0 Map 1 - Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE - HybridGraceHashJoin: true - Group By Operator - aggregations: count() - mode: hash - outputColumnNames: _col0 - Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - Reduce Output Operator - sort order: + Select Operator + Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: NONE + Map Join Operator + condition map: + Inner Join 0 to 1 + keys: + 0 _col0 (type: string) + 1 '2008-04-08' (type: string) + input vertices: + 0 Map 1 + Statistics: Num rows: 2200 Data size: 23372 Basic stats: COMPLETE Column stats: NONE + HybridGraceHashJoin: true + Group By Operator + aggregations: count() + mode: hash + outputColumnNames: _col0 Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE - value expressions: _col0 (type: bigint) + Reduce Output Operator + sort order: + Statistics: Num rows: 1 Data size: 8 Basic stats: COMPLETE Column stats: NONE + value expressions: _col0 (type: bigint) Reducer 4 Execution mode: vectorized Reduce Operator Tree: @@ -4892,8 +4905,8 @@ STAGE PLANS: alias: srcpart Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: ds (type: string) - outputColumnNames: _col0 + expressions: ds (type: string), hr (type: string) + outputColumnNames: _col0, _col1 Statistics: Num rows: 1000 Data size: 10624 Basic stats: COMPLETE Column stats: NONE Map Join Operator condition map: @@ -4901,6 +4914,7 @@ STAGE PLANS: keys: 0 _col0 (type: string) 1 _col0 (type: string) + outputColumnNames: _col1 input vertices: 1 Map 3 Statistics: Num rows: 1100 Data size: 11686 Basic stats: COMPLETE Column stats: NONE @@ -4909,7 +4923,7 @@ STAGE PLANS: condition map: Inner Join 0 to 1 keys: - 0 '11' (type: string) + 0 _col1 (type: string) 1 '11' (type: string) input vertices: 1 Map 4 @@ -4928,10 +4942,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -4974,6 +4988,21 @@ STAGE PLANS: sort order: + Map-reduce partition columns: '11' (type: string) Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Select Operator + expressions: '11' (type: string) + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Group By Operator + keys: _col0 (type: string) + mode: hash + outputColumnNames: _col0 + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Dynamic Partitioning Event Operator + Target column: hr (string) + Target Input: srcpart + Partition key expr: hr + Statistics: Num rows: 1 Data size: 172 Basic stats: COMPLETE Column stats: NONE + Target Vertex: Map 1 Execution mode: vectorized Reducer 2 Execution mode: vectorized @@ -5039,10 +5068,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart - filterExpr: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + filterExpr: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Filter Operator - predicate: (ds is not null and (UDFToDouble(hr) = 13.0)) (type: boolean) + predicate: ((UDFToDouble(hr) = 13.0) and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE Select Operator expressions: ds (type: string) @@ -5058,10 +5087,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date - filterExpr: (ds is not null and (date = '2008-04-08')) (type: boolean) + filterExpr: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 2 Data size: 376 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (ds is not null and (date = '2008-04-08')) (type: boolean) + predicate: ((date = '2008-04-08') and ds is not null) (type: boolean) Statistics: Num rows: 1 Data size: 188 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string) @@ -5432,10 +5461,10 @@ STAGE PLANS: Map Operator Tree: TableScan alias: srcpart_date_hour - filterExpr: (((ds is not null and hr is not null) and ((date = '2008-04-08') or (date = '2008-04-09'))) and (UDFToDouble(hour) = 11.0)) (type: boolean) + filterExpr: (((((date = '2008-04-08') or (date = '2008-04-09')) and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 4 Data size: 1440 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((ds is not null and hr is not null) and ((date = '2008-04-08') or (date = '2008-04-09'))) and (UDFToDouble(hour) = 11.0)) (type: boolean) + predicate: (((((date = '2008-04-08') or (date = '2008-04-09')) and (UDFToDouble(hour) = 11.0)) and ds is not null) and hr is not null) (type: boolean) Statistics: Num rows: 2 Data size: 720 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: ds (type: string), hr (type: string) diff --git ql/src/test/results/clientpositive/udf_case_column_pruning.q.out ql/src/test/results/clientpositive/udf_case_column_pruning.q.out index af8531d..6629e29 100644 --- ql/src/test/results/clientpositive/udf_case_column_pruning.q.out +++ ql/src/test/results/clientpositive/udf_case_column_pruning.q.out @@ -67,7 +67,7 @@ STAGE PLANS: outputColumnNames: _col0 Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: CASE (_col0) WHEN ('1') THEN (2) WHEN ('3') THEN (4) ELSE (5) END (type: int) + expressions: CASE WHEN ((_col0 = '1')) THEN (2) WHEN ((_col0 = '3')) THEN (4) ELSE (5) END (type: int) outputColumnNames: _col0 Statistics: Num rows: 550 Data size: 5843 Basic stats: COMPLETE Column stats: NONE File Output Operator diff --git ql/src/test/results/clientpositive/union_remove_19.q.out ql/src/test/results/clientpositive/union_remove_19.q.out index bc00e16..ffcc0cb 100644 --- ql/src/test/results/clientpositive/union_remove_19.q.out +++ ql/src/test/results/clientpositive/union_remove_19.q.out @@ -259,25 +259,25 @@ STAGE PLANS: Map Operator Tree: TableScan alias: inputtbl1 - Statistics: Num rows: 10 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 30 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (UDFToDouble(key) = 7.0) (type: boolean) - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: '7' (type: string) outputColumnNames: _col0 - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count(1) keys: _col0 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint) Reduce Operator Tree: Group By Operator @@ -285,10 +285,10 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 7 Data size: 7 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 7 Data size: 7 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat @@ -310,25 +310,25 @@ STAGE PLANS: Map Operator Tree: TableScan alias: inputtbl1 - Statistics: Num rows: 10 Data size: 30 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 30 Data size: 30 Basic stats: COMPLETE Column stats: NONE Filter Operator predicate: (UDFToDouble(key) = 7.0) (type: boolean) - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: '7' (type: string) outputColumnNames: _col0 - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Group By Operator aggregations: count(1) keys: _col0 (type: string) mode: hash outputColumnNames: _col0, _col1 - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE Reduce Output Operator key expressions: _col0 (type: string) sort order: + Map-reduce partition columns: _col0 (type: string) - Statistics: Num rows: 5 Data size: 15 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 15 Data size: 15 Basic stats: COMPLETE Column stats: NONE value expressions: _col1 (type: bigint) Reduce Operator Tree: Group By Operator @@ -336,10 +336,10 @@ STAGE PLANS: keys: KEY._col0 (type: string) mode: mergepartial outputColumnNames: _col0, _col1 - Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 7 Data size: 7 Basic stats: COMPLETE Column stats: NONE File Output Operator compressed: false - Statistics: Num rows: 2 Data size: 6 Basic stats: COMPLETE Column stats: NONE + Statistics: Num rows: 7 Data size: 7 Basic stats: COMPLETE Column stats: NONE table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat diff --git ql/src/test/results/clientpositive/vector_decimal_udf.q.out ql/src/test/results/clientpositive/vector_decimal_udf.q.out index a64589c..9dea502 100644 --- ql/src/test/results/clientpositive/vector_decimal_udf.q.out +++ ql/src/test/results/clientpositive/vector_decimal_udf.q.out @@ -1191,7 +1191,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (key is not null and (key <> 0)) (type: boolean) + predicate: (key <> 0) (type: boolean) Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (key / key) (type: decimal(38,24)) @@ -1270,7 +1270,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (value <> 0)) (type: boolean) + predicate: (value <> 0) (type: boolean) Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (key / CAST( value AS decimal(10,0))) (type: decimal(31,21)) @@ -1339,7 +1339,7 @@ STAGE PLANS: alias: decimal_udf Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (value <> 0)) (type: boolean) + predicate: (value <> 0) (type: boolean) Statistics: Num rows: 38 Data size: 4296 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: (UDFToDouble(key) / (UDFToDouble(value) / 2.0)) (type: double) diff --git ql/src/test/results/clientpositive/vector_if_expr.q.out ql/src/test/results/clientpositive/vector_if_expr.q.out index 62ce76e..0a82be9 100644 --- ql/src/test/results/clientpositive/vector_if_expr.q.out +++ ql/src/test/results/clientpositive/vector_if_expr.q.out @@ -16,7 +16,7 @@ STAGE PLANS: alias: alltypesorc Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cboolean1 is not null and cboolean1) (type: boolean) + predicate: (cboolean1 and cboolean1 is not null) (type: boolean) Statistics: Num rows: 6144 Data size: 1320982 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: cboolean1 (type: boolean), if(cboolean1, 'first', 'second') (type: string) diff --git ql/src/test/results/clientpositive/vector_leftsemi_mapjoin.q.out ql/src/test/results/clientpositive/vector_leftsemi_mapjoin.q.out index f515a3c..b019822 100644 --- ql/src/test/results/clientpositive/vector_leftsemi_mapjoin.q.out +++ ql/src/test/results/clientpositive/vector_leftsemi_mapjoin.q.out @@ -2320,7 +2320,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -4554,7 +4554,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -6805,7 +6805,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -9057,7 +9057,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -11309,7 +11309,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) @@ -13561,7 +13561,7 @@ STAGE PLANS: alias: a Statistics: Num rows: 22 Data size: 2046 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (value is not null and (key > 100)) (type: boolean) + predicate: ((key > 100) and value is not null) (type: boolean) Statistics: Num rows: 7 Data size: 651 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: key (type: int), value (type: string) diff --git ql/src/test/results/clientpositive/vector_mapjoin_reduce.q.out ql/src/test/results/clientpositive/vector_mapjoin_reduce.q.out index 506ee94..a074f97 100644 --- ql/src/test/results/clientpositive/vector_mapjoin_reduce.q.out +++ ql/src/test/results/clientpositive/vector_mapjoin_reduce.q.out @@ -222,7 +222,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int) @@ -466,7 +466,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (((l_shipmode = 'AIR') and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_shipmode = 'AIR') and (l_linenumber = 1)) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 25 Data size: 2999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int) @@ -489,7 +489,7 @@ STAGE PLANS: alias: lineitem Statistics: Num rows: 100 Data size: 11999 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: ((l_partkey is not null and l_orderkey is not null) and (l_linenumber = 1)) (type: boolean) + predicate: (((l_linenumber = 1) and l_partkey is not null) and l_orderkey is not null) (type: boolean) Statistics: Num rows: 50 Data size: 5999 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: l_orderkey (type: int), l_partkey (type: int), l_suppkey (type: int), 1 (type: int) diff --git ql/src/test/results/clientpositive/vectorization_short_regress.q.out ql/src/test/results/clientpositive/vectorization_short_regress.q.out index 98a9b4f..155e4d3 100644 --- ql/src/test/results/clientpositive/vectorization_short_regress.q.out +++ ql/src/test/results/clientpositive/vectorization_short_regress.q.out @@ -2630,7 +2630,7 @@ STAGE PLANS: alias: alltypesorc Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Filter Operator - predicate: (cboolean1 is not null and (((cdouble < UDFToDouble(csmallint)) and (cboolean2 = cboolean1) and (UDFToDouble(cbigint) <= -863.257)) or ((cint >= -257) and cstring1 is not null and (cboolean1 >= 1)) or cstring2 regexp 'b' or ((csmallint >= UDFToShort(ctinyint)) and ctimestamp2 is null))) (type: boolean) + predicate: ((((cdouble < UDFToDouble(csmallint)) and (cboolean2 = cboolean1) and (UDFToDouble(cbigint) <= -863.257)) or ((cint >= -257) and cstring1 is not null and (cboolean1 >= 1)) or cstring2 regexp 'b' or ((csmallint >= UDFToShort(ctinyint)) and ctimestamp2 is null)) and cboolean1 is not null) (type: boolean) Statistics: Num rows: 10239 Data size: 2201421 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) diff --git ql/src/test/results/clientpositive/vectorized_case.q.out ql/src/test/results/clientpositive/vectorized_case.q.out index d56b270..08c1412 100644 --- ql/src/test/results/clientpositive/vectorized_case.q.out +++ ql/src/test/results/clientpositive/vectorized_case.q.out @@ -49,7 +49,7 @@ STAGE PLANS: predicate: ((csmallint = 418) or (csmallint = 12205) or (csmallint = 10583)) (type: boolean) Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string), CASE (csmallint) WHEN (418) THEN ('a') WHEN (12205) THEN ('b') ELSE ('c') END (type: string) + expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE ('c') END (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE File Output Operator @@ -160,7 +160,7 @@ STAGE PLANS: predicate: ((csmallint = 418) or (csmallint = 12205) or (csmallint = 10583)) (type: boolean) Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE Select Operator - expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE (null) END (type: string), CASE (csmallint) WHEN (418) THEN ('a') WHEN (12205) THEN (null) ELSE ('c') END (type: string) + expressions: csmallint (type: smallint), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN ('b') ELSE (null) END (type: string), CASE WHEN ((csmallint = 418)) THEN ('a') WHEN ((csmallint = 12205)) THEN (null) ELSE ('c') END (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 12288 Data size: 2641964 Basic stats: COMPLETE Column stats: NONE File Output Operator