diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java index dad2ba0bae6f87..526798b4ee6ba7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Rewriter.java @@ -127,7 +127,6 @@ import org.apache.doris.nereids.rules.rewrite.PullUpProjectUnderLimit; import org.apache.doris.nereids.rules.rewrite.PullUpProjectUnderTopN; import org.apache.doris.nereids.rules.rewrite.PushCountIntoUnionAll; -import org.apache.doris.nereids.rules.rewrite.PushDownAggThroughJoin; import org.apache.doris.nereids.rules.rewrite.PushDownAggThroughJoinOnPkFk; import org.apache.doris.nereids.rules.rewrite.PushDownAggThroughJoinOneSide; import org.apache.doris.nereids.rules.rewrite.PushDownAggWithDistinctThroughJoinOneSide; @@ -174,6 +173,7 @@ import org.apache.doris.nereids.rules.rewrite.batch.ApplyToJoin; import org.apache.doris.nereids.rules.rewrite.batch.CorrelateApplyToUnCorrelateApply; import org.apache.doris.nereids.rules.rewrite.batch.EliminateUselessPlanUnderApply; +import org.apache.doris.nereids.rules.rewrite.eageraggregation.PushDownAggregation; import org.apache.doris.nereids.trees.plans.algebra.SetOperation; import org.apache.doris.nereids.trees.plans.logical.LogicalAggregate; import org.apache.doris.nereids.trees.plans.logical.LogicalApply; @@ -658,19 +658,6 @@ public class Rewriter extends AbstractBatchJobExecutor { new MergeAggregate() ) ), - topic("Eager aggregation", - cascadesContext -> cascadesContext.rewritePlanContainsTypes( - LogicalAggregate.class, LogicalJoin.class - ), - costBased(topDown( - new PushDownAggWithDistinctThroughJoinOneSide(), - new PushDownAggThroughJoinOneSide(), - new PushDownAggThroughJoin() - )), - costBased(custom(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN, PushDownDistinctThroughJoin::new)), - topDown(new PushCountIntoUnionAll()) - ), - // this rule should invoke after infer predicate and push down distinct, and before push down limit topic("eliminate join according unique or foreign key", cascadesContext -> cascadesContext.rewritePlanContainsTypes(LogicalJoin.class), @@ -687,7 +674,19 @@ public class Rewriter extends AbstractBatchJobExecutor { topDown(new PushDownAggThroughJoinOnPkFk()), topDown(new PullUpJoinFromUnionAll()) ), + topic("Eager aggregation", + cascadesContext -> cascadesContext.rewritePlanContainsTypes( + LogicalAggregate.class, LogicalJoin.class + ), + costBased(topDown( + new PushDownAggWithDistinctThroughJoinOneSide(), + new PushDownAggThroughJoinOneSide() + )), + costBased(custom(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN, PushDownDistinctThroughJoin::new)), + custom(RuleType.PUSH_DOWN_AGG_THROUGH_JOIN, PushDownAggregation::new), + topDown(new PushCountIntoUnionAll()) + ), topic("Limit optimization", cascadesContext -> cascadesContext.rewritePlanContainsTypes(LogicalLimit.class) || cascadesContext.rewritePlanContainsTypes(LogicalTopN.class) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeAggregate.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeAggregate.java index 3afb42013a5f25..4fd62039312fca 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeAggregate.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/NormalizeAggregate.java @@ -130,35 +130,34 @@ public List buildRules() { .toRule(RuleType.NORMALIZE_AGGREGATE)); } + /** + * The LogicalAggregate node may contain window agg functions and usual agg functions + * we call window agg functions as window-agg and usual agg functions as trivial-agg for short + * This rule simplify LogicalAggregate node by: + * 1. Push down some exprs from old LogicalAggregate node to a new child LogicalProject Node, + * 2. create a new LogicalAggregate with normalized group by exprs and trivial-aggs + * 3. Pull up normalized old LogicalAggregate's output exprs to a new parent LogicalProject Node + * Push down exprs: + * 1. all group by exprs + * 2. child contains subquery expr in trivial-agg + * 3. child contains window expr in trivial-agg + * 4. all input slots of trivial-agg + * 5. expr(including subquery) in distinct trivial-agg + * Normalize LogicalAggregate's output. + * 1. normalize group by exprs by outputs of bottom LogicalProject + * 2. normalize trivial-aggs by outputs of bottom LogicalProject + * 3. build normalized agg outputs + * Pull up exprs: + * normalize all output exprs in old LogicalAggregate to build a parent project node, typically includes: + * 1. simple slots + * 2. aliases + * a. alias with no aggs child + * b. alias with trivial-agg child + * c. alias with window-agg + */ @SuppressWarnings("checkstyle:UnusedLocalVariable") - private LogicalPlan normalizeAgg(LogicalAggregate aggregate, Optional> having, + public LogicalPlan normalizeAgg(LogicalAggregate aggregate, Optional> having, CascadesContext ctx) { - // The LogicalAggregate node may contain window agg functions and usual agg functions - // we call window agg functions as window-agg and usual agg functions as trivial-agg for short - // This rule simplify LogicalAggregate node by: - // 1. Push down some exprs from old LogicalAggregate node to a new child LogicalProject Node, - // 2. create a new LogicalAggregate with normalized group by exprs and trivial-aggs - // 3. Pull up normalized old LogicalAggregate's output exprs to a new parent LogicalProject Node - // Push down exprs: - // 1. all group by exprs - // 2. child contains subquery expr in trivial-agg - // 3. child contains window expr in trivial-agg - // 4. all input slots of trivial-agg - // 5. expr(including subquery) in distinct trivial-agg - // Normalize LogicalAggregate's output. - // 1. normalize group by exprs by outputs of bottom LogicalProject - // 2. normalize trivial-aggs by outputs of bottom LogicalProject - // 3. build normalized agg outputs - // Pull up exprs: - // normalize all output exprs in old LogicalAggregate to build a parent project node, typically includes: - // 1. simple slots - // 2. aliases - // a. alias with no aggs child - // b. alias with trivial-agg child - // c. alias with window-agg - - // Push down exprs: - // collect group by exprs Set groupingByExprs = Utils.fastToImmutableSet(aggregate.getGroupByExpressions()); // collect all trivial-agg diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AdjustNullable.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AdjustNullable.java index 8592d3f22a0294..c8016a493c678d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AdjustNullable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/AdjustNullable.java @@ -17,8 +17,6 @@ package org.apache.doris.nereids.rules.rewrite; -import org.apache.doris.common.util.DebugUtil; -import org.apache.doris.nereids.exceptions.AnalysisException; import org.apache.doris.nereids.jobs.JobContext; import org.apache.doris.nereids.properties.OrderKey; import org.apache.doris.nereids.trees.expressions.Alias; @@ -52,6 +50,7 @@ import org.apache.doris.nereids.trees.plans.visitor.DefaultPlanRewriter; import org.apache.doris.nereids.util.ExpressionUtils; import org.apache.doris.qe.ConnectContext; +import org.apache.doris.qe.SessionVariable; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; @@ -485,14 +484,9 @@ private static Expression doUpdateExpression(AtomicBoolean changed, Expression i // repeat may check fail. if (!slotReference.nullable() && newSlotReference.nullable() && check && ConnectContext.get() != null) { - if (ConnectContext.get().getSessionVariable().feDebug) { - throw new AnalysisException("AdjustNullable convert slot " + slotReference - + " from not-nullable to nullable. You can disable check by set fe_debug = false."); - } else { - LOG.warn("adjust nullable convert slot '" + slotReference - + "' from not-nullable to nullable for query " - + DebugUtil.printId(ConnectContext.get().queryId())); - } + SessionVariable.throwAnalysisExceptionWhenFeDebug("AdjustNullable convert slot " + + slotReference + + " from not-nullable to nullable. You can disable check by set fe_debug = false."); } return newSlotReference; } else { diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ColumnPruning.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ColumnPruning.java index cc2eb7d2057dce..4597e3d270714a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ColumnPruning.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ColumnPruning.java @@ -59,7 +59,6 @@ import org.apache.doris.qe.ConnectContext; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableList.Builder; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import org.roaringbitmap.RoaringBitmap; @@ -69,7 +68,6 @@ import java.util.Optional; import java.util.Set; import java.util.function.Function; -import java.util.stream.IntStream; /** * ColumnPruning. @@ -221,12 +219,6 @@ public Plan visitLogicalUnion(LogicalUnion union, PruneContext context) { } LogicalUnion prunedOutputUnion = pruneUnionOutput(union, context); // start prune children of union - List originOutput = union.getOutput(); - Set prunedOutput = prunedOutputUnion.getOutputSet(); - List prunedOutputIndexes = IntStream.range(0, originOutput.size()) - .filter(index -> prunedOutput.contains(originOutput.get(index))) - .boxed() - .collect(ImmutableList.toImmutableList()); ImmutableList.Builder prunedChildren = ImmutableList.builder(); ImmutableList.Builder> prunedChildrenOutputs = ImmutableList.builder(); @@ -234,15 +226,8 @@ public Plan visitLogicalUnion(LogicalUnion union, PruneContext context) { List regularChildOutputs = prunedOutputUnion.getRegularChildOutput(i); RoaringBitmap prunedChildOutputExprIds = new RoaringBitmap(); - Builder prunedChildOutputBuilder - = ImmutableList.builderWithExpectedSize(regularChildOutputs.size()); - for (Integer index : prunedOutputIndexes) { - SlotReference slot = regularChildOutputs.get(index); - prunedChildOutputBuilder.add(slot); - prunedChildOutputExprIds.add(slot.getExprId().asInt()); - } - - List prunedChildOutput = prunedChildOutputBuilder.build(); + regularChildOutputs.forEach(col -> prunedChildOutputExprIds.add(col.getExprId().asInt())); + List prunedChildOutput = regularChildOutputs; Plan prunedChild = doPruneChild( prunedOutputUnion, prunedOutputUnion.child(i), prunedChildOutputExprIds, prunedChildOutput, true @@ -423,12 +408,13 @@ private LogicalUnion pruneUnionOutput(LogicalUnion union, PruneContext context) ImmutableList.Builder> prunedConstantExprsList = ImmutableList.builderWithExpectedSize(constantExprsList.size()); + List> prunedRegularChildrenOutputs = + Lists.newArrayListWithCapacity(regularChildrenOutputs.size()); if (prunedOutputs.isEmpty()) { // process prune all columns NamedExpression originSlot = originOutput.get(0); prunedOutputs = ImmutableList.of(new SlotReference(originSlot.getExprId(), originSlot.getName(), TinyIntType.INSTANCE, false, originSlot.getQualifier())); - regularChildrenOutputs = Lists.newArrayListWithCapacity(regularChildrenOutputs.size()); children = Lists.newArrayListWithCapacity(children.size()); for (int i = 0; i < union.getArity(); i++) { Plan child = union.child(i); @@ -442,28 +428,35 @@ private LogicalUnion pruneUnionOutput(LogicalUnion union, PruneContext context) } else { project = new LogicalProject<>(newProjectOutput, child); } - regularChildrenOutputs.add((List) project.getOutput()); + prunedRegularChildrenOutputs.add((List) project.getOutput()); children.add(project); } for (int i = 0; i < constantExprsList.size(); i++) { prunedConstantExprsList.add(ImmutableList.of(new Alias(new TinyIntLiteral((byte) 1)))); } } else { - int len = extractColumnIndex.size(); + int prunedOutputSize = extractColumnIndex.size(); for (List row : constantExprsList) { - ImmutableList.Builder newRow = ImmutableList.builderWithExpectedSize(len); + ImmutableList.Builder newRow = ImmutableList.builderWithExpectedSize(prunedOutputSize); for (int idx : extractColumnIndex) { newRow.add(row.get(idx)); } prunedConstantExprsList.add(newRow.build()); } + for (int childIdx = 0; childIdx < union.getRegularChildrenOutputs().size(); childIdx++) { + List regular = Lists.newArrayListWithExpectedSize(prunedOutputSize); + for (int colIdx : extractColumnIndex) { + regular.add(regularChildrenOutputs.get(childIdx).get(colIdx)); + } + prunedRegularChildrenOutputs.add(regular); + } } if (prunedOutputs.equals(originOutput) && !context.requiredSlotsIds.isEmpty()) { return union; } else { return union.withNewOutputsChildrenAndConstExprsList(prunedOutputs, children, - regularChildrenOutputs, prunedConstantExprsList.build()); + prunedRegularChildrenOutputs, prunedConstantExprsList.build()); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java index 2048ea8f50e14d..864f15cf0dd260 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/OrExpansion.java @@ -313,8 +313,26 @@ private List expandInnerJoin(CascadesContext ctx, Pair, LogicalCTEConsumer left = new LogicalCTEConsumer(ctx.getStatementContext().getNextRelationId(), leftProducer.getCteId(), "", leftProducer); + List leftOutput = new ArrayList<>(); + for (Slot producerOutputSlot : leftProducer.getOutput()) { + for (Slot consumerSlot : left.getProducerToConsumerOutputMap().get(producerOutputSlot)) { + if (!leftOutput.contains(consumerSlot)) { + leftOutput.add(consumerSlot); + break; + } + } + } LogicalCTEConsumer right = new LogicalCTEConsumer(ctx.getStatementContext().getNextRelationId(), rightProducer.getCteId(), "", rightProducer); + List rightOutput = new ArrayList<>(); + for (Slot producerOutputSlot : rightProducer.getOutput()) { + for (Slot consumerSlot : right.getProducerToConsumerOutputMap().get(producerOutputSlot)) { + if (!rightOutput.contains(consumerSlot)) { + rightOutput.add(consumerSlot); + break; + } + } + } ctx.putCTEIdToConsumer(left); ctx.putCTEIdToConsumer(right); @@ -329,7 +347,10 @@ private List expandInnerJoin(CascadesContext ctx, Pair, LogicalJoin newJoin = new LogicalJoin<>( JoinType.INNER_JOIN, hashCond, otherCond, join.getDistributeHint(), - join.getMarkJoinSlotReference(), left, right, null); + join.getMarkJoinSlotReference(), + new LogicalProject<>(leftOutput, left), + new LogicalProject<>(rightOutput, right), + null); if (newJoin.getHashJoinConjuncts().stream() .anyMatch(equalTo -> equalTo.children().stream().anyMatch(e -> !(e instanceof Slot)))) { Plan plan = PushDownExpressionsInHashCondition.pushDownHashExpression(newJoin); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/EagerAggRewriter.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/EagerAggRewriter.java new file mode 100644 index 00000000000000..87050b5bbdfe22 --- /dev/null +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/EagerAggRewriter.java @@ -0,0 +1,629 @@ +// 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.doris.nereids.rules.rewrite.eageraggregation; + +import org.apache.doris.nereids.rules.analysis.NormalizeAggregate; +import org.apache.doris.nereids.rules.rewrite.StatsDerive; +import org.apache.doris.nereids.stats.ExpressionEstimation; +import org.apache.doris.nereids.trees.expressions.Alias; +import org.apache.doris.nereids.trees.expressions.CaseWhen; +import org.apache.doris.nereids.trees.expressions.Cast; +import org.apache.doris.nereids.trees.expressions.Expression; +import org.apache.doris.nereids.trees.expressions.NamedExpression; +import org.apache.doris.nereids.trees.expressions.Slot; +import org.apache.doris.nereids.trees.expressions.SlotReference; +import org.apache.doris.nereids.trees.expressions.functions.agg.AggregateFunction; +import org.apache.doris.nereids.trees.expressions.functions.agg.Count; +import org.apache.doris.nereids.trees.expressions.functions.scalar.If; +import org.apache.doris.nereids.trees.plans.JoinType; +import org.apache.doris.nereids.trees.plans.Plan; +import org.apache.doris.nereids.trees.plans.logical.LogicalAggregate; +import org.apache.doris.nereids.trees.plans.logical.LogicalCatalogRelation; +import org.apache.doris.nereids.trees.plans.logical.LogicalFilter; +import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; +import org.apache.doris.nereids.trees.plans.logical.LogicalProject; +import org.apache.doris.nereids.trees.plans.logical.LogicalRelation; +import org.apache.doris.nereids.trees.plans.logical.LogicalUnion; +import org.apache.doris.nereids.trees.plans.visitor.DefaultPlanRewriter; +import org.apache.doris.nereids.types.DataType; +import org.apache.doris.qe.SessionVariable; +import org.apache.doris.statistics.ColumnStatistic; +import org.apache.doris.statistics.Statistics; + +import com.google.common.collect.Lists; + +import java.util.ArrayList; +import java.util.IdentityHashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * eager aggregation + * agg[sum(t1.A) group by t1.B] + * ->join(t1.C=t2.D) + * ->T1(A, B, C) + * ->T2(D) + * + * => + * agg[sum(x) group by t1.B] + * ->join(t1.C=t2.D) + * ->agg[sum(A) as x, group by B] + * ->T1(A, B, C) + * ->T2(D) + */ +public class EagerAggRewriter extends DefaultPlanRewriter { + private static final double LOWER_AGGREGATE_EFFECT_COEFFICIENT = 10000; + private static final double LOW_AGGREGATE_EFFECT_COEFFICIENT = 1000; + private static final double MEDIUM_AGGREGATE_EFFECT_COEFFICIENT = 100; + private final StatsDerive derive = new StatsDerive(false); + + @Override + public Plan visitLogicalJoin(LogicalJoin join, PushDownAggContext context) { + boolean toLeft = false; + boolean toRight = false; + boolean pushHere = false; + if (join.getJoinType().isAsofJoin()) { + // do nothing for asof join + return join; + } + if (context.getAggFunctions().isEmpty()) { + // select t1.v from t1 join t2 on t1.id = t2.id group by t1.v, t2.v + // if no agg function, try to push agg to the child which contains all group keys + // TODO: consider t1.rows/(t1.id, t1.v).ndv and t2.rows/(t2.id, t2.v).ndv to determine push target + if (join.left().getOutputSet().containsAll(context.getGroupKeys())) { + toLeft = true; + } else if (join.right().getOutputSet().containsAll(context.getGroupKeys())) { + toRight = true; + } else { + pushHere = true; + } + } else { + for (AggregateFunction aggFunc : context.getAggFunctions()) { + if (join.left().getOutputSet().containsAll(aggFunc.getInputSlots())) { + toLeft = true; + } else if (join.right().getOutputSet().containsAll(aggFunc.getInputSlots())) { + toRight = true; + } else { + pushHere = true; + } + } + } + + if (pushHere || (toLeft && toRight)) { + if (SessionVariable.isEagerAggregationOnJoin()) { + return genAggregate(join, context); + } else { + return join; + } + } + // Do not push aggregation to the nullable side of outer joins when agg function contains case-when. + // CaseWhen expressions may produce non-null values from null-padded rows (e.g., WHEN col IS NULL THEN -54), + // so pre-aggregation before the join loses those contributions. + if (context.hasDecomposedAggIf || context.hasCaseWhen) { + JoinType joinType = join.getJoinType(); + if (joinType.isFullOuterJoin()) { + return join; + } + if (joinType.isRightOuterJoin()) { + toLeft = false; + } + if (joinType.isLeftOuterJoin()) { + toRight = false; + } + if (!toLeft && !toRight && !pushHere) { + return join; + } + } + + // Do not push count(*)/count(literal)/count(preserved_side_col) to the nullable side of outer joins. + // count(*) counts all physical rows, including null-extended rows from the outer join. + // After pushdown to the nullable side, unmatched rows produce NULL for the pre-aggregated count, + // and ifnull(sum(NULL), 0) = 0, which loses the count of unmatched rows. + // However, count(nullable_side_col) is safe to push down because for unmatched rows, + // nullable_side_col IS NULL, so the original count is 0, matching ifnull(sum(NULL), 0) = 0. + if (!join.getJoinType().isInnerJoin() && !join.getJoinType().isCrossJoin()) { + JoinType joinType = join.getJoinType(); + for (AggregateFunction aggFunc : context.getAggFunctions()) { + if (aggFunc instanceof Count) { + Set countInputSlots = aggFunc.getInputSlots(); + // Determine which side is nullable + boolean leftIsNullable = joinType.isRightOuterJoin() || joinType.isFullOuterJoin(); + boolean rightIsNullable = joinType.isLeftOuterJoin() || joinType.isFullOuterJoin(); + // Check if we're pushing to a nullable side without referencing its columns + if (toLeft && leftIsNullable) { + boolean hasLeftInput = countInputSlots.stream() + .anyMatch(slot -> join.left().getOutputSet().contains(slot)); + if (!hasLeftInput) { + toLeft = false; + } + } + if (toRight && rightIsNullable) { + boolean hasRightInput = countInputSlots.stream() + .anyMatch(slot -> join.right().getOutputSet().contains(slot)); + if (!hasRightInput) { + toRight = false; + } + } + } + } + if (!toLeft && !toRight && !pushHere) { + return join; + } + } + + List joinConditionSlots; + List childGroupByKeys = new ArrayList<>(); + if (toLeft) { + joinConditionSlots = getJoinConditionsInputSlotsFromOneSide(join, join.left()); + for (SlotReference key : context.getGroupKeys()) { + if (join.left().getOutputSet().containsAll(key.getInputSlots())) { + childGroupByKeys.add(key); + } + } + } else { + joinConditionSlots = getJoinConditionsInputSlotsFromOneSide(join, join.right()); + for (SlotReference key : context.getGroupKeys()) { + if (join.right().getOutputSet().containsAll(key.getInputSlots())) { + childGroupByKeys.add(key); + } + } + } + + for (SlotReference slot : joinConditionSlots) { + if (!childGroupByKeys.contains(slot)) { + childGroupByKeys.add(slot); + } + } + + PushDownAggContext childContext = context.withGroupKeys(childGroupByKeys); + if (!childContext.isValid()) { + return join; + } + Statistics stats = join.right().getStats(); + if (stats == null) { + stats = join.right().accept(derive, new StatsDerive.DeriveContext()); + } + if (stats.getRowCount() > PushDownAggContext.BIG_JOIN_BUILD_SIZE + || SessionVariable.getEagerAggregationMode() > 0) { + childContext = childContext.passThroughBigJoin(); + } + if (toLeft) { + Plan newLeft = join.left().accept(this, childContext); + if (newLeft != join.left()) { + return join.withChildren(newLeft, join.right()); + } + } else { + Plan newRight = join.right().accept(this, childContext); + if (newRight != join.right()) { + return join.withChildren(join.left(), newRight); + } + } + return join; + } + + private List getJoinConditionsInputSlotsFromOneSide( + LogicalJoin join, + Plan side) { + List oneSideSlots = new ArrayList<>(); + for (Expression condition : join.getHashJoinConjuncts()) { + for (Slot slot : condition.getInputSlots()) { + if (side.getOutputSet().contains(slot)) { + oneSideSlots.add((SlotReference) slot); + } + } + } + for (Expression condition : join.getOtherJoinConjuncts()) { + for (Slot slot : condition.getInputSlots()) { + if (side.getOutputSet().contains(slot)) { + oneSideSlots.add((SlotReference) slot); + } + } + } + return oneSideSlots; + } + + private PushDownAggContext createContextFromProject( + LogicalProject project, + PushDownAggContext context) { + /* + * context: sum(a) groupBy(y+z as x, l) + * proj: b+c as a, u+v as y, m+n as l + * newContext: sum(b+c), groupBy((u+v)+z as x, m+n as l) + */ + + List groupKeys = new ArrayList<>(); + for (SlotReference key : context.getGroupKeys()) { + groupKeys.addAll( + project.pushDownExpressionPastProject(key).getInputSlots() + .stream().map(slot -> (SlotReference) slot).collect(Collectors.toList())); + } + + List aggFunctions = new ArrayList<>(); + Map aliasMap = new IdentityHashMap<>(); + for (AggregateFunction aggFunc : context.getAggFunctions()) { + AggregateFunction newAggFunc = (AggregateFunction) project.pushDownExpressionPastProject(aggFunc); + Alias alias = context.getAliasMap().get(aggFunc); + aliasMap.put(newAggFunc, (Alias) alias.withChildren(newAggFunc)); + aggFunctions.add(newAggFunc); + } + // After pushing expressions past the project, the agg functions may now + // contain If/CaseWhen that were hidden behind slot references before. + // e.g. count(#slot) where #slot = if(cond, a, b) in the project. + // We must re-check and update hasCaseWhen accordingly. + boolean newHasCaseWhen = context.hasCaseWhen; + if (!newHasCaseWhen) { + for (AggregateFunction aggFunc : aggFunctions) { + if (aggFunc.anyMatch(e -> e instanceof CaseWhen || e instanceof If)) { + newHasCaseWhen = true; + break; + } + } + } + return new PushDownAggContext(aggFunctions, groupKeys, aliasMap, + context.getCascadesContext(), context.isPassThroughBigJoin(), + context.hasDecomposedAggIf, newHasCaseWhen); + } + + private boolean canPushThroughProject(LogicalProject project, PushDownAggContext context) { + for (SlotReference slot : context.getGroupKeys()) { + if (!project.getOutputSet().contains(slot)) { + SessionVariable.throwAnalysisExceptionWhenFeDebug("eager agg failed: can not find group key(" + + slot + ") in " + project); + return false; + } + } + for (Slot slot : context.getAggFunctionsInputSlots()) { + if (!project.getOutputSet().contains(slot)) { + SessionVariable.throwAnalysisExceptionWhenFeDebug("eager agg failed: can not find aggFunc slot(" + + slot + ") in " + project); + return false; + } + } + + // push sum(A) through project(x, x+y as A) + // if x is not used as group key, do not push through + for (Slot slot : context.getAggFunctionsInputSlots()) { + for (NamedExpression prj : project.getProjects()) { + if (prj instanceof Alias && prj.getExprId().equals(slot.getExprId())) { + if (prj.getInputSlots().stream() + .anyMatch( + s -> project.getOutputSet().contains(s) + && !context.getGroupKeys().contains(s))) { + return false; + } + } + } + } + + return true; + } + + private Plan alignUnionChildrenDataType(Plan child, PushDownAggContext context) { + int outputSize = child.getOutput().size(); + List outputDataType = Lists.newArrayListWithExpectedSize(outputSize); + outputDataType.addAll(context.getAggFunctions().stream() + .map(func -> context.getAliasMap().get(func).getDataType()).collect(Collectors.toList())); + outputDataType.addAll(context.getGroupKeys().stream().map(s -> s.getDataType()).collect(Collectors.toList())); + List projection = Lists.newArrayListWithExpectedSize(outputSize); + boolean needProject = false; + for (int colIdx = 0; colIdx < outputSize; colIdx++) { + SlotReference slot = (SlotReference) child.getOutput().get(colIdx); + if (!slot.getDataType().equals(outputDataType.get(colIdx))) { + projection.add(new Alias(new Cast(slot, outputDataType.get(colIdx)))); + needProject = true; + } else { + projection.add(slot); + } + } + if (needProject) { + return new LogicalProject(projection, child); + } else { + return child; + } + } + + @Override + public Plan visitLogicalUnion(LogicalUnion union, PushDownAggContext context) { + if (!union.getConstantExprsList().isEmpty()) { + return union; + } + + if (!union.getOutputs().stream().allMatch(e -> e instanceof SlotReference)) { + return union; + } + List newChildren = Lists.newArrayList(); + List childrenContext = new ArrayList<>(); + /* + if any child can not push, do not push + example + agg(output=[sum(a),min(a)], groupkey=[b]) + ->union(a, b) + ->child1(a1, b1) + ->child2(a2, b2) + if agg pushdown through child1, newChild1 output is (sum(a1), min(a1) b1) + but if agg can not pushdown through child2, the output of child2 is (a2, b2). + Output size of newChild1 and child2 are different + */ + boolean changed = false; + for (int idx = 0; idx < union.children().size(); idx++) { + Plan child = union.children().get(idx); + final int childIdx = idx; + List aggFunctionsForChild = new ArrayList<>(); + IdentityHashMap aliasMapForChild = new IdentityHashMap<>(); + for (AggregateFunction func : context.getAggFunctions()) { + AggregateFunction newFunc = (AggregateFunction) union.pushDownExpressionPastSetOperator(func, childIdx); + aggFunctionsForChild.add(newFunc); + Alias alias = context.getAliasMap().get(func); + // aliasForChild should have its own ExprId + Alias aliasForChild = new Alias(newFunc, alias.getName(), alias.getQualifier()); + aliasMapForChild.put(newFunc, aliasForChild); + } + + List groupKeysForChild = context.getGroupKeys().stream() + .map(slot -> (SlotReference) union.pushDownExpressionPastSetOperator(slot, childIdx)) + .collect(Collectors.toList()); + PushDownAggContext contextForChild = new PushDownAggContext(aggFunctionsForChild, groupKeysForChild, + aliasMapForChild, context.getCascadesContext(), + context.isPassThroughBigJoin(), context.hasDecomposedAggIf, context.hasCaseWhen); + childrenContext.add(contextForChild); + if (contextForChild.isValid()) { + Plan newChild = child.accept(this, contextForChild); + if (newChild != child) { + newChildren.add(newChild); + changed = true; + } else { + changed = false; + break; + } + } else { + // child(idx) cannot be rewritten, stop + break; + } + } + if (changed) { + for (int idx = 0; idx < union.children().size(); idx++) { + // all children need align data type + Plan newChild = alignUnionChildrenDataType(newChildren.get(idx), context); + newChildren.set(idx, newChild); + } + List> newRegularChildrenOutputs = Lists.newArrayListWithExpectedSize(union.arity()); + for (int childIdx = 0; childIdx < union.arity(); childIdx++) { + newRegularChildrenOutputs.add( + newChildren.get(childIdx).getOutput().stream() + .map(s -> (SlotReference) s).collect(Collectors.toList())); + } + + List newOutput = Lists.newArrayList(); + for (AggregateFunction func : context.getAggFunctions()) { + Alias alias = context.getAliasMap().get(func); + if (alias == null) { + SessionVariable.throwAnalysisExceptionWhenFeDebug("push down agg failed. union: " + union + + " context: " + context); + return union; + } + newOutput.add(alias.toSlot()); + } + newOutput.addAll(context.getGroupKeys()); + LogicalUnion newUnion = (LogicalUnion) union + .withChildrenAndOutputs(newChildren, newOutput, newRegularChildrenOutputs); + return newUnion; + } else { + return union; + } + } + + @Override + public Plan visitLogicalProject(LogicalProject project, PushDownAggContext context) { + if (project.child() instanceof LogicalCatalogRelation + || (project.child() instanceof LogicalFilter + && project.child().child(0) instanceof LogicalCatalogRelation)) { + // project + // --> scan + // => + // aggregate + // --> project + // --> scan + return genAggregate(project, context); + } + + if (!canPushThroughProject(project, context)) { + return genAggregate(project, context); + } + + PushDownAggContext newContext = createContextFromProject(project, context); + if (!newContext.isValid()) { + return project; + } + Plan newChild = project.child().accept(this, newContext); + if (newChild != project.child()) { + /* + * agg[sum(a), groupBy(b)] + * -> proj(a, b1+b2 as b) + * -> join(c = d) + * -> any(a, b1, b2, c,...) + * -> any(d, ...) + * => + * agg[sum(x), groupBy(b)] + * -> proj(x, b1+b2 as b) + * -> join(c=d) + * ->agg[sum(a) as x, groupBy(b1, b2, c)] + * ->proj(a, b1, b2, c, ...) + * -> any(a, b1, b2, c) + * -> any(d, ...) + */ + List newProjections = new ArrayList<>(); + //for (Alias alias : context.getAliasMap().values()) { + // newProjections.add(alias.toSlot()); + //} + for (AggregateFunction aggFunc : context.getAggFunctions()) { + newProjections.add(context.getAliasMap().get(aggFunc).toSlot()); + } + for (SlotReference slot : context.getGroupKeys()) { + boolean valid = false; + for (NamedExpression ne : project.getProjects()) { + if (ne.toSlot().getExprId().equals(slot.getExprId())) { + valid = true; + newProjections.add(ne); + break; + } + } + if (!valid) { + SessionVariable.throwAnalysisExceptionWhenFeDebug( + "push agg failed. slot: " + "not found in " + project); + return project; + } + } + LogicalProject result = new LogicalProject(newProjections, newChild); + return result; + } + + return project; + } + + @Override + public Plan visitLogicalAggregate(LogicalAggregate agg, PushDownAggContext context) { + return agg; + } + + @Override + public Plan visitLogicalFilter(LogicalFilter filter, PushDownAggContext context) { + return genAggregate(filter, context); + } + + @Override + public Plan visitLogicalRelation(LogicalRelation relation, PushDownAggContext context) { + return genAggregate(relation, context); + } + + private Plan genAggregate(Plan child, PushDownAggContext context) { + if (context.isValid() && checkStats(child, context)) { + List aggOutputExpressions = new ArrayList<>(); + for (AggregateFunction func : context.getAggFunctions()) { + aggOutputExpressions.add(context.getAliasMap().get(func)); + } + aggOutputExpressions.addAll(context.getGroupKeys()); + LogicalAggregate genAgg = new LogicalAggregate(context.getGroupKeys(), aggOutputExpressions, child); + NormalizeAggregate normalizeAggregate = new NormalizeAggregate(); + return normalizeAggregate.normalizeAgg(genAgg, Optional.empty(), + context.getCascadesContext()); + } else { + return child; + } + } + + private boolean checkStats(Plan plan, PushDownAggContext context) { + int mode = SessionVariable.getEagerAggregationMode(); + if (mode < 0) { + return false; + } + + if (mode > 0) { + // when mode=1, any join is regarded as big join in order to + // push down aggregation through at least one join + return context.isPassThroughBigJoin(); + } + + if (!context.isPassThroughBigJoin() && !context.hasDecomposedAggIf) { + return false; + } + + Statistics stats = plan.getStats(); + if (stats == null) { + stats = plan.accept(derive, new StatsDerive.DeriveContext()); + } + if (stats.getRowCount() <= 0) { + return false; + } + + List groupKeysStats = new ArrayList<>(); + + List lower = Lists.newArrayList(); + List medium = Lists.newArrayList(); + List high = Lists.newArrayList(); + + List[] cards = new List[] { lower, medium, high }; + + for (NamedExpression key : context.getGroupKeys()) { + ColumnStatistic colStats = ExpressionEstimation.INSTANCE.estimate(key, stats); + if (colStats.isUnKnown) { + return false; + } + if (stats.getRowCount() * 0.9 <= colStats.ndv) { + return false; + } + groupKeysStats.add(colStats); + cards[groupByCardinality(colStats, stats.getRowCount())].add(colStats); + } + + double lowerCartesian = 1.0; + for (ColumnStatistic colStats : lower) { + lowerCartesian = lowerCartesian * colStats.ndv; + } + + // pow(row_count/20, a half of lower column size) + double lowerUpper = Math.max(stats.getRowCount() / 20, 1); + lowerUpper = Math.pow(lowerUpper, Math.max(lower.size() / 2, 1)); + + if (high.isEmpty() && (lower.size() + medium.size()) <= 2) { + return true; + } + + if (high.isEmpty() && medium.isEmpty()) { + if (lower.size() == 1 && lowerCartesian * 20 <= stats.getRowCount()) { + return true; + } else if (lower.size() == 2 && lowerCartesian * 7 <= stats.getRowCount()) { + return true; + } else if (lower.size() <= 3 && lowerCartesian * 20 <= stats.getRowCount() && lowerCartesian < lowerUpper) { + return true; + } else { + return false; + } + } + + if (high.size() >= 2 || medium.size() > 2 || (high.size() == 1 && !medium.isEmpty())) { + return false; + } + + // 3. Extremely low cardinality for lower with at most one medium or high. + double lowerCartesianLowerBound = stats.getRowCount() / LOWER_AGGREGATE_EFFECT_COEFFICIENT; + if (high.size() + medium.size() == 1 && lower.size() <= 2 && lowerCartesian <= lowerCartesianLowerBound) { + return true; + } + + return false; + } + + // high(2): row_count / cardinality < MEDIUM_AGGREGATE_EFFECT_COEFFICIENT + // medium(1): row_count / cardinality >= MEDIUM_AGGREGATE_EFFECT_COEFFICIENT and + // < LOW_AGGREGATE_EFFECT_COEFFICIENT + // lower(0): row_count / cardinality >= LOW_AGGREGATE_EFFECT_COEFFICIENT + private int groupByCardinality(ColumnStatistic colStats, double rowCount) { + if (rowCount == 0 || colStats.ndv * MEDIUM_AGGREGATE_EFFECT_COEFFICIENT > rowCount) { + return 2; + } else if (colStats.ndv * MEDIUM_AGGREGATE_EFFECT_COEFFICIENT <= rowCount + && colStats.ndv * LOW_AGGREGATE_EFFECT_COEFFICIENT > rowCount) { + return 1; + } else if (colStats.ndv * LOW_AGGREGATE_EFFECT_COEFFICIENT <= rowCount) { + return 0; + } + return 2; + } +} diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/PushDownAggContext.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/PushDownAggContext.java new file mode 100644 index 00000000000000..17686d006a7cb4 --- /dev/null +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/PushDownAggContext.java @@ -0,0 +1,144 @@ +// 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.doris.nereids.rules.rewrite.eageraggregation; + +import org.apache.doris.nereids.CascadesContext; +import org.apache.doris.nereids.trees.expressions.Alias; +import org.apache.doris.nereids.trees.expressions.Slot; +import org.apache.doris.nereids.trees.expressions.SlotReference; +import org.apache.doris.nereids.trees.expressions.functions.agg.AggregateFunction; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableSet; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * PushDownAggContext + */ +public class PushDownAggContext { + public static final int BIG_JOIN_BUILD_SIZE = 400_000; + // count(if(...)): if(...) push down as a whole + // sum/min/max(if(truePart, elsePart)): if(...) can be split to sum(truePart) and sum(elsePart) + public final boolean hasDecomposedAggIf; + // When aggFunc(if(...)) is present, pushing down the null-supplemented side of the outer join is avoided. + // This is because null values are highly error-prone, + // so the push-down operation is not performed during hashCaseWhen. + public final boolean hasCaseWhen; + private final List aggFunctions; + private final List groupKeys; + private final HashMap aliasMap; + private final Set aggFunctionsInputSlots; + + // cascadesContext is used for normalizeAgg + private final CascadesContext cascadesContext; + + private final boolean passThroughBigJoin; + + /** + * constructor + */ + public PushDownAggContext(List aggFunctions, + List groupKeys, Map aliasMap, CascadesContext cascadesContext, + boolean passThroughBigJoin, boolean hasDecomposedAggIf, boolean hasCaseWhen) { + this.groupKeys = groupKeys.stream().distinct().collect(Collectors.toList()); + this.aggFunctions = ImmutableList.copyOf(aggFunctions); + this.cascadesContext = cascadesContext; + + HashMap builtAliasMap = new HashMap<>(); + if (aliasMap == null) { + for (AggregateFunction aggFunction : this.aggFunctions) { + builtAliasMap.put(aggFunction, new Alias(aggFunction, aggFunction.getName())); + } + } else { + for (AggregateFunction aggFunction : this.aggFunctions) { + Alias alias = aliasMap.get(aggFunction); + if (alias == null) { + alias = new Alias(aggFunction, aggFunction.getName()); + } + builtAliasMap.put(aggFunction, alias); + } + } + this.aliasMap = builtAliasMap; + + this.aggFunctionsInputSlots = aggFunctions.stream() + .flatMap(aggFunction -> aggFunction.getInputSlots().stream()) + .filter(Slot.class::isInstance) + .collect(ImmutableSet.toImmutableSet()); + this.passThroughBigJoin = passThroughBigJoin; + this.hasDecomposedAggIf = hasDecomposedAggIf; + this.hasCaseWhen = hasCaseWhen; + } + + /** + * check validation + * @return true, if groupKeys is not empty and no group by key is in aggFunctionsInputSlots + */ + public boolean isValid() { + return !groupKeys.isEmpty() + && !groupKeys.stream().anyMatch(s -> aggFunctionsInputSlots.contains(s)); + } + + public PushDownAggContext passThroughBigJoin() { + return new PushDownAggContext(aggFunctions, groupKeys, aliasMap, cascadesContext, + true, hasDecomposedAggIf, hasCaseWhen); + } + + public HashMap getAliasMap() { + return aliasMap; + } + + public List getAggFunctions() { + return aggFunctions; + } + + public List getGroupKeys() { + return groupKeys; + } + + public PushDownAggContext withGroupKeys(List groupKeys) { + return new PushDownAggContext(aggFunctions, groupKeys, aliasMap, + cascadesContext, passThroughBigJoin, hasDecomposedAggIf, hasCaseWhen); + } + + public Set getAggFunctionsInputSlots() { + return aggFunctionsInputSlots; + } + + public CascadesContext getCascadesContext() { + return cascadesContext; + } + + public boolean isPassThroughBigJoin() { + return passThroughBigJoin; + } + + @Override + public String toString() { + return "PushDownAggContext{" + + "aggFunctions=" + aggFunctions + + ", groupKeys=" + groupKeys + + ", aliasMap=" + aliasMap + + ", passThroughBigJoin=" + passThroughBigJoin + + '}'; + } +} diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/PushDownAggregation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/PushDownAggregation.java new file mode 100644 index 00000000000000..d92bc91e61ce20 --- /dev/null +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/PushDownAggregation.java @@ -0,0 +1,319 @@ +// 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. + +// 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.doris.nereids.rules.rewrite.eageraggregation; + +import org.apache.doris.nereids.jobs.JobContext; +import org.apache.doris.nereids.rules.analysis.NormalizeAggregate; +import org.apache.doris.nereids.rules.rewrite.AdjustNullable; +import org.apache.doris.nereids.trees.expressions.CaseWhen; +import org.apache.doris.nereids.trees.expressions.Expression; +import org.apache.doris.nereids.trees.expressions.NamedExpression; +import org.apache.doris.nereids.trees.expressions.Slot; +import org.apache.doris.nereids.trees.expressions.SlotReference; +import org.apache.doris.nereids.trees.expressions.functions.Function; +import org.apache.doris.nereids.trees.expressions.functions.agg.AggregateFunction; +import org.apache.doris.nereids.trees.expressions.functions.agg.Count; +import org.apache.doris.nereids.trees.expressions.functions.agg.Max; +import org.apache.doris.nereids.trees.expressions.functions.agg.Min; +import org.apache.doris.nereids.trees.expressions.functions.agg.RollUpTrait; +import org.apache.doris.nereids.trees.expressions.functions.agg.Sum; +import org.apache.doris.nereids.trees.expressions.functions.scalar.If; +import org.apache.doris.nereids.trees.expressions.functions.scalar.Nvl; +import org.apache.doris.nereids.trees.expressions.literal.BigIntLiteral; +import org.apache.doris.nereids.trees.expressions.literal.NullLiteral; +import org.apache.doris.nereids.trees.plans.Plan; +import org.apache.doris.nereids.trees.plans.logical.LogicalAggregate; +import org.apache.doris.nereids.trees.plans.logical.LogicalFilter; +import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; +import org.apache.doris.nereids.trees.plans.logical.LogicalProject; +import org.apache.doris.nereids.trees.plans.logical.LogicalRelation; +import org.apache.doris.nereids.trees.plans.logical.LogicalUnion; +import org.apache.doris.nereids.trees.plans.visitor.CustomRewriter; +import org.apache.doris.nereids.trees.plans.visitor.DefaultPlanRewriter; +import org.apache.doris.nereids.util.ExpressionUtils; +import org.apache.doris.qe.SessionVariable; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * push down aggregation + */ +public class PushDownAggregation extends DefaultPlanRewriter implements CustomRewriter { + private static final Logger LOG = LoggerFactory.getLogger(PushDownAggregation.class); + + public final EagerAggRewriter writer = new EagerAggRewriter(); + + private final Set pushDownAggFunctionSet = Sets.newHashSet( + Count.class, + Sum.class, + Max.class, + Min.class); + + private final Set acceptNodeType = Sets.newHashSet( + LogicalUnion.class, + LogicalProject.class, + LogicalFilter.class, + LogicalRelation.class, + LogicalJoin.class); + + @Override + public Plan rewriteRoot(Plan plan, JobContext jobContext) { + if (SessionVariable.isFeDebug()) { + try { + new AdjustNullable(false).rewriteRoot(plan, null); + } catch (Exception e) { + LOG.warn("(PushDownAggregation) input plan has nullable problem", e); + return plan; + } + } + int mode = SessionVariable.getEagerAggregationMode(); + if (mode < 0) { + return plan; + } else { + Plan result = plan.accept(this, jobContext); + if (SessionVariable.isFeDebug()) { + result = new AdjustNullable(true).rewriteRoot(result, null); + } + return result; + } + } + + @Override + public Plan visitLogicalAggregate(LogicalAggregate agg, JobContext context) { + Plan newChild = agg.child().accept(this, context); + if (newChild != agg.child()) { + return agg.withChildren(newChild); + } + + if (agg.getSourceRepeat().isPresent()) { + return agg; + } + + List groupKeys = new ArrayList<>(); + for (Expression groupKey : agg.getGroupByExpressions()) { + if (groupKey instanceof SlotReference) { + groupKeys.add((SlotReference) groupKey); + } else { + SessionVariable.throwAnalysisExceptionWhenFeDebug( + "PushDownAggregation failed: agg is not normalized\n " + + agg.treeString()); + return agg; + } + } + + Set aggFunctions = Sets.newHashSet(); + boolean hasDecomposedAggIf = false; + boolean hasCaseWhen = false; + Map> aggFunctionsForOutputExpressions = Maps.newHashMap(); + for (NamedExpression aggOutput : agg.getOutputExpressions()) { + List funcs = Lists.newArrayList(); + aggFunctionsForOutputExpressions.put(aggOutput, funcs); + for (Object obj : aggOutput.collect(AggregateFunction.class::isInstance)) { + AggregateFunction aggFunction = (AggregateFunction) obj; + if (aggFunction.isDistinct()) { + return agg; + } + if (pushDownAggFunctionSet.contains(aggFunction.getClass())) { + // CaseWhen and If (which CASE WHEN is normalized into) must both be checked. + // When an agg function contains an If/CaseWhen whose condition tests IS NULL + // (e.g. count(if(col IS NULL, value, NULL))), pushing it to the nullable side + // of an outer join produces wrong results: null-extended rows make "col IS NULL" + // TRUE at the top level, but the pre-aggregated count slot becomes NULL after + // null-extension, and ifnull(sum(NULL), 0) = 0 instead of the correct 1. + if (!hasCaseWhen && aggFunction.anyMatch(e -> e instanceof CaseWhen || e instanceof If)) { + hasCaseWhen = true; + } + if (aggFunction.arity() > 0 && aggFunction.child(0) instanceof If + && !(aggFunction instanceof Count)) { + // Decompose Sum/Max/Min(If(cond, a, b)) into separate agg functions. + // Count(If(...)) is NOT decomposed here because the top-level + // replacement (Count->Sum rollup) cannot match the decomposed + // Count(a)/Count(b) as sub-expressions of the original Count(If(cond,a,b)). + // Count(If(...)) is pushed down as-is and rolled up normally. + If body = (If) (aggFunction).child(0); + Set valueSlots = Sets.newHashSet(body.getTrueValue().getInputSlots()); + valueSlots.addAll(body.getFalseValue().getInputSlots()); + if (body.getCondition().getInputSlots().stream().anyMatch(s -> valueSlots.contains(s))) { + // do not push down sum(if a then a else b) + return agg; + } + AggregateFunction aggTrue = (AggregateFunction) aggFunction.withChildren(body.getTrueValue()); + aggFunctions.add(aggTrue); + funcs.add(aggTrue); + if (!(body.getFalseValue() instanceof NullLiteral)) { + AggregateFunction aggFalse = + (AggregateFunction) aggFunction.withChildren(body.getFalseValue()); + aggFunctions.add(aggFalse); + funcs.add(aggFalse); + } + groupKeys.addAll(body.getCondition().getInputSlots() + .stream().map(slot -> (SlotReference) slot).collect(Collectors.toList())); + hasDecomposedAggIf = true; + } else { + aggFunctions.add(aggFunction); + funcs.add(aggFunction); + } + + } else { + return agg; + } + } + } + + groupKeys = groupKeys.stream().distinct().collect(Collectors.toList()); + if (!checkSubTreePattern(agg.child())) { + return agg; + } + + PushDownAggContext pushDownContext = new PushDownAggContext(new ArrayList<>(aggFunctions), + groupKeys, null, context.getCascadesContext(), false, hasDecomposedAggIf, hasCaseWhen); + if (!pushDownContext.isValid()) { + return agg; + } + try { + Plan child = agg.child().accept(writer, pushDownContext); + if (child != agg.child()) { + // agg has been pushed down, rewrite agg output expressions + // before: agg[sum(A), by (B)] + // ->join(C=D) + // ->scan(T1[A...]) + // ->scan(T2) + // after: agg[sum(x), by(B)] + // ->join(C=D) + // ->agg[sum(A) as x, by(B,C)] + // ->scan(T1[A...]) + // ->scan(T2) + List newOutputExpressions = new ArrayList<>(); + //Map replaceMap = new HashMap<>(); + //for (AggregateFunction aggFunc : pushDownContext.getAliasMap().keySet()) { + // Alias alias = pushDownContext.getAliasMap().get(aggFunc); + // replaceMap.put(aggFunc, (AggregateFunction) aggFunc.withChildren((Expression) alias.toSlot())); + //} + + for (NamedExpression ne : agg.getOutputExpressions()) { + if (ne instanceof SlotReference) { + newOutputExpressions.add(ne); + } else { + // every expression has its own replaceMap + // aggregation(output=[min(A), sum(A)]) + // --> join + // -> T1 [A ...] + // -> T2 [...] + // => + // aggregation(output=[min(minA), sum(sumA)]) + // --> join + // -> agg(output=[min(A) as minA, sum(A) as sumA]) + // -> T1 [A ...] + // -> T2 [...] + // for min(A), replaceMap: A->minA + // for sum(A), replaceMap: A->sumA + // for count(A), replaceMap: count(A)->sum(countA), because count needs rollup to sum + Map replaceMap = new HashMap<>(); + List relatedAggFunc = aggFunctionsForOutputExpressions.get(ne); + for (AggregateFunction func : relatedAggFunc) { + Slot pushedDownSlot = pushDownContext.getAliasMap().get(func).toSlot(); + if (func instanceof Count) { + // For count(A), after pushdown we have count(A) as x, + // and the top agg should use sum(x) instead of count(x). + // Wrap with ifnull(..., 0) because COUNT never returns NULL, + // but after pushdown across an outer join, the intermediate count + // slot can be NULL (null-extended), making sum(NULL) = NULL. + Function rollUpFunc = ((RollUpTrait) func).constructRollUp(pushedDownSlot); + replaceMap.put(func, new Nvl(rollUpFunc, new BigIntLiteral(0))); + } else if (func.arity() > 0) { + // For sum/max/min, replace the child expression with the pushed down slot + replaceMap.put(func.child(0), pushedDownSlot); + } + } + NamedExpression replaceAliasExpr = (NamedExpression) ExpressionUtils.replace(ne, replaceMap); + replaceAliasExpr = (NamedExpression) ExpressionUtils.rebuildSignature(replaceAliasExpr); + newOutputExpressions.add(replaceAliasExpr); + } + } + LogicalAggregate eagerAgg = + agg.withAggOutputChild(newOutputExpressions, child); + NormalizeAggregate normalizeAggregate = new NormalizeAggregate(); + return normalizeAggregate.normalizeAgg(eagerAgg, Optional.empty(), + context.getCascadesContext()); + } + } catch (RuntimeException e) { + String msg = "PushDownAggregation failed: " + e.getMessage() + "\n" + agg.treeString(); + LOG.info(msg, e); + SessionVariable.throwAnalysisExceptionWhenFeDebug(msg); + } + return agg; + } + + private boolean checkSubTreePattern(Plan root) { + return containsPushDownJoin(root) + && checkPlanNodeType(root); + } + + private boolean containsPushDownJoin(Plan root) { + if (root instanceof LogicalJoin && !((LogicalJoin) root).isMarkJoin()) { + return true; + } + if (root.children().isEmpty()) { + return false; + } + return root.children().stream().anyMatch(this::containsPushDownJoin); + } + + private boolean checkPlanNodeType(Plan root) { + boolean accepted = acceptNodeType.stream() + .anyMatch(clazz -> clazz.isAssignableFrom(root.getClass())); + if (!accepted) { + return false; + } + for (Plan child : root.children()) { + if (!checkPlanNodeType(child)) { + return false; + } + } + return true; + } +} diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java index cb3234461b35fb..0cdc906db07599 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/ExpressionEstimation.java @@ -122,7 +122,7 @@ public class ExpressionEstimation extends ExpressionVisitor ch this.regularChildrenOutputs = ImmutableList.of(); } + /** + * constructor + */ public LogicalSetOperation(PlanType planType, Qualifier qualifier, List outputs, List> regularChildrenOutputs, List children) { - super(planType, children); - this.qualifier = qualifier; - this.outputs = ImmutableList.copyOf(outputs); - this.regularChildrenOutputs = ImmutableList.copyOf(regularChildrenOutputs); + this(planType, qualifier, outputs, regularChildrenOutputs, Optional.empty(), + Optional.empty(), children); } public LogicalSetOperation(PlanType planType, Qualifier qualifier, List outputs, @@ -312,4 +314,45 @@ public boolean canProcessProject(List parentProjects) { public Optional processProject(List parentProjects) { return Optional.of(PushProjectThroughUnion.doPushProject(parentProjects, this)); } + + /** + * Push down expression past SetOperation to a specific child. + * + * This method maps the expression from the SetOperation's output slots + * to the corresponding child's output slots. + * + * Example: + * SetOperation outputs: [x, y] + * Child 0 outputs (regularChildrenOutputs[0]): [a, b] + * Child 1 outputs (regularChildrenOutputs[1]): [c, d] + * + * If expression is "x + 1": + * - For childIdx=0, return "a + 1" + * - For childIdx=1, return "c + 1" + * + * @param expression the expression to push down + * @param childIdx the index of the child to push down to + * @return the rewritten expression for the child, or null if childIdx is out of + * bounds + */ + public Expression pushDownExpressionPastSetOperator(Expression expression, int childIdx) { + // Check if childIdx is valid + if (childIdx < 0 || childIdx >= regularChildrenOutputs.size()) { + return null; + } + + // Build mapping from SetOperation output slots to child output slots + java.util.HashMap slotMapping = new java.util.HashMap<>(); + List childOutputs = regularChildrenOutputs.get(childIdx); + + // Map each output slot to the corresponding child slot + for (int i = 0; i < outputs.size() && i < childOutputs.size(); i++) { + Slot outputSlot = outputs.get(i).toSlot(); + SlotReference childSlot = childOutputs.get(i); + slotMapping.put(outputSlot, childSlot); + } + + // Replace slots in the expression using the mapping + return ExpressionUtils.replace(expression, slotMapping); + } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalUnion.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalUnion.java index 1e563d5676dd21..1d165d34bbbfa8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalUnion.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalUnion.java @@ -424,4 +424,12 @@ private static List castToCommonType(List row, } return changed ? castedRow.build() : row; } + + public LogicalSetOperation withChildrenAndOutputs(List children, List newOuptuts, + List> childrenOutputs) { + Preconditions.checkArgument(children.size() == childrenOutputs.size(), + "children size %s is not equals with children outputs size %s", + children.size(), childrenOutputs.size()); + return new LogicalUnion(qualifier, newOuptuts, childrenOutputs, constantExprsList, hasPushedFilter, children); + } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/ExpressionUtils.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/ExpressionUtils.java index a09952b83e42a2..d8533640eb7033 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/util/ExpressionUtils.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/util/ExpressionUtils.java @@ -52,6 +52,7 @@ import org.apache.doris.nereids.trees.expressions.Slot; import org.apache.doris.nereids.trees.expressions.SlotReference; import org.apache.doris.nereids.trees.expressions.WindowExpression; +import org.apache.doris.nereids.trees.expressions.functions.BoundFunction; import org.apache.doris.nereids.trees.expressions.functions.agg.Avg; import org.apache.doris.nereids.trees.expressions.functions.agg.Max; import org.apache.doris.nereids.trees.expressions.functions.agg.Min; @@ -206,6 +207,49 @@ public static Optional optionalAnd(Collection collection return optionalAnd(ImmutableList.copyOf(collection)); } + /** + * Rebuild expression tree and refresh BoundFunction signatures. + * If an expression is a BoundFunction, recreate it with rebuilt children and + * reset its signature. + * Other expressions are recreated only when children change. + * + * @return rebuilt expression (may be the same instance when unchanged and + * non-BoundFunction) + */ + public static Expression rebuildSignature(Expression expr) { + List newChildren = expr.children().stream() + .map(ExpressionUtils::rebuildSignature) + .collect(Collectors.toList()); + return MoreFieldsThread.keepFunctionSignature(false, + () -> { + boolean childrenUnchanged = true; + List originChildren = expr.children(); + if (originChildren.size() != newChildren.size()) { + childrenUnchanged = false; + } else { + for (int i = 0; i < originChildren.size(); i++) { + if (originChildren.get(i) != newChildren.get(i)) { + childrenUnchanged = false; + break; + } + } + } + + if (expr instanceof BoundFunction) { + BoundFunction fn = (BoundFunction) expr; + BoundFunction rebuilt = (BoundFunction) fn.withChildren(newChildren); + rebuilt = (BoundFunction) TypeCoercionUtils.processBoundFunction(rebuilt); + return rebuilt; + } + + if (childrenUnchanged) { + return expr; + } + return expr.withChildren(newChildren); + }); + + } + /** * AND / OR expression, also remove duplicate expression, boolean literal */ diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java index 240a8d1acb49fb..8c589eed0fe43d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java @@ -30,6 +30,7 @@ import org.apache.doris.common.util.TimeUtils; import org.apache.doris.common.util.Util; import org.apache.doris.nereids.StatementContext; +import org.apache.doris.nereids.exceptions.AnalysisException; import org.apache.doris.nereids.glue.LogicalPlanAdapter; import org.apache.doris.nereids.metrics.Event; import org.apache.doris.nereids.metrics.EventSwitchParser; @@ -2224,6 +2225,38 @@ public boolean isEnableHboNonStrictMatchingMode() { @VariableMgr.VarAttr(name = DPHYPER_LIMIT) public int dphyperLimit = 1000; + @VariableMgr.VarAttr(name = "eager_aggregation_mode", needForward = true, + description = {"0: 根据统计信息决定是使用eager aggregation," + + "1: 强制使用 eager aggregation," + + "-1: 禁止使用 eager aggregation", + "0: Determine eager aggregation by statistics, " + + "1: force eager aggregation, " + + "-1: Prohibit eager aggregation "} + ) + private int eagerAggregationMode = 0; + + public static int getEagerAggregationMode() { + if (ConnectContext.get() != null) { + return ConnectContext.get().getSessionVariable().eagerAggregationMode; + } else { + return VariableMgr.getDefaultSessionVariable().eagerAggregationMode; + } + } + + public void setEagerAggregationMode(int mode) { + this.eagerAggregationMode = mode; + } + + @VariableMgr.VarAttr(name = "eager_aggregation_on_join", needForward = true) + public boolean eagerAggregationOnJoin = false; + + public static boolean isEagerAggregationOnJoin() { + if (ConnectContext.get() != null) { + return ConnectContext.get().getSessionVariable().eagerAggregationOnJoin; + } else { + return VariableMgr.getDefaultSessionVariable().eagerAggregationOnJoin; + } + } @VariableMgr.VarAttr( name = ENABLE_PAGE_CACHE, @@ -6108,6 +6141,13 @@ public static boolean isFeDebug() { } } + public static void throwAnalysisExceptionWhenFeDebug(String msg) { + LOG.warn(msg); + if (isFeDebug()) { + throw new AnalysisException(msg); + } + } + public Map getAffectQueryResultInPlanVariables() { ImmutableMap.Builder builder = ImmutableMap.builder(); try { diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/EagerAggRewriterTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/EagerAggRewriterTest.java new file mode 100644 index 00000000000000..4b0561ccd0f894 --- /dev/null +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/rewrite/eageraggregation/EagerAggRewriterTest.java @@ -0,0 +1,314 @@ +// 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.doris.nereids.rules.rewrite.eageraggregation; + +import org.apache.doris.nereids.util.MemoPatternMatchSupported; +import org.apache.doris.nereids.util.PlanChecker; +import org.apache.doris.utframe.TestWithFeService; + +import org.junit.jupiter.api.Test; + +class EagerAggRewriterTest extends TestWithFeService implements MemoPatternMatchSupported { + @Override + protected void runBeforeAll() throws Exception { + createDatabase("test"); + connectContext.setDatabase("test"); + createTables( + "CREATE TABLE IF NOT EXISTS t1 (\n" + + " id1 int not null,\n" + + " name varchar(20)\n" + + ")\n" + + "DUPLICATE KEY(id1)\n" + + "DISTRIBUTED BY HASH(id1) BUCKETS 10\n" + + "PROPERTIES (\"replication_num\" = \"1\")\n", + "CREATE TABLE IF NOT EXISTS t2 (\n" + + " id2 int not null,\n" + + " name varchar(20)\n" + + ")\n" + + "DUPLICATE KEY(id2)\n" + + "DISTRIBUTED BY HASH(id2) BUCKETS 10\n" + + "PROPERTIES (\"replication_num\" = \"1\")\n" + ); + connectContext.getSessionVariable().setDisableNereidsRules("PRUNE_EMPTY_PARTITION"); + } + + @Test + void testNotPushAggCaseWhenToNullableSideOfOuterJoin() { + connectContext.getSessionVariable().setEagerAggregationMode(1); + connectContext.getSessionVariable().setDisableJoinReorder(true); + try { + // RIGHT JOIN: agg function (case-when) references left side columns, + // left side is nullable, should NOT be pushed below the join + String sql = "select max(case when t1.name is not null then 'aaa' end) from t1 right join t2 on t1.id1 = t2.id2" + + " group by t1.id1"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(logicalAggregate(), any())) + .printlnTree(); + + // LEFT JOIN: agg function(case-when) references right side columns, + // right side is nullable, should NOT be pushed below the join + sql = "select max(case when t2.name is null then 'xxx' end) from t1 left join t2" + + " on t1.id1 = t2.id2 group by t1.id1"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(any(), logicalAggregate())) + .printlnTree(); + // RIGHT JOIN: agg function (not-case-when) references left side columns, + // left side is nullable, can be pushed below the join + sql = "select max(t2.name) from t1 left join t2" + + " on t1.id1 = t2.id2 group by t1.id1"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .matches(logicalJoin(any(), logicalAggregate())) + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + } + } + + @Test + void testPushDownCount() { + // Test count pushdown: count(a) should be pushed down and + // the top aggregation should use sum to aggregate the count results + // Before: agg(count(name), groupby(id2)) + // -> join(t1.id1=t2.id2) + // -> t1(id1, name) + // -> t2(id2) + // After: agg(sum(x), groupby(id2)) + // -> join(t1.id1=t2.id2) + // -> agg(count(name) as x, groupby(id1)) + // -> t1(id1, name) + // -> t2(id2) + connectContext.getSessionVariable().setEagerAggregationMode(1); + try { + String sql = "select count(t1.name), t2.id2 from t1 join t2 on t1.id1 = t2.id2 group by t2.id2"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .matches(logicalAggregate(logicalProject(logicalJoin(logicalAggregate(), any())))) + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + } + } + + @Test + void testNotPushDownDistinctAgg() { + // Distinct aggregation should not be pushed down. + connectContext.getSessionVariable().setEagerAggregationMode(1); + connectContext.getSessionVariable().setDisableJoinReorder(true); + try { + String sql = "select count(distinct t1.name), t2.id2 from t1 join t2" + + " on t1.id1 = t2.id2 group by t2.id2"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(logicalAggregate(), any())) + .nonMatch(logicalJoin(any(), logicalAggregate())) + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + connectContext.getSessionVariable().setDisableJoinReorder(false); + } + } + + @Test + void testPushDownCountThroughLeftJoinWrapsWithIfnull() { + // When count(right.col) is pushed down to the right side of a LEFT JOIN, + // the top aggregate rolls up count to sum. But when the LEFT JOIN has no + // matching right row, the intermediate count slot becomes NULL (null-extended), + // and sum(NULL) = NULL. The correct result should be 0 (COUNT never returns NULL). + // Fix: wrap the rolled-up sum with ifnull(sum(x), 0). + connectContext.getSessionVariable().setEagerAggregationMode(1); + connectContext.getSessionVariable().setDisableJoinReorder(true); + try { + String sql = "select count(t2.id2), t1.id1 from t1 left join t2" + + " on t1.name = t2.name group by t1.id1"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .matches(logicalProject(logicalAggregate(logicalProject(logicalJoin(any(), + logicalAggregate())))) + .when(project -> project.getProjects().stream().anyMatch( + expr -> expr.toString().contains("ifnull") + ))) + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + connectContext.getSessionVariable().setDisableJoinReorder(false); + } + } + + @Test + void testNotPushCountStarToNullableSideOfOuterJoin() { + // count(*)/count(1) counts all physical rows including null-extended rows. + // Pushing it to the nullable side loses the count of unmatched rows: + // original: count(*) on unmatched row = 1 + // pushed: ifnull(sum(NULL), 0) = 0 (wrong!) + // So count(*)/count(1) must NOT be pushed to the nullable side. + connectContext.getSessionVariable().setEagerAggregationMode(1); + connectContext.getSessionVariable().setDisableJoinReorder(true); + try { + // LEFT JOIN: right side (t1) is nullable, count(*) should NOT push to right + String sql = "select count(1), t2.id2 from t2 left join t1" + + " on t2.name = t1.name group by t2.id2"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(any(), logicalAggregate())) + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + connectContext.getSessionVariable().setDisableJoinReorder(false); + } + } + + @Test + void testPushDownCountWithIfChildShouldNotDecompose() { + // Count(If(cond, a, b)) should NOT be decomposed into Count(a) and Count(b) + // in the SumIf path, because the replacement logic cannot match decomposed + // Count(a)/Count(b) as sub-expressions of the original Count(If(cond, a, b)). + // This would cause "Input slot(s) not in child's output" error. + // Instead, Count(If(...)) should be pushed down as-is and rolled up via + // ifnull(sum(count_if_result), 0). + connectContext.getSessionVariable().setEagerAggregationMode(1); + connectContext.getSessionVariable().setDisableJoinReorder(true); + try { + String sql = "select count(case when t1.id1 > 3 then t1.name else 'x' end), t2.id2" + + " from t1 left join t2 on t1.name = t2.name group by t2.id2"; + // Should not throw "Input slot(s) not in child's output" + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + connectContext.getSessionVariable().setDisableJoinReorder(false); + } + } + + @Test + void testNotPushCountIfIsNullToNullableSideOfOuterJoin() { + // count(if(col IS NULL, value, NULL)) must NOT be pushed to the nullable side + // of an outer join. The If expression (normalized from CASE WHEN) with an IS NULL + // condition produces wrong results when pushed: + // - Original: for null-extended rows, col IS NULL = TRUE, count returns 1 + // - Pushed: pre-agg count slot becomes NULL after null-extension, + // ifnull(sum(NULL), 0) = 0 (wrong!) + // This test ensures If expressions get the same protection as CaseWhen. + connectContext.getSessionVariable().setEagerAggregationMode(1); + connectContext.getSessionVariable().setDisableJoinReorder(true); + try { + // RIGHT JOIN: t1 is the nullable side (left side of RIGHT JOIN) + // count(case when t1.name IS NULL then 'x' end) should NOT be pushed to t1 + String sql = "select count(case when t1.name is null then 'x' end), t2.id2" + + " from t1 right join t2 on t1.id1 = t2.id2 group by t2.id2"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(logicalAggregate(), any())) + .printlnTree(); + + // LEFT JOIN: t2 is the nullable side (right side of LEFT JOIN) + // count(case when t2.name IS NULL then 'y' end) should NOT be pushed to t2 + sql = "select count(case when t2.name is null then 'y' end), t1.id1" + + " from t1 left join t2 on t1.id1 = t2.id2 group by t1.id1"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(any(), logicalAggregate())) + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + connectContext.getSessionVariable().setDisableJoinReorder(false); + } + } + + @Test + void testNotPushCountCaseWhenWithElseToNullableSideViaProject() { + // When CASE WHEN has an ELSE clause (e.g. CASE WHEN cond THEN -121 ELSE 2 END), + // NormalizeAggregate extracts if(cond, -121, 2) into a Project as a slot, + // so the aggregate becomes count(#slot). At the agg level, hasCaseWhen=false + // because count(#slot) contains no If/CaseWhen. + // + // EagerAggRewriter must recheck hasCaseWhen after substituting through the + // Project (in createContextFromProject), otherwise count(if(cond, -121, 2)) + // is incorrectly pushed to the nullable side of an outer join. + // + // On null-extended rows: if(NULL_cond, -121, 2) = 2 (ELSE branch), count(2) = 1. + // But pre-agg doesn't include null-extended rows → ifnull(sum(NULL), 0) = 0 (wrong!). + connectContext.getSessionVariable().setEagerAggregationMode(1); + connectContext.getSessionVariable().setDisableJoinReorder(true); + try { + // RIGHT JOIN: t1 is the nullable side + // count(case when t1.id1 > 5 then -121 else 2 end) must NOT be pushed to t1 + String sql = "select count(case when t1.id1 > 5 then -121 else 2 end), t2.id2" + + " from t1 right join t2 on t1.id1 = t2.id2 group by t2.id2"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(logicalAggregate(), any())) + .printlnTree(); + + // LEFT JOIN: t2 is the nullable side + String sql2 = "select count(case when t2.id2 > 5 then -121 else 2 end), t1.id1" + + " from t1 left join t2 on t1.id1 = t2.id2 group by t1.id1"; + PlanChecker.from(connectContext) + .analyze(sql2) + .rewrite() + .nonMatch(logicalJoin(any(), logicalAggregate())) + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + connectContext.getSessionVariable().setDisableJoinReorder(false); + } + } + + @Test + void testAsofJoinNotPushAgg() { + // Ensure ASOF joins are ignored by EagerAggRewriter (no pushdown) + connectContext.getSessionVariable().setEagerAggregationMode(1); + connectContext.getSessionVariable().setDisableJoinReorder(true); + try { + String sql = "select count(t1.name), t2.id2 from t1 ASOF JOIN t2 " + + "MATCH_CONDITION(cast(t1.id1 as datetime) > cast(t2.id2 as datetime)) " + + "on t1.id1 = t2.id2 group by t2.id2"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(any(), logicalAggregate())) + .printlnTree(); + + sql = "select count(t1.name), t2.id2 from t1 ASOF INNER JOIN t2 " + + "MATCH_CONDITION(cast(t1.id1 as datetime) > cast(t2.id2 as datetime)) " + + "on t1.id1 = t2.id2 group by t2.id2"; + PlanChecker.from(connectContext) + .analyze(sql) + .rewrite() + .nonMatch(logicalJoin(logicalAggregate(), any())) + .printlnTree(); + } finally { + connectContext.getSessionVariable().setEagerAggregationMode(0); + connectContext.getSessionVariable().setDisableJoinReorder(false); + } + } +} diff --git a/regression-test/data/nereids_p0/eager_agg/eager_agg.out b/regression-test/data/nereids_p0/eager_agg/eager_agg.out new file mode 100644 index 00000000000000..731f2e9bd9eda7 --- /dev/null +++ b/regression-test/data/nereids_p0/eager_agg/eager_agg.out @@ -0,0 +1,313 @@ +-- This file is automatically generated. You should know what you did if you want to edit this +-- !a -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------hashAgg[GLOBAL] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +--------------PhysicalOlapScan[store_sales] +--------------PhysicalOlapScan[web_sales] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ ss broadcast ws } broadcast dt ) +UnUsed: +SyntaxError: + +-- !a_exe -- +2024 66.00 54.00 +2025 50.00 42.00 + +-- !a2 -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------hashAgg[GLOBAL] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +--------------PhysicalOlapScan[store_sales] +--------------PhysicalOlapScan[web_sales] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ ss broadcast ws } broadcast dt ) +UnUsed: +SyntaxError: + +-- !a2_exe -- +2024 120.00 +2025 92.00 + +-- !sum_min_max -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------hashAgg[GLOBAL] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +--------------PhysicalOlapScan[store_sales] +--------------PhysicalOlapScan[web_sales] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ ss broadcast ws } broadcast dt ) +UnUsed: +SyntaxError: + +-- !sum_min_max_exe -- +2024 66.00 11.00 16.00 +2025 50.00 20.00 22.00 + +-- !avg -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +----------PhysicalOlapScan[store_sales] +----------PhysicalOlapScan[web_sales] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ ss broadcast ws } broadcast dt ) +UnUsed: +SyntaxError: + +-- !avg_exe -- +2024 16.5000 +2025 25.0000 + +-- !count_column -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +----------PhysicalOlapScan[store_sales] +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[web_sales] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ ss broadcast ws } broadcast dt ) +UnUsed: +SyntaxError: + +-- !count_column_exe -- +2024 4 +2025 2 + +-- !count_star -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[store_sales] +----------PhysicalOlapScan[web_sales] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ ss broadcast ws } broadcast dt ) +UnUsed: +SyntaxError: + +-- !count_star_exe -- +2024 4 +2025 2 + +-- !count_sum_mixed -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------hashAgg[GLOBAL] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +--------------PhysicalOlapScan[store_sales] +--------------PhysicalOlapScan[web_sales] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ ss broadcast ws } broadcast dt ) +UnUsed: +SyntaxError: + +-- !count_sum_mixed_exe -- +2024 4 54.00 +2025 2 42.00 + +-- !count_star_sum_mixed -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[store_sales] +----------PhysicalOlapScan[web_sales] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ ss broadcast ws } broadcast dt ) +UnUsed: +SyntaxError: + +-- !count_star_sum_mixed_exe -- +2024 4 54.00 +2025 2 42.00 + +-- !groupkey_push_SS_JOIN_D -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +--------hashAgg[GLOBAL] +----------hashAgg[LOCAL] +------------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +--------------PhysicalOlapScan[store_sales] +--------------PhysicalOlapScan[date_dim] +--------PhysicalOlapScan[web_sales] + +Hint log: +Used: leading({ ss broadcast dt } broadcast ws ) +UnUsed: +SyntaxError: + +-- !groupkey_push_SS_JOIN_D_exe -- +2024 10.00 12.00 +2024 15.00 17.00 +2024 25.00 29.00 +2025 18.00 21.00 +2025 20.00 23.00 + +-- !groupkey_push -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[store_sales] +----------PhysicalOlapScan[date_dim] +--------PhysicalOlapScan[web_sales] + +Hint log: +Used: leading({ ss broadcast dt } broadcast ws ) +UnUsed: +SyntaxError: + +-- !groupkey_push_exe -- +2024 20.00 22.00 +2024 30.00 32.00 +2025 18.00 20.00 +2025 20.00 22.00 + +-- !sum_if_push -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() +----------hashAgg[GLOBAL] +------------hashAgg[LOCAL] +--------------PhysicalOlapScan[web_sales] +----------PhysicalOlapScan[item] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: leading({ web_sales broadcast item } broadcast date_dim ) +UnUsed: +SyntaxError: + +-- !sum_if_push_exe -- +1 30.50 \N \N \N \N \N +2 \N 22.00 \N \N \N \N + +-- !check_case_when_outer_join_not_push -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() +--------PhysicalOlapScan[store_sales] +--------PhysicalOlapScan[date_dim] + +-- !check_no_case_when_outer_join_push -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() +--------hashAgg[GLOBAL] +----------hashAgg[LOCAL] +------------PhysicalOlapScan[store_sales] +--------PhysicalOlapScan[date_dim] + +-- !check_no_push_value_slots_contains_if_slots -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() +--------PhysicalOlapScan[store_sales] +--------PhysicalOlapScan[date_dim] + +-- !min_sum_same_slot -- +PhysicalResultSink +--filter(brand IS NULL) +----hashAgg[GLOBAL] +------hashAgg[LOCAL] +--------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +----------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +------------PhysicalOlapScan[store_sales] +------------hashAgg[GLOBAL] +--------------hashAgg[LOCAL] +----------------PhysicalOlapScan[date_dim] +----------PhysicalOlapScan[web_sales] + +Hint log: +Used: leading({ ss broadcast dt } broadcast ws ) +UnUsed: +SyntaxError: + +-- !min_sum_same_slot_exe -- + +-- !sum_min_same_slot_exe -- + +-- !no_push_aggkey_groupKey_overlap -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------hashJoin[INNER_JOIN] hashCondition=((ss.ss_item_sk = ws.ws_item_sk)) otherCondition=() +--------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +----------PhysicalOlapScan[store_sales] +----------PhysicalOlapScan[date_dim] +--------PhysicalOlapScan[web_sales] + +Hint log: +Used: leading({ ss broadcast dt } broadcast ws ) +UnUsed: +SyntaxError: + +-- !no_push_not_all_union_children_push -- +PhysicalResultSink +--hashAgg[GLOBAL] +----hashAgg[LOCAL] +------PhysicalUnion +--------hashJoin[INNER_JOIN] hashCondition=((dt.d_date_sk = ss.ss_sold_date_sk)) otherCondition=() +----------PhysicalOlapScan[store_sales] +----------PhysicalOlapScan[date_dim] +--------PhysicalOlapScan[date_dim] + +Hint log: +Used: +UnUsed: +SyntaxError: leading({ ss broadcast dt } broadcast ws) Msg:can not find table: ws + diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out b/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out deleted file mode 100644 index 68164611ed03d9..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/basic.out +++ /dev/null @@ -1,98 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !1 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------filter((a.event_id = 'ad_click')) -----------PhysicalOlapScan[com_dd_library] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 37.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library] - --- !2 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------PhysicalOlapScan[com_dd_library] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 73.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library] - --- !3 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------PhysicalOlapScan[com_dd_library] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 73.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library] - --- !4 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------PhysicalOlapScan[com_dd_library] ---------PhysicalOlapScan[shunt_log_com_dd_library] - --- !with_hint_1 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------hashAgg[GLOBAL] -----------filter((a.event_id = 'ad_click')) -------------PhysicalOlapScan[com_dd_library] ---------hashAgg[GLOBAL] -----------filter((cast(experiment_id as DECIMALV3(38, 6)) = 37.000000)) -------------PhysicalOlapScan[shunt_log_com_dd_library] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_2 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[com_dd_library] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 73.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_3 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[com_dd_library] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 73.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_4 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[com_dd_library] ---------PhysicalOlapScan[shunt_log_com_dd_library] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: use_push_down_agg_through_join -SyntaxError: - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out deleted file mode 100644 index cd8980c71a35d4..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/basic_one_side.out +++ /dev/null @@ -1,98 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !1 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------filter((a.event_id = 'ad_click')) -----------PhysicalOlapScan[com_dd_library_one_side] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 37.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] - --- !2 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------PhysicalOlapScan[com_dd_library_one_side] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 73.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] - --- !3 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------PhysicalOlapScan[com_dd_library_one_side] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 73.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] - --- !4 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------PhysicalOlapScan[com_dd_library_one_side] ---------PhysicalOlapScan[shunt_log_com_dd_library_one_side] - --- !with_hint_1 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------hashAgg[GLOBAL] -----------filter((a.event_id = 'ad_click')) -------------PhysicalOlapScan[com_dd_library_one_side] ---------hashAgg[GLOBAL] -----------filter((cast(experiment_id as DECIMALV3(38, 6)) = 37.000000)) -------------PhysicalOlapScan[shunt_log_com_dd_library_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_2 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[com_dd_library_one_side] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 73.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_3 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[com_dd_library_one_side] ---------filter((cast(experiment_id as DECIMALV3(38, 6)) = 73.000000)) -----------PhysicalOlapScan[shunt_log_com_dd_library_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_4 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((a.device_id = b.device_id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[com_dd_library_one_side] ---------PhysicalOlapScan[shunt_log_com_dd_library_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_distinct_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_distinct_through_join_one_side.out deleted file mode 100644 index 4a84ff5117c008..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_distinct_through_join_one_side.out +++ /dev/null @@ -1,237 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -1 -1 -1 -3 - --- !groupby_pushdown_left_join -- -1 -1 -1 -3 - --- !groupby_pushdown_right_join -- -1 -1 -1 -3 - --- !groupby_pushdown_full_join -- -1 -1 -1 -3 - --- !groupby_pushdown_left_semi_join -- -1 -1 -1 -3 - --- !groupby_pushdown_left_anti_join -- - --- !groupby_pushdown_complex_conditions -- - --- !groupby_pushdown_with_aggregate -- -1 1.0 -1 2.0 -1 3.0 -3 2.0 - --- !groupby_pushdown_subquery -- - --- !groupby_pushdown_outer_join -- -1 -1 -1 -3 - --- !groupby_pushdown_deep_subquery -- - --- !groupby_pushdown_having -- - --- !groupby_pushdown_mixed_aggregates -- -1 1 -1 2 -1 3 -3 6 - --- !groupby_pushdown_multi_table_join -- -1 -1 -1 - --- !groupby_pushdown_with_order_by -- -1 -1 -1 -3 - --- !groupby_pushdown_multiple_equal_conditions -- -1 -1 -1 - --- !groupby_pushdown_equal_conditions_with_aggregate -- -1 1 -2 1 -3 1 - --- !groupby_pushdown_equal_conditions_non_aggregate -- -a 1 -b 1 -c 1 - --- !groupby_pushdown_equal_conditions_non_aggregate_with_aggregate -- -a 1 1 -b 1 1 -c 1 1 - --- !groupby_pushdown_with_where_clause -- - --- !groupby_pushdown_varied_aggregates -- -1 1.5 1 -1 4.5 1 -1 7.5 1 -3 7.0 0 - --- !groupby_pushdown_with_order_by_limit -- -1 -1 -1 -3 - --- !groupby_pushdown_alias_multiple_equal_conditions -- -1 -1 -1 - --- !groupby_pushdown_complex_join_condition -- - --- !groupby_pushdown_function_processed_columns -- -0 -1 -1 -1 - --- !groupby_pushdown_nested_queries -- - --- !with_hint_groupby_pushdown_basic -- -1 -1 -1 -3 - --- !with_hint_groupby_pushdown_left_join -- -1 -1 -1 -3 - --- !with_hint_groupby_pushdown_right_join -- -1 -1 -1 -3 - --- !with_hint_groupby_pushdown_full_join -- -1 -1 -1 -3 - --- !with_hint_groupby_pushdown_left_semi_join -- -1 -1 -1 -3 - --- !with_hint_groupby_pushdown_left_anti_join -- - --- !with_hint_groupby_pushdown_complex_conditions -- - --- !with_hint_groupby_pushdown_with_aggregate -- -1 1.0 -1 2.0 -1 3.0 -3 2.0 - --- !with_hint_groupby_pushdown_subquery -- - --- !with_hint_groupby_pushdown_outer_join -- -1 -1 -1 -3 - --- !with_hint_groupby_pushdown_deep_subquery -- - --- !with_hint_groupby_pushdown_having -- - --- !with_hint_groupby_pushdown_mixed_aggregates -- -1 1 -1 2 -1 3 -3 6 - --- !with_hint_groupby_pushdown_multi_table_join -- -1 -1 -1 - --- !with_hint_groupby_pushdown_with_order_by -- -1 -1 -1 -3 - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -1 -1 -1 - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -1 1 -2 1 -3 1 - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate -- -a 1 -b 1 -c 1 - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate -- -a 1 1 -b 1 1 -c 1 1 - --- !with_hint_groupby_pushdown_with_where_clause -- - --- !with_hint_groupby_pushdown_varied_aggregates -- -1 1.5 1 -1 4.5 1 -1 7.5 1 -3 7.0 0 - --- !with_hint_groupby_pushdown_with_order_by_limit -- -1 -1 -1 -3 - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -1 -1 -1 - --- !with_hint_groupby_pushdown_complex_join_condition -- - --- !with_hint_groupby_pushdown_function_processed_columns -- -0 -1 -1 -1 - --- !with_hint_groupby_pushdown_nested_queries -- - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out deleted file mode 100644 index 48f4292fcd760b..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join.out +++ /dev/null @@ -1,1032 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((count_t.score > 10)) -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((count_t.score > 10)) -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((count(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[count_t] -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_multi_table_join_1 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] -------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t] -------------PhysicalOlapScan[count_t] - --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t] -------------PhysicalOlapScan[count_t] - --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((count_t.id < 100)) -----------PhysicalOlapScan[count_t] ---------filter((count_t.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((count_t.score > 10)) -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((count_t.score > 10)) -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((count(*) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[count_t] -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_multi_table_join_2 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] -------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t] -------------PhysicalOlapScan[count_t] - --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[count_t] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t] -------------PhysicalOlapScan[count_t] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((count_t.id < 100)) -----------PhysicalOlapScan[count_t] ---------filter((count_t.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[count_t] - --- !with_hint_groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((count_t.score > 10)) -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((count_t.score > 10)) -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_having -- -PhysicalResultSink ---filter((count(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[count_t] -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_multi_table_join_1 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] -------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t] -------------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t] -------------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((count_t.id < 100)) -----------PhysicalOlapScan[count_t] ---------filter((count_t.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((count_t.score > 10)) -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((count_t.score > 10)) -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_having -- -PhysicalResultSink ---filter((count(*) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[count_t] -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_multi_table_join_2 -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] -------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t] -------------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t] -------------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t] ---------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((count_t.id < 100)) -----------PhysicalOlapScan[count_t] ---------filter((count_t.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[count_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out deleted file mode 100644 index 1cbde8708f396c..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.out +++ /dev/null @@ -1,1093 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------filter((count_t_one_side.score > 10)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------filter((count_t_one_side.score > 10)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((count(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[count_t_one_side] -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] -------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((count_t_one_side.id < 100)) -----------PhysicalOlapScan[count_t_one_side] ---------filter((count_t_one_side.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------filter((count_t_one_side.score > 10)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------filter((count_t_one_side.score > 10)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((count(*) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[count_t_one_side] -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] -------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((count_t_one_side.id < 100)) -----------PhysicalOlapScan[count_t_one_side] ---------filter((count_t_one_side.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[count_t_one_side] - --- !with_hint_groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------filter((count_t_one_side.score > 10)) -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------filter((count_t_one_side.score > 10)) -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_having -- -PhysicalResultSink ---filter((count(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[GLOBAL] -------------PhysicalOlapScan[count_t_one_side] -----------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------PhysicalOlapScan[count_t_one_side] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((count_t_one_side.id < 100)) -----------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------filter((count_t_one_side.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------filter((count_t_one_side.score > 10)) -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------filter((count_t_one_side.score > 10)) -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_having -- -PhysicalResultSink ---filter((count(*) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[GLOBAL] -------------PhysicalOlapScan[count_t_one_side] -----------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------PhysicalOlapScan[count_t_one_side] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[count_t_one_side] -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[count_t_one_side] ---------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((count_t_one_side.id < 100)) -----------PhysicalOlapScan[count_t_one_side] ---------hashAgg[GLOBAL] -----------filter((count_t_one_side.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[count_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !shape -- -PhysicalResultSink ---PhysicalLimit[GLOBAL] -----PhysicalLimit[LOCAL] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((dwd_tracking_sensor_init_tmp_ymd.dt = dw_user_b2c_tracking_info_tmp_ymd.dt) and (dwd_tracking_sensor_init_tmp_ymd.guid = dw_user_b2c_tracking_info_tmp_ymd.guid)) otherCondition=() -------------filter((dwd_tracking_sensor_init_tmp_ymd.dt = '2024-08-19') and (dwd_tracking_sensor_init_tmp_ymd.tracking_type = 'click')) ---------------PhysicalOlapScan[dwd_tracking_sensor_init_tmp_ymd] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------filter((dw_user_b2c_tracking_info_tmp_ymd.dt = '2024-08-19') and (substring(first_visit_time, 1, 10) <= '2024-08-19')) -------------------PhysicalOlapScan[dw_user_b2c_tracking_info_tmp_ymd] - -Hint log: -Used: use_PUSH_DOWN_AGG_THROUGH_JOIN_ONE_SIDE -UnUsed: -SyntaxError: - --- !agg_pushed -- -2 是 2024-08-19 - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_max_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_max_through_join.out deleted file mode 100644 index b5d05241012022..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_max_through_join.out +++ /dev/null @@ -1,592 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------filter((max_t.score > 10)) -----------PhysicalOlapScan[max_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------filter((max_t.score > 10)) -----------PhysicalOlapScan[max_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------filter((t1.score > 100)) -----------PhysicalOlapScan[max_t] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[max_t] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[max_t] -------------PhysicalOlapScan[max_t] - --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[max_t] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[max_t] -------------PhysicalOlapScan[max_t] - --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((max_t.id < 100)) -----------PhysicalOlapScan[max_t] ---------filter((max_t.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[max_t] - --- !with_hint_groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------hashAgg[GLOBAL] -----------filter((max_t.score > 10)) -------------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------hashAgg[GLOBAL] -----------filter((max_t.score > 10)) -------------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_having -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------hashAgg[GLOBAL] -----------filter((t1.score > 100)) -------------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------PhysicalOlapScan[max_t] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[max_t] -------------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[max_t] -------------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------hashAgg[GLOBAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[max_t] -------------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[max_t] ---------PhysicalOlapScan[max_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((max_t.id < 100)) -----------PhysicalOlapScan[max_t] ---------hashAgg[GLOBAL] -----------filter((max_t.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[max_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_distinct_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_distinct_through_join_one_side.out deleted file mode 100644 index db15483c496eb4..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_distinct_through_join_one_side.out +++ /dev/null @@ -1,237 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -1 -1 -2 -3 - --- !groupby_pushdown_left_join -- -1 -1 -2 -3 - --- !groupby_pushdown_right_join -- -1 -1 -2 -3 - --- !groupby_pushdown_full_join -- -1 -1 -2 -3 - --- !groupby_pushdown_left_semi_join -- -1 -1 -2 -3 - --- !groupby_pushdown_left_anti_join -- - --- !groupby_pushdown_complex_conditions -- - --- !groupby_pushdown_with_aggregate -- -1 1.0 -1 2.0 -2 2.0 -3 3.0 - --- !groupby_pushdown_subquery -- - --- !groupby_pushdown_outer_join -- -1 -1 -2 -3 - --- !groupby_pushdown_deep_subquery -- - --- !groupby_pushdown_having -- - --- !groupby_pushdown_mixed_aggregates -- -1 1 -1 6 -2 2 -3 3 - --- !groupby_pushdown_multi_table_join -- -1 -2 -3 - --- !groupby_pushdown_with_order_by -- -1 -1 -2 -3 - --- !groupby_pushdown_multiple_equal_conditions -- -1 -2 -3 - --- !groupby_pushdown_equal_conditions_with_aggregate -- -1 1 -2 2 -3 3 - --- !groupby_pushdown_equal_conditions_non_aggregate -- -a 1 -b 2 -c 3 - --- !groupby_pushdown_equal_conditions_non_aggregate_with_aggregate -- -a 1 1 -b 2 2 -c 3 3 - --- !groupby_pushdown_with_where_clause -- - --- !groupby_pushdown_varied_aggregates -- -1 1.5 a -1 7.0 \N -2 4.5 b -3 7.5 c - --- !groupby_pushdown_with_order_by_limit -- -1 -1 -2 -3 - --- !groupby_pushdown_alias_multiple_equal_conditions -- -1 -2 -3 - --- !groupby_pushdown_complex_join_condition -- - --- !groupby_pushdown_function_processed_columns -- -\N -1 -1 -1 - --- !groupby_pushdown_nested_queries -- - --- !with_hint_groupby_pushdown_basic -- -1 -1 -2 -3 - --- !with_hint_groupby_pushdown_left_join -- -1 -1 -2 -3 - --- !with_hint_groupby_pushdown_right_join -- -1 -1 -2 -3 - --- !with_hint_groupby_pushdown_full_join -- -1 -1 -2 -3 - --- !with_hint_groupby_pushdown_left_semi_join -- -1 -1 -2 -3 - --- !with_hint_groupby_pushdown_left_anti_join -- - --- !with_hint_groupby_pushdown_complex_conditions -- - --- !with_hint_groupby_pushdown_with_aggregate -- -1 1.0 -1 2.0 -2 2.0 -3 3.0 - --- !with_hint_groupby_pushdown_subquery -- - --- !with_hint_groupby_pushdown_outer_join -- -1 -1 -2 -3 - --- !with_hint_groupby_pushdown_deep_subquery -- - --- !with_hint_groupby_pushdown_having -- - --- !with_hint_groupby_pushdown_mixed_aggregates -- -1 1 -1 6 -2 2 -3 3 - --- !with_hint_groupby_pushdown_multi_table_join -- -1 -2 -3 - --- !with_hint_groupby_pushdown_with_order_by -- -1 -1 -2 -3 - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -1 -2 -3 - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -1 1 -2 2 -3 3 - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate -- -a 1 -b 2 -c 3 - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate -- -a 1 1 -b 2 2 -c 3 3 - --- !with_hint_groupby_pushdown_with_where_clause -- - --- !with_hint_groupby_pushdown_varied_aggregates -- -1 1.5 a -1 7.0 \N -2 4.5 b -3 7.5 c - --- !with_hint_groupby_pushdown_with_order_by_limit -- -1 -1 -2 -3 - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -1 -2 -3 - --- !with_hint_groupby_pushdown_complex_join_condition -- - --- !with_hint_groupby_pushdown_function_processed_columns -- -\N -1 -1 -1 - --- !with_hint_groupby_pushdown_nested_queries -- - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out deleted file mode 100644 index b5517743ee8d31..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_min_through_join.out +++ /dev/null @@ -1,592 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((min_t.score > 10)) -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((min_t.score > 10)) -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((min(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[min_t] -----------PhysicalOlapScan[min_t] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[min_t] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[min_t] -------------PhysicalOlapScan[min_t] - --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((t1.score > 50)) -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[min_t] -------------PhysicalOlapScan[min_t] - --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((min_t.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[min_t] ---------filter((min_t.id < 100)) -----------PhysicalOlapScan[min_t] - --- !with_hint_groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------filter((min_t.score > 10)) -------------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------filter((min_t.score > 10)) -------------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_having -- -PhysicalResultSink ---filter((min(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[GLOBAL] -------------PhysicalOlapScan[min_t] -----------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[min_t] -------------PhysicalOlapScan[min_t] -------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[min_t] -------------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[min_t] -------------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[min_t] ---------PhysicalOlapScan[min_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------filter((min_t.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[min_t] ---------filter((min_t.id < 100)) -----------PhysicalOlapScan[min_t] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_distinct_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_distinct_through_join_one_side.out deleted file mode 100644 index bb8366176a7ba6..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_distinct_through_join_one_side.out +++ /dev/null @@ -1,231 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -1 -2 -3 -6 - --- !groupby_pushdown_left_join -- -1 -2 -3 -6 - --- !groupby_pushdown_right_join -- -1 -2 -3 -6 - --- !groupby_pushdown_full_join -- -1 -2 -3 -6 - --- !groupby_pushdown_left_semi_join -- -1 -2 -3 -6 - --- !groupby_pushdown_left_anti_join -- - --- !groupby_pushdown_complex_conditions -- - --- !groupby_pushdown_with_aggregate -- -1 1.0 -2 2.0 -3 3.0 -6 2.0 - --- !groupby_pushdown_subquery -- - --- !groupby_pushdown_outer_join -- -1 -2 -3 -6 - --- !groupby_pushdown_deep_subquery -- - --- !groupby_pushdown_having -- - --- !groupby_pushdown_mixed_aggregates -- -1 1 -2 2 -3 3 -6 6 - --- !groupby_pushdown_multi_table_join -- -1 -2 -3 - --- !groupby_pushdown_with_order_by -- -1 -2 -3 -6 - --- !groupby_pushdown_multiple_equal_conditions -- -1 -2 -3 - --- !groupby_pushdown_equal_conditions_with_aggregate -- -1 1 -2 2 -3 3 - --- !groupby_pushdown_equal_conditions_non_aggregate -- -a 1 -b 2 -c 3 - --- !groupby_pushdown_equal_conditions_non_aggregate_with_aggregate -- -a 1 1 -b 2 2 -c 3 3 - --- !groupby_pushdown_with_where_clause -- - --- !groupby_pushdown_varied_aggregates -- -1 -2 -3 -6 - --- !groupby_pushdown_with_order_by_limit -- -1 -2 -3 -6 - --- !groupby_pushdown_alias_multiple_equal_conditions -- -1 -2 -3 - --- !groupby_pushdown_complex_join_condition -- - --- !groupby_pushdown_function_processed_columns -- -1 -2 -3 -6 - --- !groupby_pushdown_nested_queries -- - --- !with_hint_groupby_pushdown_basic -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_left_join -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_right_join -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_full_join -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_left_semi_join -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_left_anti_join -- - --- !with_hint_groupby_pushdown_complex_conditions -- - --- !with_hint_groupby_pushdown_with_aggregate -- -1 1.0 -2 2.0 -3 3.0 -6 2.0 - --- !with_hint_groupby_pushdown_subquery -- - --- !with_hint_groupby_pushdown_outer_join -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_deep_subquery -- - --- !with_hint_groupby_pushdown_having -- - --- !with_hint_groupby_pushdown_mixed_aggregates -- -1 1 -2 2 -3 3 -6 6 - --- !with_hint_groupby_pushdown_multi_table_join -- -1 -2 -3 - --- !with_hint_groupby_pushdown_with_order_by -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -1 -2 -3 - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -1 1 -2 2 -3 3 - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate -- -a 1 -b 2 -c 3 - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate -- -a 1 1 -b 2 2 -c 3 3 - --- !with_hint_groupby_pushdown_with_where_clause -- - --- !with_hint_groupby_pushdown_varied_aggregates -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_with_order_by_limit -- -1 -2 -3 -6 - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -1 -2 -3 - --- !with_hint_groupby_pushdown_complex_join_condition -- - --- !with_hint_groupby_pushdown_nested_queries -- - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out deleted file mode 100644 index 88420a14b13e15..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.out +++ /dev/null @@ -1,569 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------filter((sum_t.score > 10)) -----------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------filter((sum_t.score > 10)) -----------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((sum(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[sum_t] -----------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] -------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[sum_t] -------------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[sum_t] -------------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((sum_t.id < 100)) -----------PhysicalOlapScan[sum_t] ---------filter((sum_t.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[sum_t] - --- !with_hint_groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------filter((sum_t.score > 10)) -----------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------filter((sum_t.score > 10)) -----------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_having -- -PhysicalResultSink ---filter((sum(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[sum_t] -----------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] -------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[sum_t] -------------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[sum_t] -------------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t] ---------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - --- !with_hint_groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((sum_t.id < 100)) -----------PhysicalOlapScan[sum_t] ---------filter((sum_t.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[sum_t] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join -SyntaxError: - diff --git a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out b/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out deleted file mode 100644 index 3fce9ec9b1ab94..00000000000000 --- a/regression-test/data/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.out +++ /dev/null @@ -1,592 +0,0 @@ --- This file is automatically generated. You should know what you did if you want to edit this --- !groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------filter((sum_t_one_side.score > 10)) -----------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------filter((sum_t_one_side.score > 10)) -----------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_having -- -PhysicalResultSink ---filter((sum(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------PhysicalOlapScan[sum_t_one_side] -----------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] -------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[sum_t_one_side] -------------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------filter((t1.score > 50)) -----------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------PhysicalOlapScan[sum_t_one_side] -------------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - --- !groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((sum_t_one_side.id < 100)) -----------PhysicalOlapScan[sum_t_one_side] ---------filter((sum_t_one_side.score > 20) and (t1.id < 100)) -----------PhysicalOlapScan[sum_t_one_side] - --- !with_hint_groupby_pushdown_basic -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------filter((t2.score < 100)) -----------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_right_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[RIGHT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_full_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[FULL_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_left_semi_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_left_anti_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_ANTI_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_complex_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=((t1.name < t2.name)) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------hashAgg[GLOBAL] -----------filter((sum_t_one_side.score > 10)) -------------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_outer_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[LEFT_OUTER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_deep_subquery -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------hashAgg[GLOBAL] -----------filter((sum_t_one_side.score > 10)) -------------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_having -- -PhysicalResultSink ---filter((sum(t1.score) > 100)) -----hashAgg[GLOBAL] -------hashAgg[LOCAL] ---------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -----------hashAgg[GLOBAL] -------------PhysicalOlapScan[sum_t_one_side] -----------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_mixed_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multi_table_join -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashJoin[INNER_JOIN] hashCondition=((t1.name = t3.name)) otherCondition=() -------PhysicalOlapScan[sum_t_one_side] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[sum_t_one_side] -------------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by -- -PhysicalResultSink ---PhysicalQuickSort[MERGE_SORT] -----PhysicalQuickSort[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[sum_t_one_side] -------------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.name = t2.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_with_where_clause -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------hashAgg[GLOBAL] -----------filter((t1.score > 50)) -------------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_varied_aggregates -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_with_order_by_limit -- -PhysicalResultSink ---PhysicalTopN[MERGE_SORT] -----PhysicalTopN[LOCAL_SORT] -------hashAgg[GLOBAL] ---------hashAgg[LOCAL] -----------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() -------------hashAgg[GLOBAL] ---------------PhysicalOlapScan[sum_t_one_side] -------------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_alias_multiple_equal_conditions -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1_alias.id = t2_alias.id) and (t1_alias.name = t2_alias.name)) otherCondition=() ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_complex_join_condition -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id) and (t1.score = t2.score)) otherCondition=(( not (name = name))) ---------hashAgg[GLOBAL] -----------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - --- !with_hint_groupby_pushdown_function_processed_columns -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------PhysicalOlapScan[sum_t_one_side] ---------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: -UnUsed: use_push_down_agg_through_join_one_side -SyntaxError: - --- !with_hint_groupby_pushdown_nested_queries -- -PhysicalResultSink ---hashAgg[GLOBAL] -----hashAgg[LOCAL] -------hashJoin[INNER_JOIN] hashCondition=((t1.id = t2.id)) otherCondition=() ---------filter((sum_t_one_side.id < 100)) -----------PhysicalOlapScan[sum_t_one_side] ---------hashAgg[GLOBAL] -----------filter((sum_t_one_side.score > 20) and (t1.id < 100)) -------------PhysicalOlapScan[sum_t_one_side] - -Hint log: -Used: use_push_down_agg_through_join_one_side -UnUsed: -SyntaxError: - diff --git a/regression-test/data/shape_check/clickbench/query1.out b/regression-test/data/shape_check/clickbench/query1.out index f98c53e3d5fc4e..a9b6ddb696363a 100644 --- a/regression-test/data/shape_check/clickbench/query1.out +++ b/regression-test/data/shape_check/clickbench/query1.out @@ -1,9 +1,5 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ckbench_shape_1 -- PhysicalResultSink ---hashAgg[GLOBAL] -----PhysicalDistribute[DistributionSpecGather] -------hashAgg[LOCAL] ---------PhysicalProject -----------PhysicalStorageLayerAggregate[hits] +--PhysicalOneRowRelation diff --git a/regression-test/data/shape_check/ssb_sf100/shape/flat.out b/regression-test/data/shape_check/ssb_sf100/shape/flat.out index 3a180194ef57b5..b6910ae16e59c1 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/flat.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/flat.out @@ -3,13 +3,13 @@ PhysicalResultSink --PhysicalDistribute[DistributionSpecGather] ----PhysicalProject -------hashJoin[INNER_JOIN broadcast] hashCondition=((s.s_suppkey = l.lo_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey] +------hashJoin[INNER_JOIN broadcast] hashCondition=((p.p_partkey = l.lo_partkey)) otherCondition=() build RFs:RF2 p_partkey->[lo_partkey] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_custkey = l.lo_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((s.s_suppkey = l.lo_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((p.p_partkey = l.lo_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_custkey = l.lo_custkey)) otherCondition=() build RFs:RF0 c_custkey->[lo_custkey] ----------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 -----------------PhysicalOlapScan[part] -------------PhysicalOlapScan[customer] ---------PhysicalOlapScan[supplier] +----------------PhysicalOlapScan[customer] +------------PhysicalOlapScan[supplier] +--------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q1.1.out b/regression-test/data/shape_check/ssb_sf100/shape/q1.1.out index de05bf1c72f84f..126c295ee429f9 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q1.1.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q1.1.out @@ -5,11 +5,11 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 d_datekey->[lo_orderdate] -------------PhysicalProject ---------------filter((lineorder.lo_discount <= 3) and (lineorder.lo_discount >= 1) and (lineorder.lo_quantity < 25)) -----------------PhysicalOlapScan[lineorder] apply RFs: RF0 +----------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 lo_orderdate->[d_datekey] ------------PhysicalProject --------------filter((dates.d_year = 1993)) -----------------PhysicalOlapScan[dates] +----------------PhysicalOlapScan[dates] apply RFs: RF0 +------------PhysicalProject +--------------filter((lineorder.lo_discount <= 3) and (lineorder.lo_discount >= 1) and (lineorder.lo_quantity < 25)) +----------------PhysicalOlapScan[lineorder] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q1.2.out b/regression-test/data/shape_check/ssb_sf100/shape/q1.2.out index a43ea0bce0fbf6..3962410bc6ebf0 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q1.2.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q1.2.out @@ -5,11 +5,11 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 d_datekey->[lo_orderdate] -------------PhysicalProject ---------------filter((lineorder.lo_discount <= 6) and (lineorder.lo_discount >= 4) and (lineorder.lo_quantity <= 35) and (lineorder.lo_quantity >= 26)) -----------------PhysicalOlapScan[lineorder] apply RFs: RF0 +----------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 lo_orderdate->[d_datekey] ------------PhysicalProject --------------filter((dates.d_yearmonth = 'Jan1994')) -----------------PhysicalOlapScan[dates] +----------------PhysicalOlapScan[dates] apply RFs: RF0 +------------PhysicalProject +--------------filter((lineorder.lo_discount <= 6) and (lineorder.lo_discount >= 4) and (lineorder.lo_quantity <= 35) and (lineorder.lo_quantity >= 26)) +----------------PhysicalOlapScan[lineorder] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q1.3.out b/regression-test/data/shape_check/ssb_sf100/shape/q1.3.out index 7775cb114f7e58..24f7a9f2f10670 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q1.3.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q1.3.out @@ -5,11 +5,11 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 d_datekey->[lo_orderdate] -------------PhysicalProject ---------------filter((lineorder.lo_discount <= 7) and (lineorder.lo_discount >= 5) and (lineorder.lo_quantity <= 35) and (lineorder.lo_quantity >= 26)) -----------------PhysicalOlapScan[lineorder] apply RFs: RF0 +----------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 lo_orderdate->[d_datekey] ------------PhysicalProject --------------filter((dates.d_weeknuminyear = 6) and (dates.d_year = 1994)) -----------------PhysicalOlapScan[dates] +----------------PhysicalOlapScan[dates] apply RFs: RF0 +------------PhysicalProject +--------------filter((lineorder.lo_discount <= 7) and (lineorder.lo_discount >= 5) and (lineorder.lo_quantity <= 35) and (lineorder.lo_quantity >= 26)) +----------------PhysicalOlapScan[lineorder] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q2.1.out b/regression-test/data/shape_check/ssb_sf100/shape/q2.1.out index c1f86cac10185d..9eacb36ff4f118 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q2.1.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q2.1.out @@ -8,19 +8,19 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[lo_partkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 lo_orderdate->[d_datekey] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +----------------------------PhysicalOlapScan[dates] apply RFs: RF0 --------------------------PhysicalProject -----------------------------filter((part.p_category = 'MFGR#12')) -------------------------------PhysicalOlapScan[part] +----------------------------PhysicalOlapScan[lineorder] apply RFs: RF1 RF2 ----------------------PhysicalProject -------------------------filter((supplier.s_region = 'AMERICA')) ---------------------------PhysicalOlapScan[supplier] +------------------------filter((part.p_category = 'MFGR#12')) +--------------------------PhysicalOlapScan[part] ------------------PhysicalProject ---------------------PhysicalOlapScan[dates] +--------------------filter((supplier.s_region = 'AMERICA')) +----------------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q2.2.out b/regression-test/data/shape_check/ssb_sf100/shape/q2.2.out index 5b7b82f23355a2..d2c098eb211896 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q2.2.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q2.2.out @@ -8,19 +8,19 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[lo_partkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 lo_orderdate->[d_datekey] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +----------------------------PhysicalOlapScan[dates] apply RFs: RF0 --------------------------PhysicalProject -----------------------------filter((supplier.s_region = 'ASIA')) -------------------------------PhysicalOlapScan[supplier] +----------------------------PhysicalOlapScan[lineorder] apply RFs: RF1 RF2 ----------------------PhysicalProject ------------------------filter((part.p_brand <= 'MFGR#2228') and (part.p_brand >= 'MFGR#2221')) --------------------------PhysicalOlapScan[part] ------------------PhysicalProject ---------------------PhysicalOlapScan[dates] +--------------------filter((supplier.s_region = 'ASIA')) +----------------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q2.3.out b/regression-test/data/shape_check/ssb_sf100/shape/q2.3.out index a9403d53172ab6..20cd36e7468594 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q2.3.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q2.3.out @@ -9,19 +9,19 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[lo_partkey] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[lo_partkey] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 lo_orderdate->[d_datekey] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +------------------------------PhysicalOlapScan[dates] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------filter((part.p_brand = 'MFGR#2239')) ---------------------------------PhysicalOlapScan[part] +------------------------------PhysicalOlapScan[lineorder] apply RFs: RF1 RF2 ------------------------PhysicalProject ---------------------------filter((supplier.s_region = 'EUROPE')) -----------------------------PhysicalOlapScan[supplier] +--------------------------filter((part.p_brand = 'MFGR#2239')) +----------------------------PhysicalOlapScan[part] --------------------PhysicalProject -----------------------PhysicalOlapScan[dates] +----------------------filter((supplier.s_region = 'EUROPE')) +------------------------PhysicalOlapScan[supplier] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q3.1.out b/regression-test/data/shape_check/ssb_sf100/shape/q3.1.out index 40096b292e84e7..cb521eacc54314 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q3.1.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q3.1.out @@ -10,17 +10,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[lo_custkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((supplier.s_region = 'ASIA')) -------------------------------PhysicalOlapScan[supplier] +----------------------------filter((customer.c_region = 'ASIA')) +------------------------------PhysicalOlapScan[customer] ----------------------PhysicalProject -------------------------filter((customer.c_region = 'ASIA')) ---------------------------PhysicalOlapScan[customer] +------------------------filter((supplier.s_region = 'ASIA')) +--------------------------PhysicalOlapScan[supplier] ------------------PhysicalProject --------------------filter((dates.d_year <= 1997) and (dates.d_year >= 1992)) ----------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q3.2.out b/regression-test/data/shape_check/ssb_sf100/shape/q3.2.out index 7d0b454caac190..e572dfdcf6358d 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q3.2.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q3.2.out @@ -10,17 +10,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[lo_custkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((supplier.s_nation = 'UNITED STATES')) -------------------------------PhysicalOlapScan[supplier] +----------------------------filter((customer.c_nation = 'UNITED STATES')) +------------------------------PhysicalOlapScan[customer] ----------------------PhysicalProject -------------------------filter((customer.c_nation = 'UNITED STATES')) ---------------------------PhysicalOlapScan[customer] +------------------------filter((supplier.s_nation = 'UNITED STATES')) +--------------------------PhysicalOlapScan[supplier] ------------------PhysicalProject --------------------filter((dates.d_year <= 1997) and (dates.d_year >= 1992)) ----------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q3.3.out b/regression-test/data/shape_check/ssb_sf100/shape/q3.3.out index 628f3df9a5831a..09b9b5ad9019de 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q3.3.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q3.3.out @@ -10,17 +10,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[lo_custkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5')) -------------------------------PhysicalOlapScan[supplier] +----------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5')) +------------------------------PhysicalOlapScan[customer] ----------------------PhysicalProject -------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5')) ---------------------------PhysicalOlapScan[customer] +------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5')) +--------------------------PhysicalOlapScan[supplier] ------------------PhysicalProject --------------------filter((dates.d_year <= 1997) and (dates.d_year >= 1992)) ----------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q3.4.out b/regression-test/data/shape_check/ssb_sf100/shape/q3.4.out index f725ccdbc2c1f7..5fd0e2b2cb7655 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q3.4.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q3.4.out @@ -10,17 +10,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[lo_suppkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[lo_custkey] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5')) -------------------------------PhysicalOlapScan[supplier] +----------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5')) +------------------------------PhysicalOlapScan[customer] ----------------------PhysicalProject -------------------------filter(c_city IN ('UNITED KI1', 'UNITED KI5')) ---------------------------PhysicalOlapScan[customer] +------------------------filter(s_city IN ('UNITED KI1', 'UNITED KI5')) +--------------------------PhysicalOlapScan[supplier] ------------------PhysicalProject --------------------filter((dates.d_yearmonth = 'Dec1997')) ----------------------PhysicalOlapScan[dates] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q4.1.out b/regression-test/data/shape_check/ssb_sf100/shape/q4.1.out index 63d8d12e64f165..95a6387c0eab3f 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q4.1.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q4.1.out @@ -8,24 +8,24 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF3 d_datekey->[lo_orderdate] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF3 p_partkey->[lo_partkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF2 p_partkey->[lo_partkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 lo_orderdate->[d_datekey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[dates] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((supplier.s_region = 'AMERICA')) -----------------------------------PhysicalOlapScan[supplier] +--------------------------------PhysicalOlapScan[lineorder] apply RFs: RF1 RF2 RF3 --------------------------PhysicalProject ----------------------------filter((customer.c_region = 'AMERICA')) ------------------------------PhysicalOlapScan[customer] ----------------------PhysicalProject -------------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2')) ---------------------------PhysicalOlapScan[part] +------------------------filter((supplier.s_region = 'AMERICA')) +--------------------------PhysicalOlapScan[supplier] ------------------PhysicalProject ---------------------PhysicalOlapScan[dates] +--------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2')) +----------------------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q4.2.out b/regression-test/data/shape_check/ssb_sf100/shape/q4.2.out index efc1e0061ed88d..f48121cdf10849 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q4.2.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q4.2.out @@ -10,22 +10,22 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF3 p_partkey->[lo_partkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF2 c_custkey->[lo_custkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF1 d_datekey->[lo_orderdate] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 c_custkey->[lo_custkey] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 d_datekey->[lo_orderdate] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 RF3 ------------------------------PhysicalProject ---------------------------------filter((supplier.s_region = 'AMERICA')) -----------------------------------PhysicalOlapScan[supplier] +--------------------------------filter(d_year IN (1997, 1998)) +----------------------------------PhysicalOlapScan[dates] --------------------------PhysicalProject -----------------------------filter(d_year IN (1997, 1998)) -------------------------------PhysicalOlapScan[dates] +----------------------------filter((customer.c_region = 'AMERICA')) +------------------------------PhysicalOlapScan[customer] ----------------------PhysicalProject -------------------------filter((customer.c_region = 'AMERICA')) ---------------------------PhysicalOlapScan[customer] +------------------------filter((supplier.s_region = 'AMERICA')) +--------------------------PhysicalOlapScan[supplier] ------------------PhysicalProject --------------------filter(p_mfgr IN ('MFGR#1', 'MFGR#2')) ----------------------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/ssb_sf100/shape/q4.3.out b/regression-test/data/shape_check/ssb_sf100/shape/q4.3.out index 43c0f15a1ecaff..a230de4d1ab6d0 100644 --- a/regression-test/data/shape_check/ssb_sf100/shape/q4.3.out +++ b/regression-test/data/shape_check/ssb_sf100/shape/q4.3.out @@ -8,24 +8,24 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF3 lo_custkey->[c_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF3 p_partkey->[lo_partkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[customer] apply RFs: RF3 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF2 d_datekey->[lo_orderdate] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[lo_suppkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[lo_partkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_custkey = customer.c_custkey)) otherCondition=() build RFs:RF1 lo_custkey->[c_custkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[lo_suppkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineorder.lo_orderdate = dates.d_datekey)) otherCondition=() build RFs:RF0 d_datekey->[lo_orderdate] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalOlapScan[lineorder] apply RFs: RF0 RF2 RF3 ------------------------------PhysicalProject ---------------------------------filter((supplier.s_nation = 'UNITED STATES')) -----------------------------------PhysicalOlapScan[supplier] ---------------------------PhysicalProject -----------------------------filter((part.p_category = 'MFGR#14')) -------------------------------PhysicalOlapScan[part] +--------------------------------filter(d_year IN (1997, 1998)) +----------------------------------PhysicalOlapScan[dates] ----------------------PhysicalProject -------------------------filter(d_year IN (1997, 1998)) ---------------------------PhysicalOlapScan[dates] +------------------------filter((supplier.s_nation = 'UNITED STATES')) +--------------------------PhysicalOlapScan[supplier] +------------------PhysicalProject +--------------------filter((part.p_category = 'MFGR#14')) +----------------------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/tpcds_sf100/constraints/query23.out b/regression-test/data/shape_check/tpcds_sf100/constraints/query23.out index 17c6c0e8b7a3e1..24bd387da5bdc6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/constraints/query23.out +++ b/regression-test/data/shape_check/tpcds_sf100/constraints/query23.out @@ -5,19 +5,17 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalDistribute[DistributionSpecHash] -------------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] +--------------PhysicalProject +----------------PhysicalOlapScan[item] apply RFs: RF1 --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -----------------------PhysicalProject -------------------------filter(d_year IN (2000, 2001, 2002, 2003)) ---------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------filter(d_year IN (2000, 2001, 2002, 2003)) +----------------------PhysicalOlapScan[date_dim] --PhysicalCteAnchor ( cteId=CTEId#2 ) ----PhysicalCteProducer ( cteId=CTEId#2 ) ------PhysicalProject @@ -53,29 +51,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF4 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF3 item_sk->[cs_item_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF5 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF8 ws_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 ws_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF7 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 item_sk->[ws_item_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF8 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query1.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query1.out index d5077dadd43722..4cc300a40ec952 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query1.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query1.out @@ -18,20 +18,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +--------------------PhysicalOlapScan[customer] apply RFs: RF2 ------------------PhysicalProject ---------------------filter((store.s_state = 'SD')) -----------------------PhysicalOlapScan[store] ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 +----------------------PhysicalProject +------------------------filter((store.s_state = 'SD')) +--------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query10.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query10.out index 5fb40519b131d5..d5b06f584772b8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query10.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query10.out @@ -10,12 +10,12 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() -------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] @@ -25,7 +25,7 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF5 +------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -33,10 +33,10 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalProject -----------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) -------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalProject +--------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query11.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query11.out index 3bd9545b122f01..0ee0b2908adc05 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query11.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query11.out @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.dyear = 2002) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query13.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query13.out index aabacb20204a8e..37915578cb56c7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query13.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query13.out @@ -13,12 +13,12 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] apply RFs: RF0 ----------------------------PhysicalProject ------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject --------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown')]] and cd_education_status IN ('4 yr Degree', 'College', 'Unknown') and cd_marital_status IN ('D', 'M', 'S')) ----------------------------PhysicalOlapScan[customer_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query14.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query14.out index d3427825e08894..b244860c5dad21 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query14.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query14.out @@ -3,52 +3,46 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() ---------PhysicalIntersect RFV2: RF19[i_brand_id->i_brand_id] RF20[i_brand_id->i_brand_id] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 brand_id->[i_brand_id];RF7 class_id->[i_class_id];RF8 category_id->[i_category_id] +--------PhysicalProject +----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +--------PhysicalIntersect RFV2: RF19[brand_id->i_brand_id] RF20[brand_id->i_brand_id] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------PhysicalProject -----------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------PhysicalProject +------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] RFV2: RF19 +----------------------PhysicalOlapScan[item] apply RFs: RF2 RFV2: RF19 --------------------PhysicalProject -----------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[item] apply RFs: RF4 RFV2: RF20 --------------------PhysicalProject -----------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] ---------PhysicalProject -----------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[web_sales] apply RFs: RF5 +----------------PhysicalProject +------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] @@ -107,7 +101,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() -------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF15 --------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) @@ -129,7 +123,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() -------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF18 --------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query15.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query15.out index 5825559155b8e7..15d95f8bdf1c6f 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query15.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query15.out @@ -10,15 +10,15 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 cs_bill_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject --------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query16.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query16.out index 02559f87cb35c3..28da4f0aec939d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query16.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query16.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF4 cc_call_center_sk->[cs_call_center_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[cs_ship_addr_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF1 cs_order_number->[cr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((customer_address.ca_state = 'WV')) -----------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -------------------------PhysicalOlapScan[call_center] +----------------------filter((customer_address.ca_state = 'WV')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +--------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query17.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query17.out index c10cc616923d3c..f5771465f5a414 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query17.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query17.out @@ -9,36 +9,36 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +----------------------PhysicalOlapScan[item] apply RFs: RF9 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF8 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF6 +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF7 -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((d1.d_quarter_name = '2001Q1')) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((d1.d_quarter_name = '2001Q1')) +----------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query18.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query18.out index dcda7d5d7eb3ee..2319a393aab73e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query18.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query18.out @@ -10,33 +10,33 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 c_current_cdemo_sk->[cd_demo_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF2 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cs_bill_customer_sk] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF5 +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 ------------------------------------------PhysicalProject --------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) ----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject ----------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) ------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) ----------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter((date_dim.d_year = 1998)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_year = 1998)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query19.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query19.out index 4e2627d552dd1e..d9ecce18360cf4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query19.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query19.out @@ -11,25 +11,25 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] +--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((item.i_manager_id = 2)) +------------------------------------PhysicalOlapScan[item] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[customer] ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 2)) -----------------------------PhysicalOlapScan[item] +--------------------------PhysicalOlapScan[customer_address] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query2.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query2.out index 5236760c47c849..98b949d62ee57d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query2.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query2.out @@ -21,19 +21,19 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 53))) otherCondition=() --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 53))) otherCondition=() -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] -----------------------PhysicalProject -------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF1 -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 1999)) ---------------------------PhysicalOlapScan[date_dim] +----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF2 +------------------PhysicalProject +--------------------filter((date_dim.d_year = 1998)) +----------------------PhysicalOlapScan[date_dim] --------------PhysicalProject -----------------filter((date_dim.d_year = 1998)) -------------------PhysicalOlapScan[date_dim] +----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] +------------------PhysicalProject +--------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF1 +------------------PhysicalProject +--------------------filter((date_dim.d_year = 1999)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query21.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query21.out index db506f0acaa0e9..c81df7ac561759 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query21.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query21.out @@ -13,10 +13,10 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() -----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 RF2 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 inv_warehouse_sk->[w_warehouse_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[warehouse] +------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 +----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 RF2 ------------------------PhysicalProject --------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query22.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query22.out index 7f10ebd7894ce7..0e006cb2e74317 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query22.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query22.out @@ -10,14 +10,14 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 +----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query23.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query23.out index 9bed8f5dcbca99..c716d437f1648b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query23.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query23.out @@ -8,16 +8,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ----------------------PhysicalProject -------------------------PhysicalOlapScan[item] +------------------------filter(d_year IN (2000, 2001, 2002, 2003)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter(d_year IN (2000, 2001, 2002, 2003)) -----------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) ----PhysicalCteProducer ( cteId=CTEId#2 ) ------PhysicalProject @@ -55,13 +55,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF4 --------------------------PhysicalProject -----------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ----------------------PhysicalProject ------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] @@ -71,7 +71,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 ws_bill_customer_sk->[c_customer_sk] --------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF7 --------------------------PhysicalProject -----------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query24.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query24.out index 95e1d01aeae912..4fcd9d102a31b4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query24.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query24.out @@ -7,46 +7,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_zip->[ca_zip];RF6 s_store_sk->[ss_store_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk) and (store.s_zip = customer_address.ca_zip)) otherCondition=(( not (c_birth_country = upper(ca_country)))) ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +--------------------------PhysicalOlapScan[item] apply RFs: RF3 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF6 +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------------filter((store.s_market_id = 8)) +--------------------------------PhysicalOlapScan[store] --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] apply RFs: RF5 +----------------------PhysicalOlapScan[customer] ----------------PhysicalProject -------------------filter((store.s_market_id = 8)) ---------------------PhysicalOlapScan[store] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalProject ---------------------------filter((ssales.i_color = 'beige')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecGather] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalQuickSort[LOCAL_SORT] +--------PhysicalProject +----------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecGather] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------filter((ssales.i_color = 'beige')) +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query25.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query25.out index 80edfc46e41f5d..86294b1c768aea 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query25.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query25.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF6 +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF7 ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) +--------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) +----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] -------------------PhysicalProject ---------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query26.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query26.out index 52f628f8b600a2..4000cd04d9792a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query26.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query26.out @@ -10,21 +10,21 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[cs_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() +------------------------PhysicalOlapScan[item] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'S')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 2001)) ---------------------------PhysicalOlapScan[date_dim] +----------------------------filter((date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query27.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query27.out index 886eca75570635..177d29256e307a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query27.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query27.out @@ -10,24 +10,24 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject ------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'D')) --------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) +------------------------------PhysicalOlapScan[store] ----------------------PhysicalProject -------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) ---------------------------PhysicalOlapScan[store] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query29.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query29.out index b09148bd528c7b..c96a8dc1d4403c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query29.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query29.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF6 +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF7 ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) +--------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) +----------------------------filter(d_year IN (1999, 2000, 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(d_year IN (1999, 2000, 2001)) ---------------------------PhysicalOlapScan[date_dim] -------------------PhysicalProject ---------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query30.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query30.out index da2d98e86ac2d3..2187690923a6e6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query30.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query30.out @@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +----------------------PhysicalOlapScan[web_returns] apply RFs: RF0 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((date_dim.d_year = 2002)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((date_dim.d_year = 2002)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalProject ------PhysicalLazyMaterialize[materializedSlots:(customer.c_customer_id,ctr1.ctr_total_return) lazySlots:(customer.c_birth_country,customer.c_birth_day,customer.c_birth_month,customer.c_birth_year,customer.c_email_address,customer.c_first_name,customer.c_last_name,customer.c_last_review_date_sk,customer.c_login,customer.c_preferred_cust_flag,customer.c_salutation)] @@ -24,20 +24,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecGather] ------------PhysicalTopN[LOCAL_SORT] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject ----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_birth_month,customer.c_birth_year,customer.c_birth_country,customer.c_login,customer.c_email_address,customer.c_last_review_date_sk,customer.c_salutation,customer.c_first_name,customer.c_last_name,customer.c_preferred_cust_flag,customer.c_birth_day)] apply RFs: RF3 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((customer_address.ca_state = 'IN')) --------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query31.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query31.out index 6477a6812c0a29..218ed4d3d7bf87 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query31.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query31.out @@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------PhysicalProject @@ -24,37 +24,37 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 +------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +------------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) -----------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county] ---------------------------PhysicalProject -----------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) -------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() build RFs:RF4 ca_county->[ca_county] ----------------------------PhysicalProject ------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 2000)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF6 RF7 RF8 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 RF7 RF8 ----------------------------PhysicalProject ------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 2000)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 RF8 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 RF7 RF8 +--------------------------PhysicalProject +----------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 RF8 diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query33.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query33.out index 0416c3f39cb340..7e78fe98066b87 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query33.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query33.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query34.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query34.out index a12df581f106ae..206ca91734dce9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query34.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query34.out @@ -5,7 +5,9 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] +------------PhysicalProject +--------------PhysicalOlapScan[customer] apply RFs: RF3 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] @@ -27,6 +29,4 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) ----------------------------PhysicalOlapScan[household_demographics] -------------PhysicalProject ---------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query35.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query35.out index c14ce7550a3069..b377a9e3c868a8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query35.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query35.out @@ -10,12 +10,14 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() -------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] @@ -33,8 +35,6 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer_demographics] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query36.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query36.out index 5e091a8245be48..c84b04082b74d2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query36.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query36.out @@ -17,16 +17,16 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() +--------------------------------------PhysicalOlapScan[item] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalProject ---------------------------------------filter((d1.d_year = 2002)) -----------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------filter((d1.d_year = 2002)) +--------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query37.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query37.out index 756dbd1de4efea..cc63716e4ba212 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query37.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query37.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query38.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query38.out index 1008fac09b2f11..fb5c109395a15a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query38.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query38.out @@ -12,42 +12,42 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] RFV2: RF6 +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] RFV2: RF6 ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] RFV2: RF7 +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query39.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query39.out index d906073878075f..747d5814fc09c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query39.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query39.out @@ -5,22 +5,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0)) --------hashAgg[GLOBAL] -----------PhysicalDistribute[DistributionSpecHash] -------------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() ---------------------------PhysicalOlapScan[inventory] apply RFs: RF2 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -----------------------PhysicalProject -------------------------PhysicalOlapScan[warehouse] +--------------------PhysicalOlapScan[warehouse] apply RFs: RF1 ------------------PhysicalProject ---------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) -----------------------PhysicalOlapScan[date_dim] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 inv_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF0 +----------------------PhysicalOlapScan[inventory] apply RFs: RF2 +--------------PhysicalProject +----------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) +------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query4.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query4.out index bd7163c859b19e..35dd0e22c0eede 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query4.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query4.out @@ -45,19 +45,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] ----------------------PhysicalProject ------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] ----------------------------PhysicalProject ------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query40.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query40.out index 1465471817388b..b394b022d9b693 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query40.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query40.out @@ -8,19 +8,19 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 cs_warehouse_sk->[w_warehouse_sk] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +----------------------------PhysicalOlapScan[warehouse] apply RFs: RF2 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cs_order_number->[cr_order_number];RF1 cs_item_sk->[cr_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 +--------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 ----------------------PhysicalProject ------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query44.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query44.out index ce6d0a23f7b2e6..cab84e9ffbd10a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query44.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query44.out @@ -19,53 +19,49 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((V11.rnk < 11)) ----------------------------PhysicalWindow -------------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------------PhysicalPartitionTopN +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject -----------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) -------------------------------------------PhysicalProject ---------------------------------------------hashAgg[GLOBAL] -----------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((ss1.ss_store_sk = 146)) -------------------------------------------------------PhysicalOlapScan[store_sales] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------------PhysicalProject ---------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) -------------------------------------------------------------PhysicalOlapScan[store_sales] +----------------------------------------PhysicalAssertNumRows +------------------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------------------PhysicalProject +----------------------------------------------hashAgg[GLOBAL] +------------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------------hashAgg[LOCAL] +----------------------------------------------------PhysicalProject +------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) +--------------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------PhysicalProject +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 146)) +--------------------------------------------------PhysicalOlapScan[store_sales] ------------------------PhysicalProject --------------------------filter((V21.rnk < 11)) ----------------------------PhysicalWindow -------------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------------PhysicalPartitionTopN +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) +--------------------------------------PhysicalProject +----------------------------------------PhysicalAssertNumRows +------------------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------------------PhysicalProject +----------------------------------------------hashAgg[GLOBAL] +------------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------------hashAgg[LOCAL] +----------------------------------------------------PhysicalProject +------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) +--------------------------------------------------------PhysicalOlapScan[store_sales] --------------------------------------PhysicalProject -----------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) -------------------------------------------PhysicalProject ---------------------------------------------hashAgg[GLOBAL] -----------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((ss1.ss_store_sk = 146)) -------------------------------------------------------PhysicalOlapScan[store_sales] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------------PhysicalProject ---------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) -------------------------------------------------------------PhysicalOlapScan[store_sales] +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 146)) +--------------------------------------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query45.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query45.out index 7270fe9092a53b..d689b9d9d64b56 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query45.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query45.out @@ -13,15 +13,15 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 ws_bill_customer_sk->[c_customer_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject --------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query46.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query46.out index 26ac77a46ec8ac..cd307c3573e0f2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query46.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query46.out @@ -7,23 +7,21 @@ PhysicalResultSink --------PhysicalProject ----------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ss_hdemo_sk] +--------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ------------------------------------PhysicalProject --------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query47.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query47.out index c04dc536e6bbef..f03f5ceae87b08 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query47.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query47.out @@ -16,11 +16,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ------------------------------PhysicalProject --------------------------------filter(OR[(date_dim.d_year = 2001),AND[(date_dim.d_year = 2000),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2002),(date_dim.d_moy = 1)]] and d_year IN (2000, 2001, 2002)) ----------------------------------PhysicalOlapScan[date_dim] @@ -32,7 +32,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] ----------------PhysicalProject ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 ----------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query48.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query48.out index aef568a41842bb..bf933c37426541 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query48.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query48.out @@ -11,12 +11,12 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF0 ------------------------PhysicalProject --------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] --------------------PhysicalProject ----------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'U', 'W')) ------------------------PhysicalOlapScan[customer_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out index 0463d58df08fcf..d4961bd2428e6d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query49.out @@ -30,13 +30,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 ws_order_number->[wr_order_number];RF1 ws_item_sk->[wr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -62,13 +62,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number];RF4 cs_item_sk->[cr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -94,13 +94,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF8 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query5.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query5.out index 8983f656899760..ec57585eac12e7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query5.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query5.out @@ -35,21 +35,21 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk] ------------------------------------PhysicalUnion --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_page] +--------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] @@ -64,11 +64,11 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_sales] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query50.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query50.out index 8bdf05df39ed98..de72e13c5324a1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query50.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query50.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[sr_returned_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 ss_sold_date_sk->[d_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_ticket_number->[ss_ticket_number];RF1 sr_item_sk->[ss_item_sk];RF2 sr_customer_sk->[ss_customer_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +----------------------------PhysicalOlapScan[store] apply RFs: RF3 +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] -----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[store_sales] ------------------PhysicalProject --------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query51.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query51.out index 9b4742d60618ee..134e4fdf28c8e7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query51.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query51.out @@ -18,9 +18,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -31,9 +31,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query54.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query54.out index 84b5754b67aedb..e124ce2b455011 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query54.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query54.out @@ -10,49 +10,49 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 ca_county->[s_county];RF6 ca_state->[s_state] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 +----------------------------------PhysicalOlapScan[store] apply RFs: RF5 RF6 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() ------------------------------------PhysicalProject ---------------------------------------hashAgg[GLOBAL] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() ---------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] +------------------------------------------hashAgg[GLOBAL] +--------------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject ---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] -----------------------------------------------------PhysicalUnion -------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() +----------------------------------------------------PhysicalProject +------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] +------------------------------------------------------------PhysicalUnion +--------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +--------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) +----------------------------------------------------------------PhysicalOlapScan[item] --------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------------------------PhysicalProject -------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) ---------------------------------------------------------PhysicalOlapScan[item] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) -----------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[customer] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) +------------------------------------------------------PhysicalOlapScan[customer] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) --------------------------------PhysicalAssertNumRows ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[GLOBAL] @@ -61,12 +61,16 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalAssertNumRows -------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) -------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) +------------------------------------PhysicalAssertNumRows +--------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +--------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query56.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query56.out index ef5a9edba623fc..73c8e446f4cdbb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query56.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query56.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query57.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query57.out index 12bdb0c331739c..90ca63ae673efa 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query57.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query57.out @@ -16,11 +16,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 cs_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ------------------------------PhysicalProject --------------------------------filter(OR[(date_dim.d_year = 1999),AND[(date_dim.d_year = 1998),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2000),(date_dim.d_moy = 1)]] and d_year IN (1998, 1999, 2000)) ----------------------------------PhysicalOlapScan[date_dim] @@ -32,7 +32,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] ----------------PhysicalProject ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 ----------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query58.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query58.out index da423384e2de6a..3b3044c27ecdb8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query58.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query58.out @@ -5,82 +5,82 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev))) build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev))) build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF12 item_id->[i_item_id] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 ws_item_sk->[i_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_date = '2001-03-24')) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cs_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date = '2001-03-24')) --------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF13 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date = '2001-03-24')) --------------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] -------------------------PhysicalProject ---------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_date = '2001-03-24')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query59.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query59.out index 5e3aac2f739c01..e6f93202c76782 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query59.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query59.out @@ -16,27 +16,27 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF4 s_store_id2->[s_store_id];RF5 expr_(cast(d_week_seq2 as BIGINT) - 52)->[cast(d_week_seq as BIGINT)] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF5 RF6 +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 ----------------------PhysicalProject -------------------------PhysicalOlapScan[store] apply RFs: RF4 +------------------------PhysicalOlapScan[store] apply RFs: RF5 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +--------------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) +----------------------PhysicalOlapScan[date_dim] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() ---------------------------PhysicalProject -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 ----------------------PhysicalProject -------------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) ---------------------------PhysicalOlapScan[date_dim] ---------------PhysicalProject -----------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) -------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[store] +------------------PhysicalProject +--------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query6.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query6.out index 3a5d6b4d4405d6..567eed2483b54a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query6.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query6.out @@ -12,33 +12,33 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF4 d_month_seq->[d_month_seq] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() +--------------------------PhysicalAssertNumRows +----------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------hashAgg[GLOBAL] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------hashAgg[LOCAL] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() ------------------------------------------PhysicalProject --------------------------------------------PhysicalOlapScan[customer_address] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] ---------------------------PhysicalAssertNumRows -----------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------hashAgg[LOCAL] -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) -----------------------------------------PhysicalOlapScan[date_dim] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query60.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query60.out index 403d74c71ecae1..2c2038cf390154 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query60.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query60.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query61.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query61.out index 62da8c9cb21a0f..dae2a7ecb98546 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query61.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query61.out @@ -12,26 +12,26 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 p_promo_sk->[ss_promo_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 RF10 --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer] apply RFs: RF9 +----------------------------------------filter((store.s_gmt_offset = -7.00)) +------------------------------------------PhysicalOlapScan[store] ----------------------------------PhysicalProject -------------------------------------filter((store.s_gmt_offset = -7.00)) ---------------------------------------PhysicalOlapScan[store] +------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) +--------------------------------------PhysicalOlapScan[promotion] ------------------------------PhysicalProject ---------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) -----------------------------------PhysicalOlapScan[promotion] +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 ----------------------PhysicalProject ------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------PhysicalOlapScan[customer_address] @@ -46,21 +46,21 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------------------filter((store.s_gmt_offset = -7.00)) +--------------------------------------PhysicalOlapScan[store] ------------------------------PhysicalProject ---------------------------------filter((store.s_gmt_offset = -7.00)) -----------------------------------PhysicalOlapScan[store] +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] apply RFs: RF3 ----------------------PhysicalProject ------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query62.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query62.out index 582c27536d2a1b..d1813348a94190 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query62.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query62.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 ws_web_site_sk->[web_site_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() +------------------------PhysicalOlapScan[web_site] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 ws_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[ship_mode] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_site] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query65.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query65.out index aa86cd34a16293..ba604f3a1fc63e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query65.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query65.out @@ -7,35 +7,35 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashAgg[LOCAL] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF4 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] apply RFs: RF4 ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[ss_store_sk] ----------------hashAgg[GLOBAL] ------------------PhysicalProject --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ----------------------------------PhysicalOlapScan[date_dim] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] +--------------------PhysicalProject +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] apply RFs: RF2 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF1 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF1 +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query66.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query66.out index 4e962a3cc391e4..3083f5d059d3c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query66.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query66.out @@ -20,11 +20,11 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[warehouse] +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -44,11 +44,11 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 cs_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF4 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[warehouse] +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query68.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query68.out index 327930cde7b3c0..abe7244f9940ba 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query68.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query68.out @@ -9,23 +9,21 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ss_hdemo_sk] +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[customer_address] +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) --------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query69.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query69.out index e0bbeea823735d..28d0818b73ca4b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query69.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query69.out @@ -9,12 +9,12 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() -----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] @@ -24,7 +24,7 @@ PhysicalResultSink --------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF5 +----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ----------------------------------PhysicalProject @@ -33,10 +33,10 @@ PhysicalResultSink ------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_demographics] +------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter(ca_state IN ('MI', 'TX', 'VA')) -----------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query7.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query7.out index f47da720468166..0ca8a686c2c672 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query7.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query7.out @@ -10,21 +10,21 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +------------------------PhysicalOlapScan[item] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 2001)) ---------------------------PhysicalOlapScan[date_dim] +----------------------------filter((date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query70.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query70.out index 9c9d7b7638d6a5..3401e56541bcfb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query70.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query70.out @@ -31,11 +31,11 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------------------PhysicalOlapScan[store] apply RFs: RF0 --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store] +----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) --------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query72.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query72.out index 3a93e8ed707328..b27ed2350038ef 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query72.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query72.out @@ -8,47 +8,47 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk) and (d1.d_week_seq = d2.d_week_seq)) otherCondition=((cast(d_date as DATETIMEV2(0)) > cast((cast(d_date as BIGINT) + 5) as DATETIMEV2(0)))) build RFs:RF7 d_week_seq->[d_week_seq];RF8 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() build RFs:RF10 cs_item_sk->[cr_item_sk];RF11 cs_order_number->[cr_order_number] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF6 hd_demo_sk->[cs_bill_hdemo_sk] +--------------------PhysicalOlapScan[catalog_returns] apply RFs: RF10 RF11 +------------------PhysicalProject +--------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 cs_promo_sk->[p_promo_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[promotion] apply RFs: RF9 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((cast(d_date as DATETIMEV2(0)) > cast((cast(d_date as BIGINT) + 5) as DATETIMEV2(0)))) build RFs:RF8 cs_ship_date_sk->[d_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[inv_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq];RF7 inv_date_sk->[d_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] +--------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 RF7 +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[cs_bill_hdemo_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) -----------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF4 +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] +----------------------------------------------PhysicalProject +------------------------------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() -------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF6 RF8 -------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF1 --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[catalog_returns] +----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] +------------------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 +------------------------------------------------------PhysicalProject +--------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[warehouse] +--------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[item] +----------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) +------------------------------------------PhysicalOlapScan[household_demographics] ----------------------------------PhysicalProject -------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ---------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter((household_demographics.hd_buy_potential = '501-1000')) ---------------------------PhysicalOlapScan[household_demographics] -------------------PhysicalProject ---------------------filter((d1.d_year = 2002)) -----------------------PhysicalOlapScan[date_dim] +------------------------------------filter((d1.d_year = 2002)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query73.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query73.out index ef94345e10145a..54b486b3ff020e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query73.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query73.out @@ -5,7 +5,9 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] +------------PhysicalProject +--------------PhysicalOlapScan[customer] apply RFs: RF3 ------------filter((dj.cnt <= 5) and (dj.cnt >= 1)) --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] @@ -27,6 +29,4 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown')) ----------------------------PhysicalOlapScan[household_demographics] -------------PhysicalProject ---------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query74.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query74.out index a4c3796cd58578..ab90c00fe2787f 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query74.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query74.out @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query75.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query75.out index 7a6c63c2385f24..a4043ba0b6aa88 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query75.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query75.out @@ -3,68 +3,61 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----hashAgg[GLOBAL] -------PhysicalDistribute[DistributionSpecHash] ---------hashAgg[LOCAL] -----------hashAgg[GLOBAL] -------------hashAgg[LOCAL] ---------------PhysicalUnion -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Home')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (1998, 1999)) -------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Home')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (1998, 1999)) -------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Home')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (1998, 1999)) -------------------------------PhysicalOlapScan[date_dim] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------PhysicalUnion +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Home')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (1998, 1999)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Home')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (1998, 1999)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_returns] +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Home')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (1998, 1999)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query76.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query76.out index 997c07fd51be53..d4ff998b19635a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query76.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query76.out @@ -12,28 +12,28 @@ PhysicalResultSink ------------------PhysicalUnion --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------------PhysicalProject ----------------------------filter(ss_hdemo_sk IS NULL) ------------------------------PhysicalOlapScan[store_sales] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ws_item_sk->[i_item_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[item] apply RFs: RF1 --------------------------PhysicalProject ----------------------------filter(ws_bill_addr_sk IS NULL) ------------------------------PhysicalOlapScan[web_sales] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------PhysicalProject ----------------------------filter(cs_warehouse_sk IS NULL) ------------------------------PhysicalOlapScan[catalog_sales] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query77.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query77.out index 3f4330d7466b08..8d6c6d61c8625d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query77.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query77.out @@ -10,38 +10,35 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 sr_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject @@ -66,36 +63,33 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 ws_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF9 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wr_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF7 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query79.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query79.out index 32006bcc40781c..8f9b721f08ee59 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query79.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query79.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------hashJoin[INNER_JOIN broadcast] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query8.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query8.out index 4779bfae220fe7..2843a7266bdb9e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query8.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query8.out @@ -22,26 +22,22 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------PhysicalIntersect RFV2: RF3[ca_zip->substring(ca_zip, 1, 5)] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((cnt > 10)) ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((cnt > 10)) +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalProject ---------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalProject ---------------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) -----------------------------------------------PhysicalOlapScan[customer_address] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ---------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 +----------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query80.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query80.out index 3f2cb3c7fcea3a..e9cb7c678b702c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query80.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query80.out @@ -15,24 +15,24 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF5 p_promo_sk->[ss_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +------------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_item_sk->[sr_item_sk];RF1 ss_ticket_number->[sr_ticket_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 +--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_returns] +--------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 RF5 --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) ------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store] ------------------------------------PhysicalProject --------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------PhysicalOlapScan[item] @@ -44,24 +44,24 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[cs_promo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[cs_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[cs_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF9 cs_catalog_page_sk->[cp_catalog_page_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() +------------------------------------------PhysicalOlapScan[catalog_page] apply RFs: RF9 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF6 cs_item_sk->[cr_item_sk];RF7 cs_order_number->[cr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 +--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_returns] +--------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 RF10 RF11 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[catalog_page] -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) ---------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject --------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------PhysicalOlapScan[item] @@ -73,24 +73,24 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[ws_promo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF17 p_promo_sk->[ws_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ws_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 ws_web_site_sk->[web_site_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +------------------------------------------PhysicalOlapScan[web_site] apply RFs: RF15 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_item_sk->[wr_item_sk];RF13 ws_order_number->[wr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF10 RF11 +--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_returns] +--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF16 RF17 --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) ------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_site] ------------------------------------PhysicalProject --------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query81.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query81.out index 39926be2872da5..d95cf3240abe7b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query81.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query81.out @@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 +----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((date_dim.d_year = 2002)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((date_dim.d_year = 2002)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalProject ------PhysicalLazyMaterialize[materializedSlots:(customer.c_customer_id,customer_address.ca_street_number,customer_address.ca_street_name,customer_address.ca_street_type,customer_address.ca_suite_number,customer_address.ca_city,customer_address.ca_county,customer_address.ca_state,customer_address.ca_zip,customer_address.ca_country,customer_address.ca_gmt_offset,customer_address.ca_location_type,ctr1.ctr_total_return) lazySlots:(customer.c_first_name,customer.c_last_name,customer.c_salutation)] @@ -24,20 +24,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecGather] ------------PhysicalTopN[LOCAL_SORT] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF4 -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalProject ---------------------filter((customer_address.ca_state = 'CA')) -----------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF3 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((customer_address.ca_state = 'CA')) +--------------------------PhysicalOlapScan[customer_address] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query82.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query82.out index 4d01fe025918e7..5142d25b09e8a3 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query82.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query82.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query83.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query83.out index d069a28a6b032d..bd20e2a899a623 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query83.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query83.out @@ -5,32 +5,32 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF12 item_id->[i_item_id] -----------------PhysicalProject -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[wr_returned_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[sr_returned_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 wr_item_sk->[i_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[sr_item_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF10 RF11 ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +----------------------------PhysicalProject +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -------------------------------------PhysicalProject ---------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) +------------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] @@ -38,11 +38,11 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cr_returned_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cr_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cr_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF13 +----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF7 ----------------------------PhysicalProject ------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------PhysicalProject @@ -54,27 +54,27 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ----------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[wr_returned_date_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 sr_item_sk->[i_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 --------------------------------PhysicalProject -----------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 +------------------------------------PhysicalProject +--------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) +----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query84.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query84.out index 846d075f0fccaa..94a2a3a852c014 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query84.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query84.out @@ -11,20 +11,20 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF3 ib_income_band_sk->[hd_income_band_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 c_current_hdemo_sk->[hd_demo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +----------------------PhysicalOlapScan[household_demographics] apply RFs: RF2 RF3 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 +------------------------------PhysicalOlapScan[customer] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_demographics] +------------------------------filter((customer_address.ca_city = 'Oakwood')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((customer_address.ca_city = 'Oakwood')) -----------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalProject -----------------------PhysicalOlapScan[household_demographics] apply RFs: RF3 +--------------------------PhysicalOlapScan[customer_demographics] ----------------PhysicalProject ------------------filter((income_band.ib_lower_bound >= 5806) and (income_band.ib_upper_bound <= 55806)) --------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query85.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query85.out index 63fc92a6f489d9..4591cc14c0ac2b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query85.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query85.out @@ -19,7 +19,9 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF3 cd_demo_sk->[wr_refunded_cdemo_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 ws_web_page_sk->[wp_web_page_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[web_page] apply RFs: RF2 ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject @@ -27,8 +29,6 @@ PhysicalResultSink --------------------------------------------PhysicalProject ----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) ------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_page] ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) ----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query86.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query86.out index 2cb80b5a081379..c68c8b30e9e929 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query86.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query86.out @@ -15,14 +15,14 @@ PhysicalResultSink ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query87.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query87.out index f7c070bd942411..73c5f2afcd95a2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query87.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query87.out @@ -5,47 +5,47 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalExcept +----------PhysicalExcept RFV2: RF6[c_last_name->c_last_name] RF7[c_last_name->c_last_name] ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] RFV2: RF6 ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF5 +----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query9.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query9.out index 06cd8f92785e08..f159ed97647895 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query9.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query9.out @@ -1,8 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute[DistributionSpecGather] -----PhysicalProject +--PhysicalProject +----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] @@ -16,24 +16,17 @@ PhysicalResultSink --------------------------NestedLoopJoin[CROSS_JOIN] ----------------------------NestedLoopJoin[CROSS_JOIN] ------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------NestedLoopJoin[CROSS_JOIN] -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------------PhysicalProject -----------------------------------------filter((reason.r_reason_sk = 1)) -------------------------------------------PhysicalOlapScan[reason] ---------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[LOCAL] ---------------------------------------------PhysicalProject -----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) -------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ---------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------PhysicalProject +----------------------------------NestedLoopJoin[CROSS_JOIN] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) +----------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------PhysicalProject +--------------------------------------filter((reason.r_reason_sk = 1)) +----------------------------------------PhysicalOlapScan[reason] --------------------------------hashAgg[GLOBAL] ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] @@ -44,7 +37,7 @@ PhysicalResultSink --------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject ---------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) +--------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------PhysicalOlapScan[store_sales] ----------------------------hashAgg[GLOBAL] ------------------------------PhysicalDistribute[DistributionSpecGather] @@ -62,7 +55,7 @@ PhysicalResultSink --------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject ---------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) +--------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------PhysicalOlapScan[store_sales] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecGather] @@ -80,7 +73,7 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) +--------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------PhysicalOlapScan[store_sales] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecGather] @@ -98,7 +91,7 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +--------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------PhysicalOlapScan[store_sales] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] @@ -112,4 +105,10 @@ PhysicalResultSink --------------PhysicalProject ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------PhysicalOlapScan[store_sales] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +----------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query91.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query91.out index 6a4b369a5fe1ed..4a730e739f3dfc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query91.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query91.out @@ -15,20 +15,20 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cr_returning_customer_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cr_returning_customer_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cr_call_center_sk->[cc_call_center_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2 +------------------------------------------PhysicalOlapScan[call_center] apply RFs: RF0 ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[call_center] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 +--------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query94.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query94.out index d26128a78f3b6a..fe39761d74adb9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query94.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query94.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] -----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((customer_address.ca_state = 'OK')) -----------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((web_site.web_company_name = 'pri')) -------------------------PhysicalOlapScan[web_site] +----------------------filter((customer_address.ca_state = 'OK')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((web_site.web_company_name = 'pri')) +--------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query95.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query95.out index 4435e9fb23dcd5..8702a5a44f23eb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query95.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query95.out @@ -3,42 +3,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales] --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] ---------hashAgg[DISTINCT_GLOBAL] +--------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] +------------hashAgg[GLOBAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk] -------------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[ws_order_number] ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 ---------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[wr_order_number];RF7 ws_order_number->[ws_order_number,ws_order_number] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() ---------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk] +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) -----------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_returns] +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------PhysicalProject -----------------------------filter((customer_address.ca_state = 'NC')) -------------------------------PhysicalOlapScan[customer_address] +----------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((web_site.web_company_name = 'pri')) ---------------------------PhysicalOlapScan[web_site] +------------------------filter((customer_address.ca_state = 'NC')) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((web_site.web_company_name = 'pri')) +----------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query99.out b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query99.out index e62313c7a3d935..b054b9a7e442cb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query99.out +++ b/regression-test/data/shape_check/tpcds_sf100/noStatsRfPrune/query99.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cs_call_center_sk->[cc_call_center_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() +------------------------PhysicalOlapScan[call_center] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 cs_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 cs_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[ship_mode] -----------------------PhysicalProject -------------------------PhysicalOlapScan[call_center] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query1.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query1.out index 9e34c347fc0a1a..4cc300a40ec952 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query1.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query1.out @@ -18,20 +18,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk,s_store_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ctr_customer_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 RF3 -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +--------------------PhysicalOlapScan[customer] apply RFs: RF2 ------------------PhysicalProject ---------------------filter((store.s_state = 'SD')) -----------------------PhysicalOlapScan[store] apply RFs: RF3 ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 +----------------------PhysicalProject +------------------------filter((store.s_state = 'SD')) +--------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query10.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query10.out index 4fdff8b37961c5..15825433a8a2b6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query10.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query10.out @@ -10,12 +10,12 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] -------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] @@ -33,10 +33,10 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalOlapScan[customer_demographics] ---------------------------PhysicalProject -----------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) -------------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalProject +--------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query11.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query11.out index 285f41489aa920..b5db5b5c6822ad 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query11.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query11.out @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.dyear = 2002) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query13.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query13.out index cd5c83418930df..37915578cb56c7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query13.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query13.out @@ -13,12 +13,12 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ----------------------------PhysicalProject -------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +------------------------------PhysicalOlapScan[store] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store] +------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 ------------------------PhysicalProject --------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown')]] and cd_education_status IN ('4 yr Degree', 'College', 'Unknown') and cd_marital_status IN ('D', 'M', 'S')) ----------------------------PhysicalOlapScan[customer_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query14.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query14.out index 87457fe2decece..794e2803764cf6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query14.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query14.out @@ -3,52 +3,46 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 i_brand_id->[i_brand_id,i_brand_id,i_brand_id];RF7 i_class_id->[i_class_id,i_class_id,i_class_id];RF8 i_category_id->[i_category_id,i_category_id,i_category_id] ---------PhysicalIntersect RFV2: RF19[i_brand_id->i_brand_id] RF20[i_brand_id->i_brand_id] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 brand_id->[i_brand_id];RF7 class_id->[i_class_id];RF8 category_id->[i_category_id] +--------PhysicalProject +----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +--------PhysicalIntersect RFV2: RF19[brand_id->i_brand_id] RF20[brand_id->i_brand_id] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +----------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------PhysicalProject -----------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------PhysicalProject +------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 RFV2: RF19 +----------------------PhysicalOlapScan[item] apply RFs: RF2 RFV2: RF19 --------------------PhysicalProject -----------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 RFV2: RF20 +----------------------PhysicalOlapScan[item] apply RFs: RF4 RFV2: RF20 --------------------PhysicalProject -----------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] ---------PhysicalProject -----------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[web_sales] apply RFs: RF5 +----------------PhysicalProject +------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] @@ -107,7 +101,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[cs_item_sk,ss_item_sk] -------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF13 ss_item_sk->[cs_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF13 ss_item_sk->[cs_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF13 RF14 RF15 --------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF14 @@ -129,7 +123,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF17 i_item_sk->[ss_item_sk,ws_item_sk] -------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ss_item_sk->[ws_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ss_item_sk->[ws_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17 RF18 --------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF17 diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query15.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query15.out index 81b0bae51498c1..15d95f8bdf1c6f 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query15.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query15.out @@ -10,15 +10,15 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF1 ca_address_sk->[c_current_addr_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cs_bill_customer_sk] +------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 cs_bill_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF1 -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject --------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query16.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query16.out index 02559f87cb35c3..28da4f0aec939d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query16.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query16.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF4 cc_call_center_sk->[cs_call_center_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[cs_ship_addr_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF1 cs_order_number->[cr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((customer_address.ca_state = 'WV')) -----------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -------------------------PhysicalOlapScan[call_center] +----------------------filter((customer_address.ca_state = 'WV')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +--------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query17.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query17.out index 52da90d84ff3a8..f5771465f5a414 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query17.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query17.out @@ -9,36 +9,36 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +----------------------PhysicalOlapScan[item] apply RFs: RF9 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF8 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 RF5 RF6 RF9 +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF5 RF7 -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((d1.d_quarter_name = '2001Q1')) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((d1.d_quarter_name = '2001Q1')) +----------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) ------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query18.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query18.out index 22f67b07a4698c..6fa19e55461ccb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query18.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query18.out @@ -10,13 +10,15 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[cs_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[cs_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[c_current_cdemo_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 c_current_cdemo_sk->[cd_demo_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF2 ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cs_bill_customer_sk] --------------------------------------PhysicalProject @@ -28,15 +30,13 @@ PhysicalResultSink ----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject ----------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) ----------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter((date_dim.d_year = 1998)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_year = 1998)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query19.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query19.out index 9d4dfee81c5cc1..33660787d33ce4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query19.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query19.out @@ -11,25 +11,25 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((item.i_manager_id = 2)) +------------------------------------PhysicalOlapScan[item] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[customer] apply RFs: RF3 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 2)) -----------------------------PhysicalOlapScan[item] +--------------------------PhysicalOlapScan[customer_address] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query2.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query2.out index b9499df831aa62..41fb77a9a43774 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query2.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query2.out @@ -21,19 +21,19 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 53))) otherCondition=() --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 53))) otherCondition=() -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] -----------------------PhysicalProject -------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF1 -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 1999)) ---------------------------PhysicalOlapScan[date_dim] +----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF2 +------------------PhysicalProject +--------------------filter((date_dim.d_year = 1998)) +----------------------PhysicalOlapScan[date_dim] --------------PhysicalProject -----------------filter((date_dim.d_year = 1998)) -------------------PhysicalOlapScan[date_dim] +----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] +------------------PhysicalProject +--------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF1 +------------------PhysicalProject +--------------------filter((date_dim.d_year = 1999)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query21.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query21.out index 6a3b7ecf26ca2f..c81df7ac561759 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query21.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query21.out @@ -13,10 +13,10 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[inv_warehouse_sk] -----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 inv_warehouse_sk->[w_warehouse_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[warehouse] +------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 +----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 RF2 ------------------------PhysicalProject --------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query22.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query22.out index a96dc0686f150d..267f58a810d1bb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query22.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query22.out @@ -10,14 +10,14 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query23.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query23.out index b0dfb7ceb245e9..9ce49a1a367344 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query23.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query23.out @@ -8,16 +8,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject -------------------------PhysicalOlapScan[item] +------------------------filter(d_year IN (2000, 2001, 2002, 2003)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter(d_year IN (2000, 2001, 2002, 2003)) -----------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) ----PhysicalCteProducer ( cteId=CTEId#2 ) ------PhysicalProject @@ -55,13 +55,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF4 --------------------------PhysicalProject -----------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF3 item_sk->[cs_item_sk] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF3 item_sk->[cs_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF5 ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ----------------------PhysicalProject ------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] @@ -71,7 +71,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 ws_bill_customer_sk->[c_customer_sk] --------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF7 --------------------------PhysicalProject -----------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 item_sk->[ws_item_sk] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF8 ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query24.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query24.out index 0a726e5efa9714..1cab0a3549f9e2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query24.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query24.out @@ -7,46 +7,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_zip->[ca_zip];RF6 s_store_sk->[ss_store_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk) and (store.s_zip = customer_address.ca_zip)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF5 ca_address_sk->[c_current_addr_sk];RF6 ca_zip->[s_zip] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[sr_item_sk,ss_item_sk] +--------------------------PhysicalOlapScan[item] apply RFs: RF3 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_ticket_number->[ss_ticket_number];RF1 sr_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF6 +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF2 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------------filter((store.s_market_id = 8)) +--------------------------------PhysicalOlapScan[store] apply RFs: RF6 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] apply RFs: RF5 +----------------------PhysicalOlapScan[customer] apply RFs: RF5 ----------------PhysicalProject -------------------filter((store.s_market_id = 8)) ---------------------PhysicalOlapScan[store] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalProject ---------------------------filter((ssales.i_color = 'beige')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecGather] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalQuickSort[LOCAL_SORT] +--------PhysicalProject +----------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecGather] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------filter((ssales.i_color = 'beige')) +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query25.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query25.out index 10bab76c77b7f3..86294b1c768aea 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query25.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query25.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 RF5 RF6 RF9 +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF5 RF7 ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) +--------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) +----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] -------------------PhysicalProject ---------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query26.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query26.out index edbed407b77921..4000cd04d9792a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query26.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query26.out @@ -10,21 +10,21 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[cs_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] +------------------------PhysicalOlapScan[item] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'S')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 2001)) ---------------------------PhysicalOlapScan[date_dim] +----------------------------filter((date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query27.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query27.out index 3eec2f7437212b..6c165f752b9a50 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query27.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query27.out @@ -10,11 +10,11 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------------PhysicalProject @@ -23,11 +23,11 @@ PhysicalResultSink ------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'D')) --------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) +------------------------------PhysicalOlapScan[store] ----------------------PhysicalProject -------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) ---------------------------PhysicalOlapScan[store] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query29.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query29.out index 6d0d5cb82d5160..c96a8dc1d4403c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query29.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query29.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 RF5 RF6 RF9 +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF5 RF7 ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) +--------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) +----------------------------filter(d_year IN (1999, 2000, 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(d_year IN (1999, 2000, 2001)) ---------------------------PhysicalOlapScan[date_dim] -------------------PhysicalProject ---------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query30.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query30.out index 0b4b3a8b2d41ab..3226807b89d8e9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query30.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query30.out @@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[wr_returning_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((date_dim.d_year = 2002)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((date_dim.d_year = 2002)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalProject ------PhysicalLazyMaterialize[materializedSlots:(customer.c_customer_id,ctr1.ctr_total_return) lazySlots:(customer.c_birth_country,customer.c_birth_day,customer.c_birth_month,customer.c_birth_year,customer.c_email_address,customer.c_first_name,customer.c_last_name,customer.c_last_review_date_sk,customer.c_login,customer.c_preferred_cust_flag,customer.c_salutation)] @@ -24,20 +24,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecGather] ------------PhysicalTopN[LOCAL_SORT] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF4 ctr_state->[ctr_state] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF4 ctr_state->[ctr_state] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF4 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_birth_month,customer.c_birth_year,customer.c_birth_country,customer.c_login,customer.c_email_address,customer.c_last_review_date_sk,customer.c_salutation,customer.c_first_name,customer.c_last_name,customer.c_preferred_cust_flag,customer.c_birth_day)] apply RFs: RF3 +----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_birth_month,customer.c_birth_year,customer.c_birth_country,customer.c_login,customer.c_email_address,customer.c_last_review_date_sk,customer.c_salutation,customer.c_first_name,customer.c_last_name,customer.c_preferred_cust_flag,customer.c_birth_day)] apply RFs: RF2 RF3 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 ----------------------PhysicalProject ------------------------filter((customer_address.ca_state = 'IN')) --------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query31.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query31.out index 9be557f9715bd7..c3548bb8059efe 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query31.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query31.out @@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ss_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((ss.d_year = 2000) and d_qoy IN (1, 2, 3)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------PhysicalProject @@ -24,37 +24,37 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_bill_addr_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +------------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter((ws.d_year = 2000) and d_qoy IN (1, 2, 3)) -----------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalQuickSort[MERGE_SORT] --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county] ---------------------------PhysicalProject -----------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) -------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() build RFs:RF4 ca_county->[ca_county] ----------------------------PhysicalProject ------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 2000)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF6 RF7 RF8 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 RF7 RF8 ----------------------------PhysicalProject ------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 2000)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 RF8 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 RF7 RF8 +--------------------------PhysicalProject +----------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 2000)) --------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 RF8 diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query33.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query33.out index 0416c3f39cb340..7e78fe98066b87 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query33.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query33.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query34.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query34.out index ed1f30d2c00dbe..206ca91734dce9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query34.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query34.out @@ -5,7 +5,9 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] +------------PhysicalProject +--------------PhysicalOlapScan[customer] apply RFs: RF3 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] @@ -17,7 +19,7 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_dom <= 28) and (date_dim.d_dom >= 1) and OR[(date_dim.d_dom <= 3),(date_dim.d_dom >= 25)] and d_year IN (1998, 1999, 2000)) ------------------------------------PhysicalOlapScan[date_dim] @@ -27,6 +29,4 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) ----------------------------PhysicalOlapScan[household_demographics] -------------PhysicalProject ---------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query35.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query35.out index b414e22cb15150..6fe507571d6b6a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query35.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query35.out @@ -10,12 +10,14 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] -------------------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] @@ -25,7 +27,7 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +------------------------------------PhysicalOlapScan[customer] apply RFs: RF5 --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -33,8 +35,6 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer_demographics] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query36.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query36.out index 08593e2e439b92..c84b04082b74d2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query36.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query36.out @@ -17,16 +17,16 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +--------------------------------------PhysicalOlapScan[item] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalProject ---------------------------------------filter((d1.d_year = 2002)) -----------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------filter((d1.d_year = 2002)) +--------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query37.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query37.out index 756dbd1de4efea..cc63716e4ba212 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query37.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query37.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query38.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query38.out index a56a536123e54f..56e752bb73745e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query38.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query38.out @@ -12,42 +12,42 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ws_bill_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] RFV2: RF6 +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] RFV2: RF6 ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] RFV2: RF7 +--------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query39.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query39.out index 90c507f9c536f5..747d5814fc09c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query39.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query39.out @@ -5,22 +5,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0)) --------hashAgg[GLOBAL] -----------PhysicalDistribute[DistributionSpecHash] -------------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ---------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -----------------------PhysicalProject -------------------------PhysicalOlapScan[warehouse] +--------------------PhysicalOlapScan[warehouse] apply RFs: RF1 ------------------PhysicalProject ---------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) -----------------------PhysicalOlapScan[date_dim] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 inv_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF0 +----------------------PhysicalOlapScan[inventory] apply RFs: RF2 +--------------PhysicalProject +----------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) +------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query4.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query4.out index 5ef7b480277fcf..cee8d253c1b8d0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query4.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query4.out @@ -45,19 +45,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] ----------------------PhysicalProject ------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] ----------------------------PhysicalProject ------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query40.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query40.out index aae0d788557045..b394b022d9b693 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query40.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query40.out @@ -8,19 +8,19 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[cs_warehouse_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 cs_warehouse_sk->[w_warehouse_sk] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +----------------------------PhysicalOlapScan[warehouse] apply RFs: RF2 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cs_order_number->[cr_order_number];RF1 cs_item_sk->[cr_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 ----------------------PhysicalProject ------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query44.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query44.out index ce6d0a23f7b2e6..cab84e9ffbd10a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query44.out @@ -19,53 +19,49 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((V11.rnk < 11)) ----------------------------PhysicalWindow -------------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------------PhysicalPartitionTopN +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject -----------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) -------------------------------------------PhysicalProject ---------------------------------------------hashAgg[GLOBAL] -----------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((ss1.ss_store_sk = 146)) -------------------------------------------------------PhysicalOlapScan[store_sales] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------------PhysicalProject ---------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) -------------------------------------------------------------PhysicalOlapScan[store_sales] +----------------------------------------PhysicalAssertNumRows +------------------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------------------PhysicalProject +----------------------------------------------hashAgg[GLOBAL] +------------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------------hashAgg[LOCAL] +----------------------------------------------------PhysicalProject +------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) +--------------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------PhysicalProject +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 146)) +--------------------------------------------------PhysicalOlapScan[store_sales] ------------------------PhysicalProject --------------------------filter((V21.rnk < 11)) ----------------------------PhysicalWindow -------------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------------PhysicalPartitionTopN +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) +--------------------------------------PhysicalProject +----------------------------------------PhysicalAssertNumRows +------------------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------------------PhysicalProject +----------------------------------------------hashAgg[GLOBAL] +------------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------------hashAgg[LOCAL] +----------------------------------------------------PhysicalProject +------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) +--------------------------------------------------------PhysicalOlapScan[store_sales] --------------------------------------PhysicalProject -----------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) -------------------------------------------PhysicalProject ---------------------------------------------hashAgg[GLOBAL] -----------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((ss1.ss_store_sk = 146)) -------------------------------------------------------PhysicalOlapScan[store_sales] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------------PhysicalProject ---------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) -------------------------------------------------------------PhysicalOlapScan[store_sales] +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 146)) +--------------------------------------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query45.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query45.out index 68d1ef7855a7fd..d689b9d9d64b56 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query45.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query45.out @@ -13,15 +13,15 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ws_bill_customer_sk] +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 ws_bill_customer_sk->[c_customer_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF2 RF3 +----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject --------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query46.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query46.out index 73faa771d22a1b..ee3653866646ce 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query46.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query46.out @@ -7,23 +7,21 @@ PhysicalResultSink --------PhysicalProject ----------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ss_hdemo_sk] +--------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ss_addr_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ------------------------------------PhysicalProject --------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query47.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query47.out index 2f76e9211ef4df..28820a16cea133 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query47.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query47.out @@ -16,11 +16,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 ------------------------------PhysicalProject --------------------------------filter(OR[(date_dim.d_year = 2001),AND[(date_dim.d_year = 2000),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2002),(date_dim.d_moy = 1)]] and d_year IN (2000, 2001, 2002)) ----------------------------------PhysicalOlapScan[date_dim] @@ -32,7 +32,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] ----------------PhysicalProject ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 ----------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query48.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query48.out index d994b40da36a4a..bf933c37426541 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query48.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query48.out @@ -11,12 +11,12 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------PhysicalOlapScan[store] apply RFs: RF0 ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] +--------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 --------------------PhysicalProject ----------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'U', 'W')) ------------------------PhysicalOlapScan[customer_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query49.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query49.out index 0463d58df08fcf..d4961bd2428e6d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query49.out @@ -30,13 +30,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 ws_order_number->[wr_order_number];RF1 ws_item_sk->[wr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -62,13 +62,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number];RF4 cs_item_sk->[cr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -94,13 +94,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF8 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) --------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query5.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query5.out index c353f9bb9ff3ee..393d0aff07b849 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query5.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query5.out @@ -35,9 +35,9 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF3 cp_catalog_page_sk->[cr_catalog_page_sk,cs_catalog_page_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF2 cp_catalog_page_sk->[cr_catalog_page_sk,cs_catalog_page_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk] ------------------------------------PhysicalUnion --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject @@ -46,10 +46,10 @@ PhysicalResultSink ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_page] +--------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] @@ -64,11 +64,11 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 ws_item_sk->[wr_item_sk];RF5 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 RF6 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF7 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query50.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query50.out index e7941ce875f02f..b0c225dcbaad90 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query50.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query50.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[sr_returned_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 ss_sold_date_sk->[d_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[store] apply RFs: RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_ticket_number->[ss_ticket_number];RF1 sr_item_sk->[ss_item_sk];RF2 sr_customer_sk->[ss_customer_sk] +----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk];RF2 ss_customer_sk->[sr_customer_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +--------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 RF2 RF5 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] -----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[store_sales] ------------------PhysicalProject --------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query51.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query51.out index 9b4742d60618ee..134e4fdf28c8e7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query51.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query51.out @@ -18,9 +18,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -31,9 +31,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query54.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query54.out index a2a326baf8f39a..606af4aca8f1c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query54.out @@ -10,49 +10,49 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 s_county->[ca_county];RF6 s_state->[ca_state] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 ca_county->[s_county];RF6 ca_state->[s_state] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 +----------------------------------PhysicalOlapScan[store] apply RFs: RF5 RF6 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject ---------------------------------------hashAgg[GLOBAL] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk,ws_bill_customer_sk] ---------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] +------------------------------------------hashAgg[GLOBAL] +--------------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject ---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] -----------------------------------------------------PhysicalUnion -------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk,ws_bill_customer_sk] +----------------------------------------------------PhysicalProject +------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] +------------------------------------------------------------PhysicalUnion +--------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +--------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) +----------------------------------------------------------------PhysicalOlapScan[item] --------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +----------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------------------------PhysicalProject -------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) ---------------------------------------------------------PhysicalOlapScan[item] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) -----------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 RF6 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) +------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalProject -------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] +------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) --------------------------------PhysicalAssertNumRows ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[GLOBAL] @@ -61,12 +61,16 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ----------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalAssertNumRows -------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) -------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) +------------------------------------PhysicalAssertNumRows +--------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +--------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query56.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query56.out index ef5a9edba623fc..73c8e446f4cdbb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query56.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query56.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query57.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query57.out index 697bd284f5701e..4b4909987a4be7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query57.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query57.out @@ -16,11 +16,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 cs_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 ------------------------------PhysicalProject --------------------------------filter(OR[(date_dim.d_year = 1999),AND[(date_dim.d_year = 1998),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2000),(date_dim.d_moy = 1)]] and d_year IN (1998, 1999, 2000)) ----------------------------------PhysicalOlapScan[date_dim] @@ -32,7 +32,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] ----------------PhysicalProject ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 ----------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query58.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query58.out index 885691978e3367..19bf83498035c5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query58.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query58.out @@ -5,82 +5,82 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev))) build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev))) build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF12 item_id->[i_item_id] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 ws_item_sk->[i_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 RF10 +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_date = '2001-03-24')) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cs_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 RF5 ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date = '2001-03-24')) --------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF13 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 RF1 ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date = '2001-03-24')) --------------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ws_item_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] -------------------------PhysicalProject ---------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_date = '2001-03-24')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query59.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query59.out index f4de54b576470a..fcc1a470085b56 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query59.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query59.out @@ -16,27 +16,27 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF4 s_store_id2->[s_store_id];RF5 expr_(cast(d_week_seq2 as BIGINT) - 52)->[cast(d_week_seq as BIGINT)] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF5 RF6 +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 ----------------------PhysicalProject -------------------------PhysicalOlapScan[store] apply RFs: RF4 +------------------------PhysicalOlapScan[store] apply RFs: RF5 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +--------------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) +----------------------PhysicalOlapScan[date_dim] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ---------------------------PhysicalProject -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 ----------------------PhysicalProject -------------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) ---------------------------PhysicalOlapScan[date_dim] ---------------PhysicalProject -----------------filter((d.d_month_seq <= 1207) and (d.d_month_seq >= 1196)) -------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[store] +------------------PhysicalProject +--------------------filter((d.d_month_seq <= 1219) and (d.d_month_seq >= 1208)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query6.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query6.out index 538ad1a80e2901..bf5c172fd1c85c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query6.out @@ -13,32 +13,32 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF5 i_category->[i_category] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF4 d_month_seq->[d_month_seq] +--------------------------PhysicalAssertNumRows +----------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------hashAgg[GLOBAL] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------hashAgg[LOCAL] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF5 ---------------------------PhysicalAssertNumRows -----------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------hashAgg[LOCAL] -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) -----------------------------------------PhysicalOlapScan[date_dim] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query60.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query60.out index 403d74c71ecae1..2c2038cf390154 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query60.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query60.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query61.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query61.out index 62da8c9cb21a0f..dae2a7ecb98546 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query61.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query61.out @@ -12,26 +12,26 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 p_promo_sk->[ss_promo_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 RF10 --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer] apply RFs: RF9 +----------------------------------------filter((store.s_gmt_offset = -7.00)) +------------------------------------------PhysicalOlapScan[store] ----------------------------------PhysicalProject -------------------------------------filter((store.s_gmt_offset = -7.00)) ---------------------------------------PhysicalOlapScan[store] +------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) +--------------------------------------PhysicalOlapScan[promotion] ------------------------------PhysicalProject ---------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) -----------------------------------PhysicalOlapScan[promotion] +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 ----------------------PhysicalProject ------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------PhysicalOlapScan[customer_address] @@ -46,21 +46,21 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------------------filter((store.s_gmt_offset = -7.00)) +--------------------------------------PhysicalOlapScan[store] ------------------------------PhysicalProject ---------------------------------filter((store.s_gmt_offset = -7.00)) -----------------------------------PhysicalOlapScan[store] +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] apply RFs: RF3 ----------------------PhysicalProject ------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query62.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query62.out index 1f0de64db91bb5..d1813348a94190 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query62.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query62.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 ws_web_site_sk->[web_site_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 sm_ship_mode_sk->[ws_ship_mode_sk] +------------------------PhysicalOlapScan[web_site] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 ws_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[ws_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[ship_mode] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_site] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query65.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query65.out index cf7a79e07ffa7d..ba604f3a1fc63e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query65.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query65.out @@ -7,35 +7,35 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashAgg[LOCAL] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] apply RFs: RF4 ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[ss_store_sk] ----------------hashAgg[GLOBAL] ------------------PhysicalProject --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ----------------------------------PhysicalOlapScan[date_dim] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] +--------------------PhysicalProject +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] apply RFs: RF2 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF1 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF1 +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query66.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query66.out index e10c8473f197d9..3083f5d059d3c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query66.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query66.out @@ -20,11 +20,11 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[ws_warehouse_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[warehouse] +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -44,11 +44,11 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 w_warehouse_sk->[cs_warehouse_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 cs_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF4 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[warehouse] +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query68.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query68.out index 3e4c771ecc20c6..aab9fc0be3f68c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query68.out @@ -9,23 +9,21 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ss_hdemo_sk] +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ss_addr_sk] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[customer_address] +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) --------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query69.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query69.out index af6d7e8c85a5f6..061d87fd800c51 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query69.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query69.out @@ -9,12 +9,12 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[c_current_addr_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] -----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] @@ -33,10 +33,10 @@ PhysicalResultSink ------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_demographics] +------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter(ca_state IN ('MI', 'TX', 'VA')) -----------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query7.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query7.out index 2b6615e0b93b84..0ca8a686c2c672 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query7.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query7.out @@ -10,21 +10,21 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------------PhysicalOlapScan[item] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 2001)) ---------------------------PhysicalOlapScan[date_dim] +----------------------------filter((date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query70.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query70.out index 866c026a90dd67..de45970dadfafe 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query70.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query70.out @@ -31,11 +31,11 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------------------------------PhysicalOlapScan[store] apply RFs: RF0 RF2 --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store] apply RFs: RF2 +----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) --------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query72.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query72.out index fd5f3db15c5786..b27ed2350038ef 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query72.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query72.out @@ -8,47 +8,47 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk) and (d1.d_week_seq = d2.d_week_seq)) otherCondition=((cast(d_date as DATETIMEV2(0)) > cast((cast(d_date as BIGINT) + 5) as DATETIMEV2(0)))) build RFs:RF7 d_week_seq->[d_week_seq];RF8 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() build RFs:RF10 cs_item_sk->[cr_item_sk];RF11 cs_order_number->[cr_order_number] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF6 hd_demo_sk->[cs_bill_hdemo_sk] +--------------------PhysicalOlapScan[catalog_returns] apply RFs: RF10 RF11 +------------------PhysicalProject +--------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 cs_promo_sk->[p_promo_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[promotion] apply RFs: RF9 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_ship_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((cast(d_date as DATETIMEV2(0)) > cast((cast(d_date as BIGINT) + 5) as DATETIMEV2(0)))) build RFs:RF8 cs_ship_date_sk->[d_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[inv_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq];RF7 inv_date_sk->[d_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] +--------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 RF7 +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk,inv_item_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[cs_bill_hdemo_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] -----------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 RF4 +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] +----------------------------------------------PhysicalProject +------------------------------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() -------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF5 RF6 RF8 -------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF1 --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[catalog_returns] +----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] +------------------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 +------------------------------------------------------PhysicalProject +--------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[warehouse] +--------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[item] +----------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) +------------------------------------------PhysicalOlapScan[household_demographics] ----------------------------------PhysicalProject -------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ---------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter((household_demographics.hd_buy_potential = '501-1000')) ---------------------------PhysicalOlapScan[household_demographics] -------------------PhysicalProject ---------------------filter((d1.d_year = 2002)) -----------------------PhysicalOlapScan[date_dim] +------------------------------------filter((d1.d_year = 2002)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query73.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query73.out index 969743c9f9f833..54b486b3ff020e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query73.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query73.out @@ -5,7 +5,9 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] +------------PhysicalProject +--------------PhysicalOlapScan[customer] apply RFs: RF3 ------------filter((dj.cnt <= 5) and (dj.cnt >= 1)) --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] @@ -17,7 +19,7 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) ------------------------------------PhysicalOlapScan[date_dim] @@ -27,6 +29,4 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown')) ----------------------------PhysicalOlapScan[household_demographics] -------------PhysicalProject ---------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query74.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query74.out index 5f8a2e9ca7c576..070d5cbe7a3a19 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query74.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query74.out @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query75.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query75.out index 7a6c63c2385f24..a4043ba0b6aa88 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query75.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query75.out @@ -3,68 +3,61 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----hashAgg[GLOBAL] -------PhysicalDistribute[DistributionSpecHash] ---------hashAgg[LOCAL] -----------hashAgg[GLOBAL] -------------hashAgg[LOCAL] ---------------PhysicalUnion -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Home')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (1998, 1999)) -------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Home')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (1998, 1999)) -------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Home')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (1998, 1999)) -------------------------------PhysicalOlapScan[date_dim] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------PhysicalUnion +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Home')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (1998, 1999)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Home')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (1998, 1999)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_returns] +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Home')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (1998, 1999)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query76.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query76.out index a3caf38862de65..eab01ffc7aa6ff 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query76.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query76.out @@ -12,28 +12,28 @@ PhysicalResultSink ------------------PhysicalUnion --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------filter(ss_hdemo_sk IS NULL) -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(ss_hdemo_sk IS NULL) +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ws_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------filter(ws_bill_addr_sk IS NULL) -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF1 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(ws_bill_addr_sk IS NULL) +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------filter(cs_warehouse_sk IS NULL) -------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(cs_warehouse_sk IS NULL) +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query77.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query77.out index cdecac9706c07d..8d6c6d61c8625d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query77.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query77.out @@ -10,38 +10,35 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 sr_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject @@ -66,36 +63,33 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 ws_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF9 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wr_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF7 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query79.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query79.out index 070baafb43c25a..1a19308d991441 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query79.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query79.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query8.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query8.out index d8623c69a18dd8..f7c11803029e94 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query8.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query8.out @@ -22,26 +22,22 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------PhysicalIntersect RFV2: RF3[ca_zip->substring(ca_zip, 1, 5)] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((cnt > 10)) ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((cnt > 10)) +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalProject ---------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalProject ---------------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) -----------------------------------------------PhysicalOlapScan[customer_address] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ---------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 +----------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query80.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query80.out index e980bad3f49872..e9cb7c678b702c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query80.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query80.out @@ -15,24 +15,24 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF5 p_promo_sk->[ss_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +------------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_item_sk->[sr_item_sk];RF1 ss_ticket_number->[sr_ticket_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_returns] +--------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 RF5 --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) ------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store] ------------------------------------PhysicalProject --------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------PhysicalOlapScan[item] @@ -44,24 +44,24 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[cs_promo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[cs_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[cs_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF9 cs_catalog_page_sk->[cp_catalog_page_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF4 cp_catalog_page_sk->[cs_catalog_page_sk] +------------------------------------------PhysicalOlapScan[catalog_page] apply RFs: RF9 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF6 cs_item_sk->[cr_item_sk];RF7 cs_order_number->[cr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 +--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_returns] +--------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 RF10 RF11 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[catalog_page] -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) ---------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject --------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------PhysicalOlapScan[item] @@ -73,24 +73,24 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[ws_promo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF17 p_promo_sk->[ws_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ws_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF9 web_site_sk->[ws_web_site_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 ws_web_site_sk->[web_site_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +------------------------------------------PhysicalOlapScan[web_site] apply RFs: RF15 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_item_sk->[wr_item_sk];RF13 ws_order_number->[wr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 +--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_returns] +--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF16 RF17 --------------------------------------------PhysicalProject ----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) ------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_site] ------------------------------------PhysicalProject --------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query81.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query81.out index 59ecfa850d8855..6bdb4ad701cd5e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query81.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query81.out @@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cr_returning_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((date_dim.d_year = 2002)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((date_dim.d_year = 2002)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalProject ------PhysicalLazyMaterialize[materializedSlots:(customer.c_customer_id,customer_address.ca_street_number,customer_address.ca_street_name,customer_address.ca_street_type,customer_address.ca_suite_number,customer_address.ca_city,customer_address.ca_county,customer_address.ca_state,customer_address.ca_zip,customer_address.ca_country,customer_address.ca_gmt_offset,customer_address.ca_location_type,ctr1.ctr_total_return) lazySlots:(customer.c_first_name,customer.c_last_name,customer.c_salutation)] @@ -24,20 +24,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecGather] ------------PhysicalTopN[LOCAL_SORT] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF4 ctr_state->[ctr_state] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_state->[ctr_state] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF4 -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------PhysicalProject ---------------------filter((customer_address.ca_state = 'CA')) -----------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF2 RF3 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 +----------------------PhysicalProject +------------------------filter((customer_address.ca_state = 'CA')) +--------------------------PhysicalOlapScan[customer_address] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query82.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query82.out index 4d01fe025918e7..5142d25b09e8a3 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query82.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query82.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query83.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query83.out index eb9901a16a7b86..bd20e2a899a623 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query83.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query83.out @@ -5,32 +5,32 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF12 item_id->[i_item_id] -----------------PhysicalProject -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[wr_returned_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[sr_returned_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 wr_item_sk->[i_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[sr_item_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF10 RF11 ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +----------------------------PhysicalProject +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -------------------------------------PhysicalProject ---------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) +------------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] @@ -38,11 +38,11 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cr_returned_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cr_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cr_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF13 +----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF7 ----------------------------PhysicalProject ------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------PhysicalProject @@ -54,27 +54,27 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ----------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[wr_returned_date_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[wr_item_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 RF3 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 sr_item_sk->[i_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 --------------------------------PhysicalProject -----------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 +------------------------------------PhysicalProject +--------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) +----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query84.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query84.out index 206d9cd25304dc..8f35630c12d28a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query84.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query84.out @@ -11,20 +11,20 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF3 ib_income_band_sk->[hd_income_band_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 c_current_hdemo_sk->[hd_demo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +----------------------PhysicalOlapScan[household_demographics] apply RFs: RF2 RF3 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 RF2 +------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_demographics] +------------------------------filter((customer_address.ca_city = 'Oakwood')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((customer_address.ca_city = 'Oakwood')) -----------------------------PhysicalOlapScan[customer_address] ---------------------PhysicalProject -----------------------PhysicalOlapScan[household_demographics] apply RFs: RF3 +--------------------------PhysicalOlapScan[customer_demographics] ----------------PhysicalProject ------------------filter((income_band.ib_lower_bound >= 5806) and (income_band.ib_upper_bound <= 55806)) --------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query85.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query85.out index 62c4b147f59a22..d4878b2cf34a43 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query85.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query85.out @@ -19,16 +19,16 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF3 cd_demo_sk->[wr_refunded_cdemo_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 ws_web_page_sk->[wp_web_page_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[web_page] apply RFs: RF2 ----------------------------------------PhysicalProject ------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 RF3 RF4 RF7 RF9 --------------------------------------------PhysicalProject ----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) -------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF8 -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_page] +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) ----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query86.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query86.out index 13c2b5c88bc677..ebfed4e4aa6c91 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query86.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query86.out @@ -15,14 +15,14 @@ PhysicalResultSink ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((d1.d_month_seq <= 1235) and (d1.d_month_seq >= 1224)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query87.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query87.out index a31c5dc9e114cf..f331439cc2d319 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query87.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query87.out @@ -5,47 +5,47 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalExcept +----------PhysicalExcept RFV2: RF6[c_last_name->c_last_name] RF7[c_last_name->c_last_name] ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] RFV2: RF6 ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1195) and (date_dim.d_month_seq >= 1184)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query9.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query9.out index 06cd8f92785e08..f159ed97647895 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query9.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query9.out @@ -1,8 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute[DistributionSpecGather] -----PhysicalProject +--PhysicalProject +----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] @@ -16,24 +16,17 @@ PhysicalResultSink --------------------------NestedLoopJoin[CROSS_JOIN] ----------------------------NestedLoopJoin[CROSS_JOIN] ------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------NestedLoopJoin[CROSS_JOIN] -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------------PhysicalProject -----------------------------------------filter((reason.r_reason_sk = 1)) -------------------------------------------PhysicalOlapScan[reason] ---------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[LOCAL] ---------------------------------------------PhysicalProject -----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) -------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ---------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------PhysicalProject +----------------------------------NestedLoopJoin[CROSS_JOIN] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) +----------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------PhysicalProject +--------------------------------------filter((reason.r_reason_sk = 1)) +----------------------------------------PhysicalOlapScan[reason] --------------------------------hashAgg[GLOBAL] ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] @@ -44,7 +37,7 @@ PhysicalResultSink --------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject ---------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) +--------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------PhysicalOlapScan[store_sales] ----------------------------hashAgg[GLOBAL] ------------------------------PhysicalDistribute[DistributionSpecGather] @@ -62,7 +55,7 @@ PhysicalResultSink --------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject ---------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) +--------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------PhysicalOlapScan[store_sales] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecGather] @@ -80,7 +73,7 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) +--------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------PhysicalOlapScan[store_sales] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecGather] @@ -98,7 +91,7 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +--------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------PhysicalOlapScan[store_sales] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] @@ -112,4 +105,10 @@ PhysicalResultSink --------------PhysicalProject ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------PhysicalOlapScan[store_sales] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +----------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query91.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query91.out index a2e5d4a7660114..4a730e739f3dfc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query91.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query91.out @@ -15,20 +15,20 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cr_returning_customer_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cr_returning_customer_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cc_call_center_sk->[cr_call_center_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cr_call_center_sk->[cc_call_center_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[call_center] apply RFs: RF0 ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[call_center] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 +--------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query94.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query94.out index d26128a78f3b6a..fe39761d74adb9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query94.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query94.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] -----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_returns] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((customer_address.ca_state = 'OK')) -----------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((web_site.web_company_name = 'pri')) -------------------------PhysicalOlapScan[web_site] +----------------------filter((customer_address.ca_state = 'OK')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((web_site.web_company_name = 'pri')) +--------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query95.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query95.out index 253f14febe60d7..7c953ee6a831c9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query95.out @@ -3,42 +3,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number];RF1 ws_order_number->[ws_order_number] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number];RF1 ws_order_number->[ws_order_number] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF14 RF15 +----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF14 RF15 +----------PhysicalOlapScan[web_sales] --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] ---------hashAgg[DISTINCT_GLOBAL] +--------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] +------------hashAgg[GLOBAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF12 web_site_sk->[ws_web_site_sk];RF13 web_site_sk->[ws_web_site_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF12 web_site_sk->[ws_web_site_sk];RF13 web_site_sk->[ws_web_site_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_ship_addr_sk];RF11 ca_address_sk->[ws_ship_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_ship_addr_sk];RF11 ca_address_sk->[ws_ship_addr_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_ship_date_sk];RF9 d_date_sk->[ws_ship_date_sk] -------------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[ws_order_number];RF7 ws_order_number->[ws_order_number] ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 ---------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[wr_order_number];RF5 ws_order_number->[wr_order_number];RF14 ws_order_number->[ws_order_number,ws_order_number];RF15 ws_order_number->[ws_order_number,ws_order_number] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 wr_order_number->[ws_order_number];RF3 wr_order_number->[ws_order_number] ---------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 RF12 RF13 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_ship_date_sk];RF9 d_date_sk->[ws_ship_date_sk] +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 wr_order_number->[ws_order_number,ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF5 ws_order_number->[ws_order_number] +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 RF7 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) -----------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 RF8 RF9 RF10 RF11 RF12 RF13 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[wr_order_number];RF3 ws_order_number->[wr_order_number] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 RF3 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------PhysicalProject -----------------------------filter((customer_address.ca_state = 'NC')) -------------------------------PhysicalOlapScan[customer_address] +----------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((web_site.web_company_name = 'pri')) ---------------------------PhysicalOlapScan[web_site] +------------------------filter((customer_address.ca_state = 'NC')) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((web_site.web_company_name = 'pri')) +----------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query99.out b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query99.out index addda24e68b119..b054b9a7e442cb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query99.out +++ b/regression-test/data/shape_check/tpcds_sf100/no_stats_shape/query99.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cs_call_center_sk->[cc_call_center_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 sm_ship_mode_sk->[cs_ship_mode_sk] +------------------------PhysicalOlapScan[call_center] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 cs_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[cs_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 cs_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[ship_mode] -----------------------PhysicalProject -------------------------PhysicalOlapScan[call_center] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query1.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query1.out index 777b75ff910eef..4cc300a40ec952 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query1.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query1.out @@ -18,20 +18,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ctr_customer_sk->[c_customer_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 --------------PhysicalProject -----------------PhysicalOlapScan[customer] apply RFs: RF3 ---------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] apply RFs: RF2 ------------------PhysicalProject --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 ----------------------PhysicalProject ------------------------filter((store.s_state = 'SD')) --------------------------PhysicalOlapScan[store] -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query10.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query10.out index 4dfc2de4cf3fe5..d5b06f584772b8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query10.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query10.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] -------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] -------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) ---------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query11.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query11.out index 71ebb9cdc249f1..0ee0b2908adc05 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query11.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query11.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.dyear = 2002) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query12.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query12.out index be61da2020ee40..6d9e989b19298d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query12.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query12.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '1998-05-06') and (date_dim.d_date >= '1998-04-06')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Books', 'Men', 'Sports')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Books', 'Men', 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '1998-05-06') and (date_dim.d_date >= '1998-04-06')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query13.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query13.out index 3d12d65a655dcb..37915578cb56c7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query13.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query13.out @@ -5,30 +5,30 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +----------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('KS', 'MI', 'SD'),(store_sales.ss_net_profit >= 100.00),(store_sales.ss_net_profit <= 200.00)],AND[ca_state IN ('CO', 'MO', 'ND'),(store_sales.ss_net_profit >= 150.00)],AND[ca_state IN ('NH', 'OH', 'TX'),(store_sales.ss_net_profit <= 250.00)]]) build RFs:RF3 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown')]] and cd_education_status IN ('4 yr Degree', 'College', 'Unknown') and cd_marital_status IN ('D', 'M', 'S')) ---------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('KS', 'MI', 'SD'),(store_sales.ss_net_profit >= 100.00),(store_sales.ss_net_profit <= 200.00)],AND[ca_state IN ('CO', 'MO', 'ND'),(store_sales.ss_net_profit >= 150.00)],AND[ca_state IN ('NH', 'OH', 'TX'),(store_sales.ss_net_profit <= 250.00)]]) build RFs:RF0 ca_address_sk->[ss_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ----------------------------PhysicalProject -------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------PhysicalOlapScan[store] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('CO', 'KS', 'MI', 'MO', 'ND', 'NH', 'OH', 'SD', 'TX')) ---------------------------------PhysicalOlapScan[customer_address] +------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((date_dim.d_year = 2001)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown')]] and cd_education_status IN ('4 yr Degree', 'College', 'Unknown') and cd_marital_status IN ('D', 'M', 'S')) +----------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject ----------------------filter(hd_dep_count IN (1, 3)) ------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalProject +------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('CO', 'KS', 'MI', 'MO', 'ND', 'NH', 'OH', 'SD', 'TX')) +--------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[store] +--------------filter((date_dim.d_year = 2001)) +----------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query14.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query14.out index 2a369f53078da5..b244860c5dad21 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query14.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query14.out @@ -7,48 +7,42 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalProject ----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 --------PhysicalIntersect RFV2: RF19[brand_id->i_brand_id] RF20[brand_id->i_brand_id] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -------------------------PhysicalProject ---------------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() +------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 -------------------------PhysicalProject ---------------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF2 RFV2: RF19 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF19 -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------PhysicalProject +------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 -------------------------PhysicalProject ---------------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF4 RFV2: RF20 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[web_sales] apply RFs: RF5 +----------------PhysicalProject +------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] @@ -82,18 +76,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[ss_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() --------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) @@ -104,18 +98,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() ---------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[cs_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF13 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() --------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF15 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) @@ -126,18 +120,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() ---------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF16 d_date_sk->[ws_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() --------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF18 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query15.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query15.out index ad96d87ceb1aeb..15d95f8bdf1c6f 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query15.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query15.out @@ -8,18 +8,18 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 +------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 ----------------------PhysicalProject -------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) ---------------------------PhysicalOlapScan[date_dim] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +--------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query16.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query16.out index b1b5037f23d714..28da4f0aec939d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query16.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query16.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF4 cc_call_center_sk->[cs_call_center_sk] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF3 cs_order_number->[cs_order_number] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[cs_ship_addr_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ---------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_returns] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'WV')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ---------------------------------PhysicalOlapScan[date_dim] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF1 cs_order_number->[cr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -----------------------------PhysicalOlapScan[call_center] +--------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'WV')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +--------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query17.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query17.out index 5342955a97aae2..f5771465f5a414 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query17.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query17.out @@ -9,36 +9,36 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -------------------------PhysicalProject ---------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF9 --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() +--------------------------PhysicalOlapScan[store] apply RFs: RF8 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -------------------------------------PhysicalProject ---------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] +------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) +--------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query18.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query18.out index cc7308bfd957b8..2319a393aab73e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query18.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query18.out @@ -10,33 +10,33 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[i_item_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[item] apply RFs: RF5 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 -----------------------------------PhysicalProject -------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) ---------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 +------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF2 ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cs_bill_customer_sk] --------------------------------------PhysicalProject -----------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 +------------------------------------------PhysicalProject +--------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) -------------------------------------------PhysicalOlapScan[customer_address] +----------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------------PhysicalProject +--------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) +----------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 1998)) ------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query19.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query19.out index b4e75c4f56a555..d9ecce18360cf4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query19.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query19.out @@ -11,25 +11,25 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ss_customer_sk->[c_customer_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------------PhysicalProject ---------------------------------------filter((item.i_manager_id = 2)) -----------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter((item.i_manager_id = 2)) +------------------------------------PhysicalOlapScan[item] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_address] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query20.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query20.out index 16785cbee81da3..3d0b0590dab75e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query20.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query20.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-02-25') and (date_dim.d_date >= '2002-01-26')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Books', 'Shoes', 'Women')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Books', 'Shoes', 'Women')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-02-25') and (date_dim.d_date >= '2002-01-26')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query21.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query21.out index 991b448adf9f0c..c81df7ac561759 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query21.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query21.out @@ -9,18 +9,18 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] -----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 inv_warehouse_sk->[w_warehouse_sk] ----------------------------PhysicalProject -------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) ---------------------------------PhysicalOlapScan[item] +------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 +----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 RF2 ------------------------PhysicalProject ---------------------------filter((date_dim.d_date <= '2002-03-29') and (date_dim.d_date >= '2002-01-28')) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) +----------------------------PhysicalOlapScan[item] --------------------PhysicalProject -----------------------PhysicalOlapScan[warehouse] +----------------------filter((date_dim.d_date <= '2002-03-29') and (date_dim.d_date >= '2002-01-28')) +------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query22.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query22.out index 7f10ebd7894ce7..0e006cb2e74317 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query22.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query22.out @@ -10,14 +10,14 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 +----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query23.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query23.out index 8b30252987f232..c716d437f1648b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query23.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query23.out @@ -5,17 +5,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() ------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------------PhysicalProject +------------------------filter(d_year IN (2000, 2001, 2002, 2003)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter(d_year IN (2000, 2001, 2002, 2003)) -----------------------PhysicalOlapScan[date_dim] ---------------PhysicalProject -----------------PhysicalOlapScan[item] +--------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) ----PhysicalCteProducer ( cteId=CTEId#2 ) ------PhysicalProject @@ -51,29 +53,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF4 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF8 ws_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 ws_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF7 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query24.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query24.out index c8dac09f5d2d79..4fcd9d102a31b4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query24.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query24.out @@ -7,46 +7,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk) and (store.s_zip = customer_address.ca_zip)) otherCondition=(( not (c_birth_country = upper(ca_country)))) ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +--------------------------PhysicalOlapScan[item] apply RFs: RF3 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ----------------------------PhysicalProject ------------------------------filter((store.s_market_id = 8)) --------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[customer] ----------------PhysicalProject -------------------PhysicalOlapScan[store_returns] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalProject ---------------------------filter((ssales.i_color = 'beige')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecGather] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalQuickSort[LOCAL_SORT] +--------PhysicalProject +----------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecGather] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------filter((ssales.i_color = 'beige')) +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query25.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query25.out index f4a203e70a0ca2..86294b1c768aea 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query25.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query25.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -----------------------PhysicalProject -------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[item] apply RFs: RF9 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() +------------------------PhysicalOlapScan[store] apply RFs: RF8 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -----------------------PhysicalProject -------------------------PhysicalOlapScan[store] +----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query26.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query26.out index 9f1f3154cc3470..4000cd04d9792a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query26.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query26.out @@ -8,24 +8,24 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[cs_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[cs_promo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'S')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ---------------------------PhysicalOlapScan[promotion] ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) +----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query27.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query27.out index 2dc8f171dee0d8..177d29256e307a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query27.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query27.out @@ -10,15 +10,15 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------------------PhysicalProject ------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'D')) --------------------------------------PhysicalOlapScan[customer_demographics] @@ -26,8 +26,8 @@ PhysicalResultSink --------------------------------filter((date_dim.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) +------------------------------PhysicalOlapScan[store] ----------------------PhysicalProject -------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) ---------------------------PhysicalOlapScan[store] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query29.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query29.out index 7fa2a8b96626a7..c96a8dc1d4403c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query29.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query29.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF7 sr_customer_sk->[cs_bill_customer_sk];RF8 sr_item_sk->[cs_item_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject -----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 ---------------------------------------PhysicalProject -----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] -------------------PhysicalProject ---------------------filter(d_year IN (1999, 2000, 2001)) -----------------------PhysicalOlapScan[date_dim] +----------------------------filter(d_year IN (1999, 2000, 2001)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query3.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query3.out index 4092c73d09fd5b..8beaf9b74953fb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query3.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query3.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manufact_id = 816)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 11)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 11)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manufact_id = 816)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query30.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query30.out index 7749fbe25590fa..2187690923a6e6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query30.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query30.out @@ -7,7 +7,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] --------------------PhysicalProject @@ -28,16 +28,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_birth_month,customer.c_birth_year,customer.c_birth_country,customer.c_login,customer.c_email_address,customer.c_last_review_date_sk,customer.c_salutation,customer.c_first_name,customer.c_last_name,customer.c_preferred_cust_flag,customer.c_birth_day)] apply RFs: RF2 RF3 +----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_birth_month,customer.c_birth_year,customer.c_birth_country,customer.c_login,customer.c_email_address,customer.c_last_review_date_sk,customer.c_salutation,customer.c_first_name,customer.c_last_name,customer.c_preferred_cust_flag,customer.c_birth_day)] apply RFs: RF3 --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((customer_address.ca_state = 'IN')) --------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query31.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query31.out index af4392c42a70b7..218ed4d3d7bf87 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query31.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query31.out @@ -39,29 +39,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] ----------------PhysicalProject -------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 2000)) ---------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF8 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county] ---------------------PhysicalProject -----------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 2000)) -------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() build RFs:RF4 ca_county->[ca_county] ----------------------------PhysicalProject ------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 2000)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 RF7 RF8 ----------------------------PhysicalProject ------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 2000)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 RF7 RF8 --------------------------PhysicalProject ----------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 2000)) ---------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) +--------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 RF8 +--------------------PhysicalProject +----------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 2000)) +------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF8 +----------------PhysicalProject +------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 2000)) +--------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query33.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query33.out index a09b5b4ae49b11..7e78fe98066b87 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query33.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query33.out @@ -9,75 +9,75 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Home')) -------------------------PhysicalOlapScan[item] apply RFs: RF3 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Home')) -------------------------PhysicalOlapScan[item] apply RFs: RF7 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Home')) -------------------------PhysicalOlapScan[item] apply RFs: RF11 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 ws_item_sk->[i_item_sk] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] apply RFs: RF10 +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query34.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query34.out index b1fdb6d566299a..206ca91734dce9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query34.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query34.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) @@ -13,20 +13,20 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject -----------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) -------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------filter((date_dim.d_dom <= 28) and (date_dim.d_dom >= 1) and OR[(date_dim.d_dom <= 3),(date_dim.d_dom >= 25)] and d_year IN (1998, 1999, 2000)) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_dom <= 28) and (date_dim.d_dom >= 1) and OR[(date_dim.d_dom <= 3),(date_dim.d_dom >= 25)] and d_year IN (1998, 1999, 2000)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Franklin Parish', 'Luce County', 'Richland County', 'Walker County', 'Williamson County', 'Ziebach County')) +--------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject ---------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Franklin Parish', 'Luce County', 'Richland County', 'Walker County', 'Williamson County', 'Ziebach County')) -----------------------------PhysicalOlapScan[store] +--------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) +----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query35.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query35.out index 243129c49d4681..b377a9e3c868a8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query35.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query35.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -------------------------------PhysicalOlapScan[date_dim] -----------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() +--------------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[customer] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer_demographics] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +--------------------------PhysicalProject +----------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query36.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query36.out index 78618ea60dfcc0..c84b04082b74d2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query36.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query36.out @@ -17,7 +17,9 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] apply RFs: RF1 ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject @@ -25,8 +27,6 @@ PhysicalResultSink ----------------------------------------PhysicalProject ------------------------------------------filter((d1.d_year = 2002)) --------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject ----------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query38.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query38.out index 7534ddcc8c2579..fb5c109395a15a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query38.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query38.out @@ -12,11 +12,11 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] @@ -40,11 +40,11 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query39.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query39.out index 899b1a5e0bdd99..747d5814fc09c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query39.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query39.out @@ -5,22 +5,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0)) --------hashAgg[GLOBAL] -----------PhysicalDistribute[DistributionSpecHash] -------------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] ---------------------------PhysicalOlapScan[inventory] apply RFs: RF0 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) -------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------PhysicalOlapScan[item] +--------------------PhysicalOlapScan[warehouse] apply RFs: RF1 ------------------PhysicalProject ---------------------PhysicalOlapScan[warehouse] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 inv_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF0 +----------------------PhysicalOlapScan[inventory] apply RFs: RF2 +--------------PhysicalProject +----------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) +------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query4.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query4.out index 450fea5d4b3933..35dd0e22c0eede 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query4.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query4.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -45,19 +45,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] ----------------------PhysicalProject ------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] ----------------------------PhysicalProject ------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query40.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query40.out index ade38048fb9732..b394b022d9b693 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query40.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query40.out @@ -8,23 +8,23 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 cs_warehouse_sk->[w_warehouse_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[warehouse] apply RFs: RF2 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cs_order_number->[cr_order_number];RF1 cs_item_sk->[cr_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +--------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 ------------------------------PhysicalProject ---------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter((date_dim.d_date <= '2001-05-02') and (date_dim.d_date >= '2001-03-03')) -------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 +----------------------PhysicalProject +------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) +--------------------------PhysicalOlapScan[item] ------------------PhysicalProject ---------------------PhysicalOlapScan[warehouse] +--------------------filter((date_dim.d_date <= '2001-05-02') and (date_dim.d_date >= '2001-03-03')) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query42.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query42.out index 5919f208ddfefb..f0c7ba1a2ee5d1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query42.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query42.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 1)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 1)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out index 0bac032032ce42..cab84e9ffbd10a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query44.out @@ -7,28 +7,23 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] +------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] --------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0 --------------------PhysicalProject -----------------------filter((V21.rnk < 11)) -------------------------PhysicalWindow ---------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute[DistributionSpecGather] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() +------------------------PhysicalProject +--------------------------filter((V11.rnk < 11)) +----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------PhysicalPartitionTopN ----------------------------------PhysicalProject ------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------filter((ss1.ss_store_sk = 146)) ---------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject @@ -38,19 +33,6 @@ PhysicalResultSink ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0 ---------------------PhysicalProject -----------------------filter((V11.rnk < 11)) -------------------------PhysicalWindow ---------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalPartitionTopN -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject ----------------------------------------hashAgg[GLOBAL] ------------------------------------------PhysicalDistribute[DistributionSpecHash] @@ -58,6 +40,13 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 146)) --------------------------------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalProject +--------------------------filter((V21.rnk < 11)) +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -68,4 +57,11 @@ PhysicalResultSink ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------PhysicalProject +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 146)) +--------------------------------------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query45.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query45.out index ce91eba8d0424e..d689b9d9d64b56 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query45.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query45.out @@ -11,20 +11,20 @@ PhysicalResultSink ----------------filter(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),$c$1]) ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF3 +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 ----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 ws_bill_customer_sk->[c_customer_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query46.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query46.out index 2b48783b05a5a4..cd307c3573e0f2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query46.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query46.out @@ -11,11 +11,13 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject @@ -24,13 +26,11 @@ PhysicalResultSink --------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter(OR[(household_demographics.hd_dep_count = 6),(household_demographics.hd_vehicle_count = 0)]) -------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) +------------------------------------PhysicalOlapScan[store] ----------------------------PhysicalProject -------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) ---------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] +------------------------------filter(OR[(household_demographics.hd_dep_count = 6),(household_demographics.hd_vehicle_count = 0)]) +--------------------------------PhysicalOlapScan[household_demographics] ----------------PhysicalProject ------------------PhysicalOlapScan[customer] ------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query47.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query47.out index 0a70cbcf51c3a2..f03f5ceae87b08 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query47.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query47.out @@ -14,16 +14,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------filter(OR[(date_dim.d_year = 2001),AND[(date_dim.d_year = 2000),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2002),(date_dim.d_moy = 1)]] and d_year IN (2000, 2001, 2002)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter(OR[(date_dim.d_year = 2001),AND[(date_dim.d_year = 2000),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2002),(date_dim.d_moy = 1)]] and d_year IN (2000, 2001, 2002)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] --PhysicalResultSink @@ -32,13 +32,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] +----------------PhysicalProject +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() build RFs:RF3 i_category->[i_category];RF4 i_brand->[i_brand];RF5 s_store_name->[s_store_name];RF6 s_company_name->[s_company_name];RF7 rn->[(rn + 1)] --------------------PhysicalProject ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 --------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalProject -------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query48.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query48.out index bc6273c3821e21..bf933c37426541 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query48.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query48.out @@ -5,25 +5,25 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +----------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('IA', 'MD', 'MN'),(store_sales.ss_net_profit <= 2000.00)],AND[ca_state IN ('IL', 'TX', 'VA'),(store_sales.ss_net_profit >= 150.00),(store_sales.ss_net_profit <= 3000.00)],AND[ca_state IN ('IN', 'MI', 'WI'),(store_sales.ss_net_profit >= 50.00)]]) build RFs:RF2 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('IA', 'MD', 'MN'),(store_sales.ss_net_profit <= 2000.00)],AND[ca_state IN ('IL', 'TX', 'VA'),(store_sales.ss_net_profit >= 150.00),(store_sales.ss_net_profit <= 3000.00)],AND[ca_state IN ('IN', 'MI', 'WI'),(store_sales.ss_net_profit >= 50.00)]]) build RFs:RF1 ca_address_sk->[ss_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------PhysicalOlapScan[store] apply RFs: RF0 ------------------------PhysicalProject ---------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'U', 'W')) -----------------------------PhysicalOlapScan[customer_demographics] +--------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 --------------------PhysicalProject -----------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('IA', 'IL', 'IN', 'MD', 'MI', 'MN', 'TX', 'VA', 'WI')) -------------------------PhysicalOlapScan[customer_address] +----------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'U', 'W')) +------------------------PhysicalOlapScan[customer_demographics] ----------------PhysicalProject -------------------filter((date_dim.d_year = 1999)) ---------------------PhysicalOlapScan[date_dim] +------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('IA', 'IL', 'IN', 'MD', 'MI', 'MN', 'TX', 'VA', 'WI')) +--------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[store] +--------------filter((date_dim.d_year = 1999)) +----------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query49.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query49.out index b13ecb58ccc887..d4961bd2428e6d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query49.out @@ -28,18 +28,18 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 -----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 ws_order_number->[wr_order_number];RF1 ws_item_sk->[wr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalTopN[MERGE_SORT] --------------------PhysicalDistribute[DistributionSpecGather] @@ -60,18 +60,18 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number];RF4 cs_item_sk->[cr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalTopN[MERGE_SORT] --------------------PhysicalDistribute[DistributionSpecGather] @@ -92,16 +92,16 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF8 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query5.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query5.out index c198b22632c4e6..ec57585eac12e7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query5.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query5.out @@ -64,11 +64,11 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] ---------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_sales] ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query50.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query50.out index 2f0a1b10cbff1b..de72e13c5324a1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query50.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query50.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[sr_returned_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 ss_sold_date_sk->[d_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF1 sr_ticket_number->[ss_ticket_number];RF2 sr_item_sk->[ss_item_sk];RF3 sr_customer_sk->[ss_customer_sk] +------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 +----------------------------PhysicalOlapScan[store] apply RFs: RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 ------------------------------PhysicalProject ---------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[store_sales] ------------------PhysicalProject ---------------------PhysicalOlapScan[store] +--------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query51.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query51.out index 9b4742d60618ee..134e4fdf28c8e7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query51.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query51.out @@ -18,9 +18,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -31,9 +31,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query52.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query52.out index 1eff8fc3ba89c1..15a333bc25275d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query52.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query52.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 1)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 1)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query53.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query53.out index 89dc632eb527c4..6cc3c447d13449 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query53.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query53.out @@ -8,25 +8,24 @@ PhysicalResultSink ----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute[DistributionSpecHash] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------------PhysicalProject -----------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) -------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalProject -------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------------------PhysicalProject +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query54.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query54.out index ad8a262d79400b..e124ce2b455011 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query54.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query54.out @@ -15,23 +15,21 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 ca_county->[s_county];RF6 ca_state->[s_state] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[store] apply RFs: RF5 RF6 --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF4 s_county->[ca_county];RF5 s_state->[ca_state] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 RF4 RF5 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject ------------------------------------------hashAgg[GLOBAL] --------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject ---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 customer_sk->[c_customer_sk] -----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------------PhysicalProject @@ -49,14 +47,22 @@ PhysicalResultSink --------------------------------------------------------PhysicalProject ----------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalProject +------------------------------------------------------PhysicalOlapScan[customer] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalProject ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +----------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] @@ -65,12 +71,6 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------hashAgg[LOCAL] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) -----------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query55.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query55.out index e24470e9606c8b..20d097ea52f2e0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query55.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query55.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 100)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 100)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query56.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query56.out index f6bec2a4d4d447..73c8e446f4cdbb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query56.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query56.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject @@ -23,61 +23,61 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 cs_bill_addr_sk->[ca_address_sk] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] apply RFs: RF7 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 +--------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ws_bill_addr_sk->[ca_address_sk] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] apply RFs: RF11 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query57.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query57.out index ca1f63bfb07616..90ca63ae673efa 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query57.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query57.out @@ -14,16 +14,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((call_center.cc_call_center_sk = catalog_sales.cs_call_center_sk)) otherCondition=() --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 cs_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------filter(OR[(date_dim.d_year = 1999),AND[(date_dim.d_year = 1998),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2000),(date_dim.d_moy = 1)]] and d_year IN (1998, 1999, 2000)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter(OR[(date_dim.d_year = 1999),AND[(date_dim.d_year = 1998),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2000),(date_dim.d_moy = 1)]] and d_year IN (1998, 1999, 2000)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[call_center] --PhysicalResultSink @@ -32,13 +32,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] +----------------PhysicalProject +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() build RFs:RF3 i_category->[i_category];RF4 i_brand->[i_brand];RF5 cc_name->[cc_name];RF6 rn->[(rn + 1)] --------------------PhysicalProject ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 --------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 1999)) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -----------------PhysicalProject -------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query58.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query58.out index 614cf3e281c232..3b3044c27ecdb8 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query58.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query58.out @@ -11,26 +11,26 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ws_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 ws_item_sk->[i_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF11 RF12 +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------PhysicalAssertNumRows ---------------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date = '2001-03-24')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF13 +--------------------------------------filter((date_dim.d_date = '2001-03-24')) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] ------------PhysicalProject --------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject @@ -38,49 +38,49 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cs_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 +----------------------------PhysicalProject +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +------------------------------------PhysicalAssertNumRows +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_date = '2001-03-24')) -------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------------------filter((date_dim.d_date = '2001-03-24')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 +----------------------------PhysicalProject +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 +------------------------------------PhysicalAssertNumRows +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 -----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_date = '2001-03-24')) -------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +------------------------------------------filter((date_dim.d_date = '2001-03-24')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query59.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query59.out index 2baf35086b9724..e6f93202c76782 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query59.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query59.out @@ -16,7 +16,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query6.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query6.out index 0e5441712726f9..567eed2483b54a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query6.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query6.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() +--------------------------PhysicalAssertNumRows +----------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------hashAgg[GLOBAL] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------hashAgg[LOCAL] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF1 d_month_seq->[d_month_seq] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalAssertNumRows -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------------hashAgg[LOCAL] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) -----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer_address] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query60.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query60.out index 4408176d2fbdec..2c2038cf390154 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query60.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query60.out @@ -37,9 +37,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 ca_address_sk->[cs_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject @@ -47,23 +47,23 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ca_address_sk->[ws_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -71,13 +71,13 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query61.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query61.out index ec1819093f180e..dae2a7ecb98546 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query61.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query61.out @@ -8,63 +8,63 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 ss_item_sk->[i_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------filter((item.i_category = 'Jewelry')) -----------------------PhysicalOlapScan[item] apply RFs: RF10 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 c_current_addr_sk->[ca_address_sk] -----------------------PhysicalProject -------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF9 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 ss_customer_sk->[c_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF8 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 ss_sold_date_sk->[d_date_sk] -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 ss_promo_sk->[p_promo_sk] -----------------------------------PhysicalProject -------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) ---------------------------------------PhysicalOlapScan[promotion] apply RFs: RF6 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 p_promo_sk->[ss_promo_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 RF10 --------------------------------------PhysicalProject ----------------------------------------filter((store.s_gmt_offset = -7.00)) ------------------------------------------PhysicalOlapScan[store] +----------------------------------PhysicalProject +------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) +--------------------------------------PhysicalOlapScan[promotion] +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 +----------------------PhysicalProject +------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((item.i_category = 'Jewelry')) +----------------------PhysicalOlapScan[item] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 ss_item_sk->[i_item_sk] -------------------PhysicalProject ---------------------filter((item.i_category = 'Jewelry')) -----------------------PhysicalOlapScan[item] apply RFs: RF4 +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ss_customer_sk->[c_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF2 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 ss_sold_date_sk->[d_date_sk] -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------PhysicalProject ------------------------------------filter((store.s_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[store] +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF3 +----------------------PhysicalProject +------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((item.i_category = 'Jewelry')) +----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query62.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query62.out index c23bff2b443621..d1813348a94190 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query62.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query62.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 ws_web_site_sk->[web_site_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +------------------------PhysicalOlapScan[web_site] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 ws_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] -----------------------PhysicalProject -------------------------PhysicalOlapScan[ship_mode] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ------------------PhysicalProject ---------------------PhysicalOlapScan[web_site] +--------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query63.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query63.out index 9653f6c52199aa..94e35cb7458980 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query63.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query63.out @@ -8,25 +8,24 @@ PhysicalResultSink ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute[DistributionSpecHash] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ---------------------------------------PhysicalProject -----------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) -------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalProject -------------------------------------filter(d_month_seq IN (1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------------------PhysicalProject +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter(d_month_seq IN (1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query64.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query64.out index e253bb99af68a0..4ed0b97c171cf5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query64.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query64.out @@ -7,85 +7,86 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF19 i_item_sk->[cr_item_sk,cs_item_sk,sr_item_sk,ss_item_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() build RFs:RF18 hd_income_band_sk->[ib_income_band_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF17 ss_customer_sk->[c_customer_sk] +----------------------PhysicalOlapScan[income_band] apply RFs: RF18 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() build RFs:RF17 hd_income_band_sk->[ib_income_band_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF17 -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd2.hd_income_band_sk = ib2.ib_income_band_sk)) otherCondition=() -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[household_demographics] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[income_band] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_demographics] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[income_band] apply RFs: RF17 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF11 ss_item_sk->[sr_item_sk];RF12 ss_ticket_number->[sr_ticket_number] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = ad2.ca_address_sk)) otherCondition=() build RFs:RF16 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_returns] apply RFs: RF11 RF12 +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF16 ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF10 ss_addr_sk->[ca_address_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = ad1.ca_address_sk)) otherCondition=() build RFs:RF15 ss_addr_sk->[ca_address_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 +----------------------------------PhysicalOlapScan[customer_address] apply RFs: RF15 --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF9 ss_cdemo_sk->[cd_demo_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_hdemo_sk = hd2.hd_demo_sk)) otherCondition=() build RFs:RF14 c_current_hdemo_sk->[hd_demo_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF9 -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[cr_item_sk,cs_item_sk,ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() -------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() -----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((hd1.hd_income_band_sk = ib1.ib_income_band_sk)) otherCondition=() ---------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() -------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF3 cs_item_sk->[ss_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 RF8 ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter(d_year IN (2001, 2002)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((sale > (2 * refund))) ---------------------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------------------------hashAgg[LOCAL] +--------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF14 +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = hd1.hd_demo_sk)) otherCondition=() build RFs:RF13 ss_hdemo_sk->[hd_demo_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[household_demographics] apply RFs: RF13 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF12 ss_promo_sk->[p_promo_sk] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[promotion] apply RFs: RF12 +--------------------------------------------PhysicalProject +----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=(( not (cd_marital_status = cd_marital_status))) build RFs:RF11 c_current_cdemo_sk->[cd_demo_sk] +------------------------------------------------PhysicalProject +--------------------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF11 +------------------------------------------------PhysicalProject +--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF10 ss_cdemo_sk->[cd_demo_sk] +----------------------------------------------------PhysicalProject +------------------------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF10 +----------------------------------------------------PhysicalProject +------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_shipto_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 c_first_shipto_date_sk->[d_date_sk] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_first_sales_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF8 c_first_sales_date_sk->[d_date_sk] +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 +------------------------------------------------------------PhysicalProject +--------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF7 ss_customer_sk->[c_customer_sk] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF7 +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF6 ss_store_sk->[s_store_sk] +--------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------PhysicalOlapScan[store] apply RFs: RF6 --------------------------------------------------------------------PhysicalProject -----------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +----------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------------------------------------------------PhysicalProject ---------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +--------------------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cs_ui.cs_item_sk)) otherCondition=() build RFs:RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +----------------------------------------------------------------------------PhysicalProject +------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +--------------------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF19 +--------------------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 RF19 +----------------------------------------------------------------------------PhysicalProject +------------------------------------------------------------------------------filter((sale > (2 * refund))) +--------------------------------------------------------------------------------hashAgg[GLOBAL] +----------------------------------------------------------------------------------PhysicalDistribute[DistributionSpecHash] +------------------------------------------------------------------------------------hashAgg[LOCAL] +--------------------------------------------------------------------------------------PhysicalProject +----------------------------------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +------------------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF19 +------------------------------------------------------------------------------------------PhysicalProject +--------------------------------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF19 ------------------------------------------------------------------------PhysicalProject ---------------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF8 -------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[household_demographics] ---------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[income_band] -----------------------------------------------PhysicalProject -------------------------------------------------PhysicalOlapScan[store] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[promotion] ---------------------------------------PhysicalProject -----------------------------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium')) -------------------------------------------PhysicalOlapScan[item] ---------------------PhysicalProject -----------------------PhysicalOlapScan[date_dim] +--------------------------------------------------------------------------filter(d_year IN (2001, 2002)) +----------------------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------PhysicalOlapScan[date_dim] +------------------filter((item.i_current_price <= 33.00) and (item.i_current_price >= 24.00) and i_color IN ('blanched', 'brown', 'burlywood', 'chocolate', 'drab', 'medium')) +--------------------PhysicalOlapScan[item] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query65.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query65.out index 9398beeafe3f44..ba604f3a1fc63e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query65.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query65.out @@ -7,29 +7,27 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[ss_store_sk] +----------------hashAgg[GLOBAL] +------------------PhysicalProject +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashAgg[LOCAL] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF4 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] apply RFs: RF2 --------------------PhysicalProject -----------------------PhysicalOlapScan[store] apply RFs: RF4 -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF1 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF1 ------------------------hashAgg[GLOBAL] --------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query66.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query66.out index a51ec7826cf6ba..3083f5d059d3c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query66.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query66.out @@ -14,18 +14,17 @@ PhysicalResultSink ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF3 sm_ship_mode_sk->[ws_ship_mode_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF2 t_time_sk->[ws_sold_time_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF0 sm_ship_mode_sk->[ws_ship_mode_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) -----------------------------------------------PhysicalOlapScan[ship_mode] +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -33,23 +32,23 @@ PhysicalResultSink ------------------------------------filter((time_dim.t_time <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] +--------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) +----------------------------------PhysicalOlapScan[ship_mode] --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF7 sm_ship_mode_sk->[cs_ship_mode_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[cs_sold_time_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF4 sm_ship_mode_sk->[cs_ship_mode_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 cs_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF4 ------------------------------------------PhysicalProject ---------------------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) -----------------------------------------------PhysicalOlapScan[ship_mode] +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -57,5 +56,6 @@ PhysicalResultSink ------------------------------------filter((time_dim.t_time <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] +--------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) +----------------------------------PhysicalOlapScan[ship_mode] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query67.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query67.out index c0e4655f9f1c98..d07dbaab87e846 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query67.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query67.out @@ -6,9 +6,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject @@ -17,16 +17,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------filter((date_dim.d_month_seq <= 1217) and (date_dim.d_month_seq >= 1206)) --------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------PhysicalOlapScan[store] --------------PhysicalProject -----------------PhysicalOlapScan[store] +----------------PhysicalOlapScan[item] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------filter((dw2.rk <= 100)) ------------PhysicalWindow ---------------PhysicalPartitionTopN +--------------PhysicalQuickSort[LOCAL_SORT] ----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalPartitionTopN --------------------PhysicalUnion diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query68.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query68.out index 8edc384cd49a83..abe7244f9940ba 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query68.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query68.out @@ -7,17 +7,13 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) ----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF4 +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 ----------------------------PhysicalProject @@ -37,4 +33,8 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------filter(OR[(household_demographics.hd_dep_count = 8),(household_demographics.hd_vehicle_count = -1)]) ------------------------------------PhysicalOlapScan[household_demographics] +--------------------PhysicalProject +----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] +----------------PhysicalProject +------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query69.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query69.out index a68ff0c1138094..28d0818b73ca4b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query69.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query69.out @@ -9,39 +9,39 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk] +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 -------------------------PhysicalProject ---------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) -----------------------------PhysicalOlapScan[date_dim] ---------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_ship_customer_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) -------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF2 c_current_cdemo_sk->[cd_demo_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF2 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] -------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ------------------------------PhysicalProject ---------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) -----------------------------------PhysicalOlapScan[customer_address] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) +--------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) +--------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_demographics] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------PhysicalProject +--------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query7.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query7.out index ad074d92dcc43c..0ca8a686c2c672 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query7.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query7.out @@ -8,24 +8,24 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[ss_promo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ---------------------------PhysicalOlapScan[promotion] ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) +----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query70.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query70.out index ae5b26647980e7..3401e56541bcfb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query70.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query70.out @@ -23,22 +23,22 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store] apply RFs: RF2 +--------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] --------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------------------------------------------PhysicalOlapScan[store] apply RFs: RF0 --------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) -------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------------------------------------PhysicalProject -------------------------------------------------PhysicalOlapScan[store] +------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) +--------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query71.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query71.out index e31a6aa1caa88d..d063330caa9136 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query71.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query71.out @@ -11,9 +11,9 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF2 t_time_sk->[cs_sold_time_sk,ss_sold_time_sk,ws_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ss_sold_date_sk,ws_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk,ss_item_sk,ws_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ss_item_sk,ws_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk,ss_sold_date_sk,ws_sold_date_sk] ----------------------------PhysicalUnion ------------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------------PhysicalProject @@ -25,11 +25,11 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------------PhysicalProject -------------------------------filter((item.i_manager_id = 1)) ---------------------------------PhysicalOlapScan[item] +------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) +--------------------------------PhysicalOlapScan[date_dim] ------------------------PhysicalProject ---------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter((item.i_manager_id = 1)) +----------------------------PhysicalOlapScan[item] --------------------PhysicalProject ----------------------filter(t_meal_time IN ('breakfast', 'dinner')) ------------------------PhysicalOlapScan[time_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query72.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query72.out index a052b1ac62fd13..556fb61997c76c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query72.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query72.out @@ -8,51 +8,47 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() +----------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() build RFs:RF10 cs_item_sk->[cr_item_sk];RF11 cs_order_number->[cr_order_number] ------------------PhysicalProject ---------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() +--------------------PhysicalOlapScan[catalog_returns] apply RFs: RF10 RF11 +------------------PhysicalProject +--------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 cs_promo_sk->[p_promo_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[promotion] apply RFs: RF9 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) build RFs:RF8 cs_ship_date_sk->[d_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF6 d_date_sk->[inv_date_sk];RF7 cs_item_sk->[inv_item_sk] -------------------------------PhysicalOlapScan[inventory] apply RFs: RF6 RF7 +----------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq];RF7 inv_date_sk->[d_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 RF7 ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq)) otherCondition=() +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[cs_bill_hdemo_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------------------------------PhysicalOlapScan[item] apply RFs: RF2 +----------------------------------------------PhysicalProject +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[cs_bill_hdemo_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) -----------------------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF1 --------------------------------------------------PhysicalProject -----------------------------------------------------filter((d1.d_year = 2002)) -------------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------------------PhysicalProject -------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ---------------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] +------------------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 +------------------------------------------------------PhysicalProject +--------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[item] +----------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) +------------------------------------------PhysicalOlapScan[household_demographics] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] -----------------------PhysicalProject -------------------------PhysicalOlapScan[promotion] -------------------PhysicalProject ---------------------PhysicalOlapScan[catalog_returns] - - - - group expression count exceeds memo_max_group_expression_size(15000) +------------------------------------filter((d1.d_year = 2002)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query73.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query73.out index bfc42f79bbc570..54b486b3ff020e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query73.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query73.out @@ -13,9 +13,9 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject @@ -24,9 +24,9 @@ PhysicalResultSink ----------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) ------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown')) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Fairfield County', 'Walker County')) +--------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject ---------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Fairfield County', 'Walker County')) -----------------------------PhysicalOlapScan[store] +--------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown')) +----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query74.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query74.out index 54d91c43da3120..ab90c00fe2787f 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query74.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query74.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query75.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query75.out index 89334acaef5f92..a4043ba0b6aa88 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query75.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query75.out @@ -9,9 +9,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------PhysicalUnion --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject @@ -24,48 +22,50 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalProject --------------------------filter(d_year IN (1998, 1999)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------PhysicalProject ------------------------------filter((item.i_category = 'Home')) --------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject --------------------------filter(d_year IN (1998, 1999)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_returns] --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 ws_order_number->[wr_order_number];RF11 ws_item_sk->[wr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[web_returns] apply RFs: RF10 RF11 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ws_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ----------------------------PhysicalProject ------------------------------filter((item.i_category = 'Home')) --------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject --------------------------filter(d_year IN (1998, 1999)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) build RFs:RF12 i_brand_id->[i_brand_id];RF13 i_class_id->[i_class_id];RF14 i_category_id->[i_category_id];RF15 i_manufact_id->[i_manufact_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) build RFs:RF6 i_brand_id->[i_brand_id];RF7 i_class_id->[i_class_id];RF8 i_category_id->[i_category_id];RF9 i_manufact_id->[i_manufact_id] --------------filter((curr_yr.d_year = 1999)) -----------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 RF13 RF14 RF15 +----------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 RF8 RF9 --------------filter((prev_yr.d_year = 1998)) ----------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query76.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query76.out index 5c06d2cace23e3..d4ff998b19635a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query76.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query76.out @@ -8,9 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 ss_sold_date_sk->[d_date_sk] -------------------PhysicalProject ---------------------PhysicalOlapScan[date_dim] apply RFs: RF3 +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() ------------------PhysicalUnion --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject @@ -36,4 +34,6 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------filter(cs_warehouse_sk IS NULL) ------------------------------PhysicalOlapScan[catalog_sales] +------------------PhysicalProject +--------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query77.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query77.out index 3f4330d7466b08..8d6c6d61c8625d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query77.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query77.out @@ -10,38 +10,35 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 sr_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject @@ -66,36 +63,33 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 ws_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF9 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wr_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF7 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query79.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query79.out index 89ea85a6285475..8f9b721f08ee59 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query79.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query79.out @@ -5,15 +5,15 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() +----------hashJoin[INNER_JOIN broadcast] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject @@ -22,11 +22,11 @@ PhysicalResultSink ----------------------------------filter((date_dim.d_dow = 1) and d_year IN (1998, 1999, 2000)) ------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter(OR[(household_demographics.hd_dep_count = 5),(household_demographics.hd_vehicle_count > 4)]) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) +--------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject ---------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) -----------------------------PhysicalOlapScan[store] +--------------------------filter(OR[(household_demographics.hd_dep_count = 5),(household_demographics.hd_vehicle_count > 4)]) +----------------------------PhysicalOlapScan[household_demographics] ------------PhysicalProject --------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query8.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query8.out index 8241234767d5a2..2843a7266bdb9e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query8.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query8.out @@ -22,26 +22,22 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------PhysicalIntersect RFV2: RF3[ca_zip->substring(ca_zip, 1, 5)] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ---------------------------------PhysicalOlapScan[customer_address] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((cnt > 10)) ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((cnt > 10)) +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalProject ---------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalProject ---------------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) -----------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 +----------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query80.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query80.out index 5afd260e3e1817..e9cb7c678b702c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query80.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query80.out @@ -15,86 +15,86 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF4 ss_item_sk->[sr_item_sk];RF5 ss_ticket_number->[sr_ticket_number] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF5 p_promo_sk->[ss_promo_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF5 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[ss_promo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store] apply RFs: RF3 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_item_sk->[sr_item_sk];RF1 ss_ticket_number->[sr_ticket_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 RF5 --------------------------------------------PhysicalProject -----------------------------------------------filter((item.i_current_price > 50.00)) -------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalProject -------------------------------------------filter((promotion.p_channel_tv = 'N')) ---------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[cs_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF9 cs_item_sk->[cr_item_sk];RF10 cs_order_number->[cr_order_number] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF9 RF10 +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[cs_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF8 p_promo_sk->[cs_promo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF9 cs_catalog_page_sk->[cp_catalog_page_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_page] apply RFs: RF9 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF6 cs_item_sk->[cr_item_sk];RF7 cs_order_number->[cr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 RF8 +--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 RF10 RF11 --------------------------------------------PhysicalProject -----------------------------------------------filter((item.i_current_price > 50.00)) -------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalProject -------------------------------------------filter((promotion.p_channel_tv = 'N')) ---------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_page] +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF16 ws_item_sk->[wr_item_sk];RF17 ws_order_number->[wr_order_number] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF16 RF17 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF17 p_promo_sk->[ws_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ws_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF14 p_promo_sk->[ws_promo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 ws_web_site_sk->[web_site_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF13 i_item_sk->[ws_item_sk] +------------------------------------------PhysicalOlapScan[web_site] apply RFs: RF15 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_item_sk->[wr_item_sk];RF13 ws_order_number->[wr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13 RF14 +--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF16 RF17 --------------------------------------------PhysicalProject -----------------------------------------------filter((item.i_current_price > 50.00)) -------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalProject -------------------------------------------filter((promotion.p_channel_tv = 'N')) ---------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_site] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query81.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query81.out index 76543856508ac0..d95cf3240abe7b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query81.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query81.out @@ -7,7 +7,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] --------------------PhysicalProject @@ -28,16 +28,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() --------------------------PhysicalProject ----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF3 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((customer_address.ca_state = 'CA')) --------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query83.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query83.out index 6a72866cf2b86c..bd20e2a899a623 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query83.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query83.out @@ -5,67 +5,67 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF12 item_id->[i_item_id] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[wr_returned_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 wr_item_sk->[i_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +----------------------------PhysicalProject +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------PhysicalProject +----------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) +------------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[sr_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cr_returned_date_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cr_item_sk->[i_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF7 ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[sr_returned_date_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF10 RF11 +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ------------------------------------PhysicalProject ---------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -----------------------------------------PhysicalProject -------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ---------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +--------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) +----------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 cr_item_sk->[i_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF7 RF13 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cr_returned_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 sr_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -------------------------------------PhysicalProject ---------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -----------------------------------------PhysicalProject -------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 wr_item_sk->[i_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF3 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[wr_returned_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 ----------------------------PhysicalProject ------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query84.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query84.out index 870b88c5adfca1..94a2a3a852c014 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query84.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query84.out @@ -9,23 +9,23 @@ PhysicalResultSink ------------PhysicalProject --------------PhysicalOlapScan[store_returns] apply RFs: RF4 ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF3 ib_income_band_sk->[hd_income_band_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 c_current_hdemo_sk->[hd_demo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 -------------------------PhysicalProject ---------------------------filter((customer_address.ca_city = 'Oakwood')) -----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[household_demographics] apply RFs: RF2 RF3 --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF0 ib_income_band_sk->[hd_income_band_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() ------------------------PhysicalProject ---------------------------PhysicalOlapScan[household_demographics] apply RFs: RF0 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_city = 'Oakwood')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((income_band.ib_lower_bound >= 5806) and (income_band.ib_upper_bound <= 55806)) -----------------------------PhysicalOlapScan[income_band] +--------------------------PhysicalOlapScan[customer_demographics] +----------------PhysicalProject +------------------filter((income_band.ib_lower_bound >= 5806) and (income_band.ib_upper_bound <= 55806)) +--------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query85.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query85.out index 143dae01fa79a2..4591cc14c0ac2b 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query85.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query85.out @@ -9,38 +9,38 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF5 wr_returning_cdemo_sk->[cd_demo_sk];RF6 cd_marital_status->[cd_marital_status];RF7 cd_education_status->[cd_education_status] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('DE', 'FL', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('ID', 'IN', 'ND'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('IL', 'MT', 'OH'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF7 ca_address_sk->[wr_refunded_addr_sk] ----------------------------PhysicalProject -------------------------------filter(cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) ---------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 RF7 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF4 wr_refunded_cdemo_sk->[cd_demo_sk] ---------------------------------PhysicalProject -----------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[wr_returning_cdemo_sk];RF5 cd_marital_status->[cd_marital_status];RF6 cd_education_status->[cd_education_status] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('DE', 'FL', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('ID', 'IN', 'ND'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('IL', 'MT', 'OH'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF3 ca_address_sk->[wr_refunded_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF3 cd_demo_sk->[wr_refunded_cdemo_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF1 ws_item_sk->[wr_item_sk];RF2 ws_order_number->[wr_order_number] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 ws_web_page_sk->[wp_web_page_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 RF3 +------------------------------------------PhysicalOlapScan[web_page] apply RFs: RF2 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject -----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) -------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 RF3 RF4 RF7 --------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_year = 2000)) -------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('DE', 'FL', 'ID', 'IL', 'IN', 'MT', 'ND', 'OH', 'TX')) -----------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) +----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 +--------------------------------PhysicalProject +----------------------------------filter(cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) +------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('DE', 'FL', 'ID', 'IL', 'IN', 'MT', 'ND', 'OH', 'TX')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[reason] +--------------------------filter((date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_page] +----------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query87.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query87.out index 32c3855f30b3fa..73c5f2afcd95a2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query87.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query87.out @@ -38,7 +38,7 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query88.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query88.out index a619efe9def125..ae9b03a84ef7de 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query88.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query88.out @@ -14,17 +14,17 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF22 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF21 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ---------------------------------------PhysicalOlapScan[time_dim] +------------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +--------------------------------------PhysicalOlapScan[household_demographics] ------------------------------PhysicalProject ---------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -----------------------------------PhysicalOlapScan[household_demographics] +--------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] @@ -34,17 +34,17 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF19 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF18 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ---------------------------------------PhysicalOlapScan[time_dim] +------------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +--------------------------------------PhysicalOlapScan[household_demographics] ------------------------------PhysicalProject ---------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -----------------------------------PhysicalOlapScan[household_demographics] +--------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) +----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] @@ -54,17 +54,17 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF16 t_time_sk->[ss_sold_time_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF15 hd_demo_sk->[ss_hdemo_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 --------------------------------PhysicalProject -----------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) -------------------------------------PhysicalOlapScan[time_dim] +----------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +------------------------------------PhysicalOlapScan[household_demographics] ----------------------------PhysicalProject -------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) +--------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalProject --------------------------filter((store.s_store_name = 'ese')) ----------------------------PhysicalOlapScan[store] @@ -74,17 +74,17 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF13 t_time_sk->[ss_sold_time_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF12 hd_demo_sk->[ss_hdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 ------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) -----------------------------------PhysicalOlapScan[time_dim] +--------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +----------------------------------PhysicalOlapScan[household_demographics] --------------------------PhysicalProject -----------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -------------------------------PhysicalOlapScan[household_demographics] +----------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject ------------------------filter((store.s_store_name = 'ese')) --------------------------PhysicalOlapScan[store] @@ -94,17 +94,17 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF10 t_time_sk->[ss_sold_time_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF9 hd_demo_sk->[ss_hdemo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ---------------------------------PhysicalOlapScan[time_dim] +------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +--------------------------------PhysicalOlapScan[household_demographics] ------------------------PhysicalProject ---------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -----------------------------PhysicalOlapScan[household_demographics] +--------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) +----------------------------PhysicalOlapScan[time_dim] --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] @@ -114,17 +114,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF7 t_time_sk->[ss_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF6 hd_demo_sk->[ss_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((store.s_store_name = 'ese')) ----------------------PhysicalOlapScan[store] @@ -134,17 +134,17 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ss_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +----------------------------PhysicalOlapScan[household_demographics] --------------------PhysicalProject -----------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -------------------------PhysicalOlapScan[household_demographics] +----------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) +------------------------PhysicalOlapScan[time_dim] ----------------PhysicalProject ------------------filter((store.s_store_name = 'ese')) --------------------PhysicalOlapScan[store] @@ -154,17 +154,17 @@ PhysicalResultSink ----------PhysicalProject ------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ss_sold_time_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ss_hdemo_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------PhysicalProject -------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------PhysicalOlapScan[time_dim] --------------PhysicalProject ----------------filter((store.s_store_name = 'ese')) ------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query9.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query9.out index 06cd8f92785e08..f159ed97647895 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query9.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query9.out @@ -1,8 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute[DistributionSpecGather] -----PhysicalProject +--PhysicalProject +----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] @@ -16,24 +16,17 @@ PhysicalResultSink --------------------------NestedLoopJoin[CROSS_JOIN] ----------------------------NestedLoopJoin[CROSS_JOIN] ------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------NestedLoopJoin[CROSS_JOIN] -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------------PhysicalProject -----------------------------------------filter((reason.r_reason_sk = 1)) -------------------------------------------PhysicalOlapScan[reason] ---------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[LOCAL] ---------------------------------------------PhysicalProject -----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) -------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ---------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------PhysicalProject +----------------------------------NestedLoopJoin[CROSS_JOIN] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) +----------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------PhysicalProject +--------------------------------------filter((reason.r_reason_sk = 1)) +----------------------------------------PhysicalOlapScan[reason] --------------------------------hashAgg[GLOBAL] ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] @@ -44,7 +37,7 @@ PhysicalResultSink --------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject ---------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) +--------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------PhysicalOlapScan[store_sales] ----------------------------hashAgg[GLOBAL] ------------------------------PhysicalDistribute[DistributionSpecGather] @@ -62,7 +55,7 @@ PhysicalResultSink --------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject ---------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) +--------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------PhysicalOlapScan[store_sales] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecGather] @@ -80,7 +73,7 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) +--------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------PhysicalOlapScan[store_sales] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecGather] @@ -98,7 +91,7 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +--------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------PhysicalOlapScan[store_sales] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] @@ -112,4 +105,10 @@ PhysicalResultSink --------------PhysicalProject ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------PhysicalOlapScan[store_sales] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +----------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query90.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query90.out index 13607b4ae13f5d..1f880a462795bc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query90.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query90.out @@ -10,17 +10,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ws_ship_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_dep_count = 2)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 2)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------PhysicalOlapScan[web_page] @@ -30,17 +30,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ws_ship_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_dep_count = 2)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 2)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query91.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query91.out index a780e5955cf371..4a730e739f3dfc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query91.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query91.out @@ -9,33 +9,33 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[c_current_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cr_returning_customer_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cr_returning_customer_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[c_current_hdemo_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cr_call_center_sk->[cc_call_center_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 +------------------------------------------PhysicalOlapScan[call_center] apply RFs: RF0 ----------------------------------------PhysicalProject -------------------------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'Unknown') and cd_marital_status IN ('M', 'W')) ---------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------filter((hd_buy_potential like '1001-5000%')) -----------------------------------------PhysicalOlapScan[household_demographics] +--------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'Unknown') and cd_marital_status IN ('M', 'W')) +----------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject -----------------------PhysicalOlapScan[call_center] +----------------------filter((hd_buy_potential like '1001-5000%')) +------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query93.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query93.out index 45f02ddf38ee38..77175ca96ff6bf 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query93.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query93.out @@ -8,14 +8,14 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN colocated] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF2 r_reason_sk->[sr_reason_sk] ------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF0 r_reason_sk->[sr_reason_sk] +--------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF0 sr_item_sk->[ss_item_sk];RF1 sr_ticket_number->[ss_ticket_number] ----------------------PhysicalProject -------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject -------------------------filter((reason.r_reason_desc = 'duplicate purchase')) ---------------------------PhysicalOlapScan[reason] +------------------------PhysicalOlapScan[store_returns] apply RFs: RF2 +------------------PhysicalProject +--------------------filter((reason.r_reason_desc = 'duplicate purchase')) +----------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query94.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query94.out index df854654271e34..fe39761d74adb9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query94.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query94.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF3 ws_order_number->[ws_order_number] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ---------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_returns] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'OK')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) ---------------------------------PhysicalOlapScan[date_dim] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((web_site.web_company_name = 'pri')) -----------------------------PhysicalOlapScan[web_site] +--------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'OK')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((web_site.web_company_name = 'pri')) +--------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query95.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query95.out index 623fe7152eccbb..8702a5a44f23eb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query95.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query95.out @@ -3,42 +3,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales] --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] ---------hashAgg[DISTINCT_GLOBAL] +--------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashAgg[GLOBAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'NC')) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk] +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) -----------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF6 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_returns] +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] +----------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------filter((customer_address.ca_state = 'NC')) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((web_site.web_company_name = 'pri')) +----------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query96.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query96.out index a7d441a3e3d0ee..9028fb34a8d1d3 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query96.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query96.out @@ -9,17 +9,17 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ss_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--------------------------filter((household_demographics.hd_dep_count = 3)) +----------------------------PhysicalOlapScan[household_demographics] --------------------PhysicalProject -----------------------filter((household_demographics.hd_dep_count = 3)) -------------------------PhysicalOlapScan[household_demographics] +----------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +------------------------PhysicalOlapScan[time_dim] ----------------PhysicalProject ------------------filter((store.s_store_name = 'ese')) --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query98.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query98.out index d1a4251b785e74..a50cfba68476d5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query98.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query98.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-06-19') and (date_dim.d_date >= '2002-05-20')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Music', 'Shoes', 'Sports')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Music', 'Shoes', 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-06-19') and (date_dim.d_date >= '2002-05-20')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query99.out b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query99.out index 6dbec861eaffd3..b054b9a7e442cb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/rf_prune/query99.out +++ b/regression-test/data/shape_check/tpcds_sf100/rf_prune/query99.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cs_call_center_sk->[cc_call_center_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() +------------------------PhysicalOlapScan[call_center] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 cs_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 cs_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] -----------------------PhysicalProject -------------------------PhysicalOlapScan[ship_mode] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject ---------------------PhysicalOlapScan[call_center] +--------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query1.out b/regression-test/data/shape_check/tpcds_sf100/shape/query1.out index 05ecb4a6ff3820..4cc300a40ec952 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query1.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query1.out @@ -18,20 +18,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ctr_customer_sk->[c_customer_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 --------------PhysicalProject -----------------PhysicalOlapScan[customer] apply RFs: RF3 ---------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF2 ctr_store_sk->[ctr_store_sk,s_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] apply RFs: RF2 ------------------PhysicalProject --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 ----------------------PhysicalProject ------------------------filter((store.s_state = 'SD')) ---------------------------PhysicalOlapScan[store] apply RFs: RF2 -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query10.out b/regression-test/data/shape_check/tpcds_sf100/shape/query10.out index 4dfc2de4cf3fe5..15825433a8a2b6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query10.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query10.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] -------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy <= 4) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] -------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(ca_county IN ('Cochran County', 'Kandiyohi County', 'Marquette County', 'Storey County', 'Warren County')) ---------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query11.out b/regression-test/data/shape_check/tpcds_sf100/shape/query11.out index 4f18f3d1d47bcf..b5db5b5c6822ad 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query11.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query11.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2002) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.dyear = 2002) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query12.out b/regression-test/data/shape_check/tpcds_sf100/shape/query12.out index be61da2020ee40..6d9e989b19298d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query12.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query12.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '1998-05-06') and (date_dim.d_date >= '1998-04-06')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Books', 'Men', 'Sports')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Books', 'Men', 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '1998-05-06') and (date_dim.d_date >= '1998-04-06')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query13.out b/regression-test/data/shape_check/tpcds_sf100/shape/query13.out index cbe3d20af3d426..37915578cb56c7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query13.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query13.out @@ -5,30 +5,30 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('KS', 'MI', 'SD'),(store_sales.ss_net_profit >= 100.00),(store_sales.ss_net_profit <= 200.00)],AND[ca_state IN ('CO', 'MO', 'ND'),(store_sales.ss_net_profit >= 150.00)],AND[ca_state IN ('NH', 'OH', 'TX'),(store_sales.ss_net_profit <= 250.00)]]) build RFs:RF3 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown')]] and cd_education_status IN ('4 yr Degree', 'College', 'Unknown') and cd_marital_status IN ('D', 'M', 'S')) ---------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('KS', 'MI', 'SD'),(store_sales.ss_net_profit >= 100.00),(store_sales.ss_net_profit <= 200.00)],AND[ca_state IN ('CO', 'MO', 'ND'),(store_sales.ss_net_profit >= 150.00)],AND[ca_state IN ('NH', 'OH', 'TX'),(store_sales.ss_net_profit <= 250.00)]]) build RFs:RF0 ca_address_sk->[ss_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ----------------------------PhysicalProject -------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 +------------------------------PhysicalOlapScan[store] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('CO', 'KS', 'MI', 'MO', 'ND', 'NH', 'OH', 'SD', 'TX')) ---------------------------------PhysicalOlapScan[customer_address] +------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((date_dim.d_year = 2001)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '4 yr Degree')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Unknown')]] and cd_education_status IN ('4 yr Degree', 'College', 'Unknown') and cd_marital_status IN ('D', 'M', 'S')) +----------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject ----------------------filter(hd_dep_count IN (1, 3)) ------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalProject +------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('CO', 'KS', 'MI', 'MO', 'ND', 'NH', 'OH', 'SD', 'TX')) +--------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[store] +--------------filter((date_dim.d_year = 2001)) +----------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query14.out b/regression-test/data/shape_check/tpcds_sf100/shape/query14.out index 517eb87bea6a74..794e2803764cf6 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query14.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query14.out @@ -7,48 +7,42 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalProject ----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 --------PhysicalIntersect RFV2: RF19[brand_id->i_brand_id] RF20[brand_id->i_brand_id] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------PhysicalProject ---------------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] +------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalProject ---------------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF2 RFV2: RF19 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF19 -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------PhysicalProject +------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ws_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------PhysicalProject ---------------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF4 RFV2: RF20 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[web_sales] apply RFs: RF5 +----------------PhysicalProject +------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] @@ -82,18 +76,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ss_item_sk,ss_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF11 ss_item_sk->[ss_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ss_item_sk,ss_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF10 ss_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 RF12 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF11 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) @@ -104,18 +98,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF15 i_item_sk->[cs_item_sk,ss_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF14 ss_item_sk->[cs_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[cs_item_sk,ss_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF13 ss_item_sk->[cs_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF13 RF14 RF15 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF15 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF14 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) @@ -126,18 +120,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF18 i_item_sk->[ss_item_sk,ws_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 ss_item_sk->[ws_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF16 d_date_sk->[ws_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF17 i_item_sk->[ss_item_sk,ws_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ss_item_sk->[ws_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17 RF18 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF18 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF17 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query15.out b/regression-test/data/shape_check/tpcds_sf100/shape/query15.out index 27a755cd0cba54..15d95f8bdf1c6f 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query15.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query15.out @@ -8,18 +8,18 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 +------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 ----------------------PhysicalProject -------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) ---------------------------PhysicalOlapScan[date_dim] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +--------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2001)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query16.out b/regression-test/data/shape_check/tpcds_sf100/shape/query16.out index b1b5037f23d714..28da4f0aec939d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query16.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query16.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF4 cc_call_center_sk->[cs_call_center_sk] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF3 cs_order_number->[cs_order_number] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[cs_ship_addr_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] ---------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_returns] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'WV')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ---------------------------------PhysicalOlapScan[date_dim] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF1 cs_order_number->[cr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) -----------------------------PhysicalOlapScan[call_center] +--------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'WV')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter(cc_county IN ('Barrow County', 'Daviess County', 'Luce County', 'Richland County', 'Ziebach County')) +--------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query17.out b/regression-test/data/shape_check/tpcds_sf100/shape/query17.out index 7cc4a196c206c3..f5771465f5a414 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query17.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query17.out @@ -9,36 +9,36 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -------------------------PhysicalProject ---------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF9 --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +--------------------------PhysicalOlapScan[store] apply RFs: RF8 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF5 -------------------------------------PhysicalProject ---------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] +------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) +--------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query18.out b/regression-test/data/shape_check/tpcds_sf100/shape/query18.out index cc7308bfd957b8..6fa19e55461ccb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query18.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query18.out @@ -10,33 +10,33 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[i_item_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[item] apply RFs: RF5 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[cs_item_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 -----------------------------------PhysicalProject -------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) ---------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 +------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF2 ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cs_bill_customer_sk] --------------------------------------PhysicalProject -----------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 RF5 +------------------------------------------PhysicalProject +--------------------------------------------filter((cd1.cd_education_status = 'Advanced Degree') and (cd1.cd_gender = 'F')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) -------------------------------------------PhysicalOlapScan[customer_address] +----------------------------------------filter(c_birth_month IN (1, 10, 2, 4, 7, 8)) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------------PhysicalProject +--------------------------------filter(ca_state IN ('GA', 'IN', 'ME', 'NC', 'OK', 'WA', 'WY')) +----------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 1998)) ------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query19.out b/regression-test/data/shape_check/tpcds_sf100/shape/query19.out index 3fc21ff2ab0f1f..33660787d33ce4 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query19.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query19.out @@ -11,25 +11,25 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ss_customer_sk->[c_customer_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF4 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ------------------------------------PhysicalProject ---------------------------------------filter((item.i_manager_id = 2)) -----------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter((item.i_manager_id = 2)) +------------------------------------PhysicalOlapScan[item] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_address] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query20.out b/regression-test/data/shape_check/tpcds_sf100/shape/query20.out index 16785cbee81da3..3d0b0590dab75e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query20.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query20.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-02-25') and (date_dim.d_date >= '2002-01-26')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Books', 'Shoes', 'Women')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Books', 'Shoes', 'Women')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-02-25') and (date_dim.d_date >= '2002-01-26')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query21.out b/regression-test/data/shape_check/tpcds_sf100/shape/query21.out index e80000c6353128..c81df7ac561759 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query21.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query21.out @@ -9,18 +9,18 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] -----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 inv_warehouse_sk->[w_warehouse_sk] ----------------------------PhysicalProject -------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) ---------------------------------PhysicalOlapScan[item] +------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 +----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 RF2 ------------------------PhysicalProject ---------------------------filter((date_dim.d_date <= '2002-03-29') and (date_dim.d_date >= '2002-01-28')) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) +----------------------------PhysicalOlapScan[item] --------------------PhysicalProject -----------------------PhysicalOlapScan[warehouse] +----------------------filter((date_dim.d_date <= '2002-03-29') and (date_dim.d_date >= '2002-01-28')) +------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query22.out b/regression-test/data/shape_check/tpcds_sf100/shape/query22.out index a96dc0686f150d..267f58a810d1bb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query22.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query22.out @@ -10,14 +10,14 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1199) and (date_dim.d_month_seq >= 1188)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query23.out b/regression-test/data/shape_check/tpcds_sf100/shape/query23.out index d9d9316520d44f..9ce49a1a367344 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query23.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query23.out @@ -5,17 +5,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------PhysicalProject +------------------------filter(d_year IN (2000, 2001, 2002, 2003)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter(d_year IN (2000, 2001, 2002, 2003)) -----------------------PhysicalOlapScan[date_dim] ---------------PhysicalProject -----------------PhysicalOlapScan[item] +--------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) ----PhysicalCteProducer ( cteId=CTEId#2 ) ------PhysicalProject @@ -51,29 +53,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF4 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF3 item_sk->[cs_item_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF5 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF8 ws_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 ws_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF7 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 item_sk->[ws_item_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF8 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query24.out b/regression-test/data/shape_check/tpcds_sf100/shape/query24.out index 8c90a2a20516aa..1cab0a3549f9e2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query24.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query24.out @@ -7,46 +7,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF5 sr_ticket_number->[ss_ticket_number];RF6 sr_item_sk->[i_item_sk,ss_item_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk) and (store.s_zip = customer_address.ca_zip)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF5 ca_address_sk->[c_current_addr_sk];RF6 ca_zip->[s_zip] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ca_zip->[s_zip];RF3 c_customer_sk->[ss_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF3 RF4 RF5 RF6 -----------------------------PhysicalProject -------------------------------filter((store.s_market_id = 8)) ---------------------------------PhysicalOlapScan[store] apply RFs: RF2 +--------------------------PhysicalOlapScan[item] apply RFs: RF3 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF0 ca_address_sk->[c_current_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +------------------------------filter((store.s_market_id = 8)) +--------------------------------PhysicalOlapScan[store] apply RFs: RF6 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] apply RFs: RF6 +----------------------PhysicalOlapScan[customer] apply RFs: RF5 ----------------PhysicalProject -------------------PhysicalOlapScan[store_returns] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalProject ---------------------------filter((ssales.i_color = 'beige')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecGather] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalQuickSort[LOCAL_SORT] +--------PhysicalProject +----------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecGather] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------filter((ssales.i_color = 'beige')) +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query25.out b/regression-test/data/shape_check/tpcds_sf100/shape/query25.out index a9f0a2a72e7793..86294b1c768aea 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query25.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query25.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -----------------------PhysicalProject -------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[item] apply RFs: RF9 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +------------------------PhysicalOlapScan[store] apply RFs: RF8 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) --------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF5 -----------------------------------PhysicalProject -------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -----------------------PhysicalProject -------------------------PhysicalOlapScan[store] +----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query26.out b/regression-test/data/shape_check/tpcds_sf100/shape/query26.out index 39bc3fd4890aac..4000cd04d9792a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query26.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query26.out @@ -8,24 +8,24 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[cs_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[cs_promo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'S')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ---------------------------PhysicalOlapScan[promotion] ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) +----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query27.out b/regression-test/data/shape_check/tpcds_sf100/shape/query27.out index 3ddc47823586a0..6c165f752b9a50 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query27.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query27.out @@ -10,9 +10,9 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject @@ -26,8 +26,8 @@ PhysicalResultSink --------------------------------filter((date_dim.d_year = 1999)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) +------------------------------PhysicalOlapScan[store] ----------------------PhysicalProject -------------------------filter(s_state IN ('AL', 'LA', 'MI', 'MO', 'SC', 'TN')) ---------------------------PhysicalOlapScan[store] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query29.out b/regression-test/data/shape_check/tpcds_sf100/shape/query29.out index 53995b4a88e7d9..c96a8dc1d4403c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query29.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query29.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF7 sr_customer_sk->[cs_bill_customer_sk];RF8 sr_item_sk->[cs_item_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF6 s_store_sk->[ss_store_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject -----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF5 ---------------------------------------PhysicalProject -----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] -------------------PhysicalProject ---------------------filter(d_year IN (1999, 2000, 2001)) -----------------------PhysicalOlapScan[date_dim] +----------------------------filter(d_year IN (1999, 2000, 2001)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query3.out b/regression-test/data/shape_check/tpcds_sf100/shape/query3.out index 4092c73d09fd5b..8beaf9b74953fb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query3.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query3.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manufact_id = 816)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 11)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 11)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manufact_id = 816)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query30.out b/regression-test/data/shape_check/tpcds_sf100/shape/query30.out index 002bd9732c26b7..3226807b89d8e9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query30.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query30.out @@ -7,7 +7,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] --------------------PhysicalProject @@ -37,7 +37,5 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query31.out b/regression-test/data/shape_check/tpcds_sf100/shape/query31.out index d45dad8dca8825..c3548bb8059efe 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query31.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query31.out @@ -39,29 +39,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] ----------------PhysicalProject -------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 2000)) ---------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF8 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county] ---------------------PhysicalProject -----------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 2000)) -------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() build RFs:RF4 ca_county->[ca_county] ----------------------------PhysicalProject ------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 2000)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 RF7 RF8 ----------------------------PhysicalProject ------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 2000)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 RF7 RF8 --------------------------PhysicalProject ----------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 2000)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 2000)) ---------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) +--------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 RF8 +--------------------PhysicalProject +----------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 2000)) +------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF8 +----------------PhysicalProject +------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 2000)) +--------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query33.out b/regression-test/data/shape_check/tpcds_sf100/shape/query33.out index f5b2b8cb633ca6..7e78fe98066b87 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query33.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query33.out @@ -9,75 +9,75 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Home')) -------------------------PhysicalOlapScan[item] apply RFs: RF3 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Home')) -------------------------PhysicalOlapScan[item] apply RFs: RF7 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Home')) -------------------------PhysicalOlapScan[item] apply RFs: RF11 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 ws_item_sk->[i_item_sk] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] apply RFs: RF10 +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 2002)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query34.out b/regression-test/data/shape_check/tpcds_sf100/shape/query34.out index b1fdb6d566299a..206ca91734dce9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query34.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query34.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] ------------PhysicalProject --------------PhysicalOlapScan[customer] apply RFs: RF3 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) @@ -13,20 +13,20 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject -----------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) -------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------filter((date_dim.d_dom <= 28) and (date_dim.d_dom >= 1) and OR[(date_dim.d_dom <= 3),(date_dim.d_dom >= 25)] and d_year IN (1998, 1999, 2000)) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_dom <= 28) and (date_dim.d_dom >= 1) and OR[(date_dim.d_dom <= 3),(date_dim.d_dom >= 25)] and d_year IN (1998, 1999, 2000)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Franklin Parish', 'Luce County', 'Richland County', 'Walker County', 'Williamson County', 'Ziebach County')) +--------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject ---------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Franklin Parish', 'Luce County', 'Richland County', 'Walker County', 'Williamson County', 'Ziebach County')) -----------------------------PhysicalOlapScan[store] +--------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) +----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query35.out b/regression-test/data/shape_check/tpcds_sf100/shape/query35.out index 1f9a0fc6a432ce..6fe507571d6b6a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query35.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query35.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -------------------------------PhysicalOlapScan[date_dim] -----------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[c_current_cdemo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +--------------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[customer] apply RFs: RF5 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer_demographics] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +--------------------------PhysicalProject +----------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query36.out b/regression-test/data/shape_check/tpcds_sf100/shape/query36.out index 92f5563f1a38b5..c84b04082b74d2 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query36.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query36.out @@ -17,16 +17,16 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] apply RFs: RF1 ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 ----------------------------------------PhysicalProject ------------------------------------------filter((d1.d_year = 2002)) --------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject ----------------------------------filter(s_state IN ('AL', 'GA', 'MI', 'MO', 'OH', 'SC', 'SD', 'TN')) ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query38.out b/regression-test/data/shape_check/tpcds_sf100/shape/query38.out index e55825e7e76457..56e752bb73745e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query38.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query38.out @@ -12,11 +12,11 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] @@ -40,11 +40,11 @@ PhysicalResultSink ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1194) and (date_dim.d_month_seq >= 1183)) ----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query39.out b/regression-test/data/shape_check/tpcds_sf100/shape/query39.out index b7ca740e55c672..747d5814fc09c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query39.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query39.out @@ -5,22 +5,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0)) --------hashAgg[GLOBAL] -----------PhysicalDistribute[DistributionSpecHash] -------------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] ---------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) -------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------PhysicalOlapScan[item] +--------------------PhysicalOlapScan[warehouse] apply RFs: RF1 ------------------PhysicalProject ---------------------PhysicalOlapScan[warehouse] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 inv_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF0 +----------------------PhysicalOlapScan[inventory] apply RFs: RF2 +--------------PhysicalProject +----------------filter((date_dim.d_year = 1998) and d_moy IN (1, 2)) +------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query4.out b/regression-test/data/shape_check/tpcds_sf100/shape/query4.out index c632e138df6ec4..cee8d253c1b8d0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query4.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query4.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk,ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk,ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -45,19 +45,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] ----------------------PhysicalProject ------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] ----------------------------PhysicalProject ------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query40.out b/regression-test/data/shape_check/tpcds_sf100/shape/query40.out index 5ff27658e2ed3f..b394b022d9b693 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query40.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query40.out @@ -8,23 +8,23 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 w_warehouse_sk->[cs_warehouse_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 cs_warehouse_sk->[w_warehouse_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[warehouse] apply RFs: RF2 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cs_order_number->[cr_order_number];RF1 cs_item_sk->[cr_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 +--------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 ------------------------------PhysicalProject ---------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter((date_dim.d_date <= '2001-05-02') and (date_dim.d_date >= '2001-03-03')) -------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 +----------------------PhysicalProject +------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) +--------------------------PhysicalOlapScan[item] ------------------PhysicalProject ---------------------PhysicalOlapScan[warehouse] +--------------------filter((date_dim.d_date <= '2001-05-02') and (date_dim.d_date >= '2001-03-03')) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query42.out b/regression-test/data/shape_check/tpcds_sf100/shape/query42.out index 5919f208ddfefb..f0c7ba1a2ee5d1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query42.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query42.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 1)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 11) and (dt.d_year = 2002)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 1)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query44.out b/regression-test/data/shape_check/tpcds_sf100/shape/query44.out index 0bac032032ce42..cab84e9ffbd10a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query44.out @@ -7,28 +7,23 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] +------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] --------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0 --------------------PhysicalProject -----------------------filter((V21.rnk < 11)) -------------------------PhysicalWindow ---------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute[DistributionSpecGather] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() +------------------------PhysicalProject +--------------------------filter((V11.rnk < 11)) +----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------PhysicalPartitionTopN ----------------------------------PhysicalProject ------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------filter((ss1.ss_store_sk = 146)) ---------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject @@ -38,19 +33,6 @@ PhysicalResultSink ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0 ---------------------PhysicalProject -----------------------filter((V11.rnk < 11)) -------------------------PhysicalWindow ---------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalPartitionTopN -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject ----------------------------------------hashAgg[GLOBAL] ------------------------------------------PhysicalDistribute[DistributionSpecHash] @@ -58,6 +40,13 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 146)) --------------------------------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalProject +--------------------------filter((V21.rnk < 11)) +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -68,4 +57,11 @@ PhysicalResultSink ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 146) and ss_addr_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------PhysicalProject +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 146)) +--------------------------------------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query45.out b/regression-test/data/shape_check/tpcds_sf100/shape/query45.out index be9ddd601a67a8..d689b9d9d64b56 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query45.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query45.out @@ -11,20 +11,20 @@ PhysicalResultSink ----------------filter(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),$c$1]) ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 ----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 ws_bill_customer_sk->[c_customer_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query46.out b/regression-test/data/shape_check/tpcds_sf100/shape/query46.out index 13bf6421c7ed3a..ee3653866646ce 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query46.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query46.out @@ -11,26 +11,26 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ------------------------------------PhysicalProject --------------------------------------filter(d_dow IN (0, 6) and d_year IN (1999, 2000, 2001)) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter(OR[(household_demographics.hd_dep_count = 6),(household_demographics.hd_vehicle_count = 0)]) -------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) +------------------------------------PhysicalOlapScan[store] ----------------------------PhysicalProject -------------------------------filter(s_city IN ('Centerville', 'Fairview', 'Five Points', 'Liberty', 'Oak Grove')) ---------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] +------------------------------filter(OR[(household_demographics.hd_dep_count = 6),(household_demographics.hd_vehicle_count = 0)]) +--------------------------------PhysicalOlapScan[household_demographics] ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF5 ------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query47.out b/regression-test/data/shape_check/tpcds_sf100/shape/query47.out index fba9743e0f2353..28820a16cea133 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query47.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query47.out @@ -14,16 +14,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------filter(OR[(date_dim.d_year = 2001),AND[(date_dim.d_year = 2000),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2002),(date_dim.d_moy = 1)]] and d_year IN (2000, 2001, 2002)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter(OR[(date_dim.d_year = 2001),AND[(date_dim.d_year = 2000),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2002),(date_dim.d_moy = 1)]] and d_year IN (2000, 2001, 2002)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store] --PhysicalResultSink @@ -32,13 +32,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category,i_category];RF9 i_brand->[i_brand,i_brand];RF10 s_store_name->[s_store_name,s_store_name];RF11 s_company_name->[s_company_name,s_company_name];RF12 expr_(rn - 1)->[(rn + 1),rn] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] +----------------PhysicalProject +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() build RFs:RF3 i_category->[i_category];RF4 i_brand->[i_brand];RF5 s_store_name->[s_store_name];RF6 s_company_name->[s_company_name];RF7 rn->[(rn + 1)] --------------------PhysicalProject -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 RF8 RF9 RF10 RF11 RF12 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 --------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 -----------------PhysicalProject -------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query48.out b/regression-test/data/shape_check/tpcds_sf100/shape/query48.out index 82bba37deb0400..bf933c37426541 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query48.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query48.out @@ -5,25 +5,25 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('IA', 'MD', 'MN'),(store_sales.ss_net_profit <= 2000.00)],AND[ca_state IN ('IL', 'TX', 'VA'),(store_sales.ss_net_profit >= 150.00),(store_sales.ss_net_profit <= 3000.00)],AND[ca_state IN ('IN', 'MI', 'WI'),(store_sales.ss_net_profit >= 50.00)]]) build RFs:RF2 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('IA', 'MD', 'MN'),(store_sales.ss_net_profit <= 2000.00)],AND[ca_state IN ('IL', 'TX', 'VA'),(store_sales.ss_net_profit >= 150.00),(store_sales.ss_net_profit <= 3000.00)],AND[ca_state IN ('IN', 'MI', 'WI'),(store_sales.ss_net_profit >= 50.00)]]) build RFs:RF1 ca_address_sk->[ss_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------PhysicalOlapScan[store] apply RFs: RF0 ------------------------PhysicalProject ---------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'U', 'W')) -----------------------------PhysicalOlapScan[customer_demographics] +--------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 --------------------PhysicalProject -----------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('IA', 'IL', 'IN', 'MD', 'MI', 'MN', 'TX', 'VA', 'WI')) -------------------------PhysicalOlapScan[customer_address] +----------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = '2 yr Degree')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'U', 'W')) +------------------------PhysicalOlapScan[customer_demographics] ----------------PhysicalProject -------------------filter((date_dim.d_year = 1999)) ---------------------PhysicalOlapScan[date_dim] +------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('IA', 'IL', 'IN', 'MD', 'MI', 'MN', 'TX', 'VA', 'WI')) +--------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[store] +--------------filter((date_dim.d_year = 1999)) +----------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query49.out b/regression-test/data/shape_check/tpcds_sf100/shape/query49.out index b13ecb58ccc887..d4961bd2428e6d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query49.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query49.out @@ -28,18 +28,18 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 -----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 ws_order_number->[wr_order_number];RF1 ws_item_sk->[wr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalTopN[MERGE_SORT] --------------------PhysicalDistribute[DistributionSpecGather] @@ -60,18 +60,18 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number];RF4 cs_item_sk->[cr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalTopN[MERGE_SORT] --------------------PhysicalDistribute[DistributionSpecGather] @@ -92,16 +92,16 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF8 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1999)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query5.out b/regression-test/data/shape_check/tpcds_sf100/shape/query5.out index d61bb667b491c6..393d0aff07b849 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query5.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query5.out @@ -64,11 +64,11 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 ws_item_sk->[wr_item_sk];RF5 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 RF6 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF7 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query50.out b/regression-test/data/shape_check/tpcds_sf100/shape/query50.out index f5c3f38463d42c..b0c225dcbaad90 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query50.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query50.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[sr_returned_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 ss_sold_date_sk->[d_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF1 sr_ticket_number->[ss_ticket_number];RF2 sr_item_sk->[ss_item_sk];RF3 sr_customer_sk->[ss_customer_sk] +------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 +----------------------------PhysicalOlapScan[store] apply RFs: RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk];RF2 ss_customer_sk->[sr_customer_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 RF2 RF5 ------------------------------PhysicalProject ---------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[store_sales] ------------------PhysicalProject ---------------------PhysicalOlapScan[store] +--------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query51.out b/regression-test/data/shape_check/tpcds_sf100/shape/query51.out index 9b4742d60618ee..134e4fdf28c8e7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query51.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query51.out @@ -18,9 +18,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -31,9 +31,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1227) and (date_dim.d_month_seq >= 1216)) ------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query52.out b/regression-test/data/shape_check/tpcds_sf100/shape/query52.out index 1eff8fc3ba89c1..15a333bc25275d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query52.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query52.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 1)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 12) and (dt.d_year = 2002)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 1)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query53.out b/regression-test/data/shape_check/tpcds_sf100/shape/query53.out index 04920e65ac6894..00c45d333ec013 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query53.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query53.out @@ -8,25 +8,24 @@ PhysicalResultSink ----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute[DistributionSpecHash] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalProject -----------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) -------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalProject -------------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalProject +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter(d_month_seq IN (1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query54.out b/regression-test/data/shape_check/tpcds_sf100/shape/query54.out index ad8a262d79400b..606af4aca8f1c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query54.out @@ -15,23 +15,21 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 ca_county->[s_county];RF6 ca_state->[s_state] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[store] apply RFs: RF5 RF6 --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF4 s_county->[ca_county];RF5 s_state->[ca_state] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 RF4 RF5 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject ------------------------------------------hashAgg[GLOBAL] --------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject ---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 customer_sk->[c_customer_sk] -----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk,ws_bill_customer_sk] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------------PhysicalProject @@ -39,24 +37,32 @@ PhysicalResultSink ------------------------------------------------------------PhysicalUnion --------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 --------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ------------------------------------------------------------PhysicalProject --------------------------------------------------------------filter((item.i_category = 'Women') and (item.i_class = 'maternity')) ----------------------------------------------------------------PhysicalOlapScan[item] --------------------------------------------------------PhysicalProject ----------------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalProject +------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalProject ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +----------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] @@ -65,12 +71,6 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------hashAgg[LOCAL] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) -----------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query55.out b/regression-test/data/shape_check/tpcds_sf100/shape/query55.out index e24470e9606c8b..20d097ea52f2e0 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query55.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query55.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 100)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 100)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query56.out b/regression-test/data/shape_check/tpcds_sf100/shape/query56.out index f6bec2a4d4d447..73c8e446f4cdbb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query56.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query56.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject @@ -23,61 +23,61 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 cs_bill_addr_sk->[ca_address_sk] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] apply RFs: RF7 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 +--------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ws_bill_addr_sk->[ca_address_sk] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] apply RFs: RF11 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('cyan', 'green', 'powder')) ---------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('cyan', 'green', 'powder')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query57.out b/regression-test/data/shape_check/tpcds_sf100/shape/query57.out index 152c2c884779f7..4b4909987a4be7 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query57.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query57.out @@ -14,16 +14,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((call_center.cc_call_center_sk = catalog_sales.cs_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 cs_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------filter(OR[(date_dim.d_year = 1999),AND[(date_dim.d_year = 1998),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2000),(date_dim.d_moy = 1)]] and d_year IN (1998, 1999, 2000)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter(OR[(date_dim.d_year = 1999),AND[(date_dim.d_year = 1998),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2000),(date_dim.d_moy = 1)]] and d_year IN (1998, 1999, 2000)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[call_center] --PhysicalResultSink @@ -32,13 +32,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category,i_category];RF8 i_brand->[i_brand,i_brand];RF9 cc_name->[cc_name,cc_name];RF10 expr_(rn - 1)->[(rn + 1),rn] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] +----------------PhysicalProject +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() build RFs:RF3 i_category->[i_category];RF4 i_brand->[i_brand];RF5 cc_name->[cc_name];RF6 rn->[(rn + 1)] --------------------PhysicalProject -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 RF8 RF9 RF10 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 --------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 1999)) -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 -----------------PhysicalProject -------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query58.out b/regression-test/data/shape_check/tpcds_sf100/shape/query58.out index b72d1c5b6c5e08..19bf83498035c5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query58.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query58.out @@ -11,26 +11,26 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ws_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 ws_item_sk->[i_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF11 RF12 +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 RF10 +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------PhysicalAssertNumRows ---------------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date = '2001-03-24')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF13 +--------------------------------------filter((date_dim.d_date = '2001-03-24')) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] ------------PhysicalProject --------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject @@ -38,49 +38,49 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cs_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 +----------------------------PhysicalProject +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 RF5 +------------------------------------PhysicalAssertNumRows +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_date = '2001-03-24')) -------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------------------filter((date_dim.d_date = '2001-03-24')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 +----------------------------PhysicalProject +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 RF1 +------------------------------------PhysicalAssertNumRows +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 -----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_date = '2001-03-24')) -------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +------------------------------------------filter((date_dim.d_date = '2001-03-24')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query59.out b/regression-test/data/shape_check/tpcds_sf100/shape/query59.out index 9aa7ec874b6250..fcc1a470085b56 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query59.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query59.out @@ -16,7 +16,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query6.out b/regression-test/data/shape_check/tpcds_sf100/shape/query6.out index 94dfbee3c5e2b2..bf5c172fd1c85c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query6.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF5 i_category->[i_category] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF4 d_month_seq->[d_month_seq] +--------------------------PhysicalAssertNumRows +----------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------hashAgg[GLOBAL] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------hashAgg[LOCAL] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF1 d_month_seq->[d_month_seq] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalAssertNumRows -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------------hashAgg[LOCAL] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) -----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF0 i_category->[i_category] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF5 +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query60.out b/regression-test/data/shape_check/tpcds_sf100/shape/query60.out index 4408176d2fbdec..2c2038cf390154 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query60.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query60.out @@ -37,9 +37,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 ca_address_sk->[cs_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject @@ -47,23 +47,23 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ca_address_sk->[ws_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -71,13 +71,13 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 8) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query61.out b/regression-test/data/shape_check/tpcds_sf100/shape/query61.out index ec1819093f180e..dae2a7ecb98546 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query61.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query61.out @@ -8,63 +8,63 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 ss_item_sk->[i_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------filter((item.i_category = 'Jewelry')) -----------------------PhysicalOlapScan[item] apply RFs: RF10 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 c_current_addr_sk->[ca_address_sk] -----------------------PhysicalProject -------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF9 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 ss_customer_sk->[c_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF8 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 ss_sold_date_sk->[d_date_sk] -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 ss_promo_sk->[p_promo_sk] -----------------------------------PhysicalProject -------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) ---------------------------------------PhysicalOlapScan[promotion] apply RFs: RF6 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 p_promo_sk->[ss_promo_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 RF10 --------------------------------------PhysicalProject ----------------------------------------filter((store.s_gmt_offset = -7.00)) ------------------------------------------PhysicalOlapScan[store] +----------------------------------PhysicalProject +------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) +--------------------------------------PhysicalOlapScan[promotion] +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 +----------------------PhysicalProject +------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((item.i_category = 'Jewelry')) +----------------------PhysicalOlapScan[item] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 ss_item_sk->[i_item_sk] -------------------PhysicalProject ---------------------filter((item.i_category = 'Jewelry')) -----------------------PhysicalOlapScan[item] apply RFs: RF4 +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------filter((customer_address.ca_gmt_offset = -7.00)) ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ss_customer_sk->[c_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF2 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 ss_sold_date_sk->[d_date_sk] -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------PhysicalProject ------------------------------------filter((store.s_gmt_offset = -7.00)) --------------------------------------PhysicalOlapScan[store] +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF3 +----------------------PhysicalProject +------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((item.i_category = 'Jewelry')) +----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query62.out b/regression-test/data/shape_check/tpcds_sf100/shape/query62.out index 928dd1dc5d5a9a..d1813348a94190 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query62.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query62.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF2 sm_ship_mode_sk->[ws_ship_mode_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 ws_web_site_sk->[web_site_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[ws_warehouse_sk] +------------------------PhysicalOlapScan[web_site] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 ws_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] -----------------------PhysicalProject -------------------------PhysicalOlapScan[ship_mode] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ------------------PhysicalProject ---------------------PhysicalOlapScan[web_site] +--------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query63.out b/regression-test/data/shape_check/tpcds_sf100/shape/query63.out index d4fb4990da98b8..210a97832febf1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query63.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query63.out @@ -8,25 +8,24 @@ PhysicalResultSink ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute[DistributionSpecHash] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalProject -----------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) -------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalProject -------------------------------------filter(d_month_seq IN (1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalProject +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter(d_month_seq IN (1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query65.out b/regression-test/data/shape_check/tpcds_sf100/shape/query65.out index fde8a0b5100594..ba604f3a1fc63e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query65.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query65.out @@ -7,29 +7,27 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[ss_store_sk] +----------------hashAgg[GLOBAL] +------------------PhysicalProject +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashAgg[LOCAL] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] apply RFs: RF2 --------------------PhysicalProject -----------------------PhysicalOlapScan[store] apply RFs: RF4 -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF1 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF1 ------------------------hashAgg[GLOBAL] --------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query66.out b/regression-test/data/shape_check/tpcds_sf100/shape/query66.out index ba43fe2aca9dd7..3083f5d059d3c1 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query66.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query66.out @@ -14,18 +14,17 @@ PhysicalResultSink ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[ws_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF3 sm_ship_mode_sk->[ws_ship_mode_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF2 t_time_sk->[ws_sold_time_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF0 sm_ship_mode_sk->[ws_ship_mode_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) -----------------------------------------------PhysicalOlapScan[ship_mode] +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -33,23 +32,23 @@ PhysicalResultSink ------------------------------------filter((time_dim.t_time <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] +--------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) +----------------------------------PhysicalOlapScan[ship_mode] --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF7 w_warehouse_sk->[cs_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF7 sm_ship_mode_sk->[cs_ship_mode_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[cs_sold_time_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF4 sm_ship_mode_sk->[cs_ship_mode_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 cs_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF4 ------------------------------------------PhysicalProject ---------------------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) -----------------------------------------------PhysicalOlapScan[ship_mode] +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 1998)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -57,5 +56,6 @@ PhysicalResultSink ------------------------------------filter((time_dim.t_time <= 77621) and (time_dim.t_time >= 48821)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] +--------------------------------filter(sm_carrier IN ('GREAT EASTERN', 'LATVIAN')) +----------------------------------PhysicalOlapScan[ship_mode] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query67.out b/regression-test/data/shape_check/tpcds_sf100/shape/query67.out index b6605fe094027f..a729c9d2be119a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query67.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query67.out @@ -6,9 +6,9 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecHash] --------hashAgg[LOCAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject @@ -17,16 +17,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------filter((date_dim.d_month_seq <= 1217) and (date_dim.d_month_seq >= 1206)) --------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------PhysicalOlapScan[store] --------------PhysicalProject -----------------PhysicalOlapScan[store] +----------------PhysicalOlapScan[item] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------filter((dw2.rk <= 100)) ------------PhysicalWindow ---------------PhysicalPartitionTopN +--------------PhysicalQuickSort[LOCAL_SORT] ----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalPartitionTopN --------------------PhysicalUnion diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query68.out b/regression-test/data/shape_check/tpcds_sf100/shape/query68.out index 8edc384cd49a83..aab9fc0be3f68c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query68.out @@ -7,17 +7,13 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF4 +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 ----------------------------PhysicalProject @@ -27,7 +23,7 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) --------------------------------------------PhysicalOlapScan[date_dim] @@ -37,4 +33,8 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------filter(OR[(household_demographics.hd_dep_count = 8),(household_demographics.hd_vehicle_count = -1)]) ------------------------------------PhysicalOlapScan[household_demographics] +--------------------PhysicalProject +----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF5 +----------------PhysicalProject +------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query69.out b/regression-test/data/shape_check/tpcds_sf100/shape/query69.out index a68ff0c1138094..061d87fd800c51 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query69.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query69.out @@ -9,39 +9,39 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk] +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 -------------------------PhysicalProject ---------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) -----------------------------PhysicalOlapScan[date_dim] ---------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_ship_customer_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) -------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF2 c_current_cdemo_sk->[cd_demo_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF2 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] -------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF1 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 ------------------------------PhysicalProject ---------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) -----------------------------------PhysicalOlapScan[customer_address] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) +--------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------filter(ca_state IN ('MI', 'TX', 'VA')) +--------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_demographics] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------PhysicalProject +--------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query7.out b/regression-test/data/shape_check/tpcds_sf100/shape/query7.out index e3c9dc2bfd0e67..0ca8a686c2c672 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query7.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query7.out @@ -8,24 +8,24 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[ss_promo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ---------------------------PhysicalOlapScan[promotion] ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) +----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query70.out b/regression-test/data/shape_check/tpcds_sf100/shape/query70.out index b1074dc6ffeed5..de45970dadfafe 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query70.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query70.out @@ -23,22 +23,22 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1224) and (d1.d_month_seq >= 1213)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store] apply RFs: RF2 +--------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] --------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------------------------------PhysicalOlapScan[store] apply RFs: RF0 RF2 --------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) -------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------------------------------------PhysicalProject -------------------------------------------------PhysicalOlapScan[store] +------------------------------------------------filter((date_dim.d_month_seq <= 1224) and (date_dim.d_month_seq >= 1213)) +--------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query71.out b/regression-test/data/shape_check/tpcds_sf100/shape/query71.out index e31a6aa1caa88d..d063330caa9136 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query71.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query71.out @@ -11,9 +11,9 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF2 t_time_sk->[cs_sold_time_sk,ss_sold_time_sk,ws_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ss_sold_date_sk,ws_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk,ss_item_sk,ws_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ss_item_sk,ws_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk,ss_sold_date_sk,ws_sold_date_sk] ----------------------------PhysicalUnion ------------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------------PhysicalProject @@ -25,11 +25,11 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------------PhysicalProject -------------------------------filter((item.i_manager_id = 1)) ---------------------------------PhysicalOlapScan[item] +------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) +--------------------------------PhysicalOlapScan[date_dim] ------------------------PhysicalProject ---------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter((item.i_manager_id = 1)) +----------------------------PhysicalOlapScan[item] --------------------PhysicalProject ----------------------filter(t_meal_time IN ('breakfast', 'dinner')) ------------------------PhysicalOlapScan[time_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query72.out b/regression-test/data/shape_check/tpcds_sf100/shape/query72.out index 2e370f2716bfc2..556fb61997c76c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query72.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query72.out @@ -8,51 +8,47 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() +----------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() build RFs:RF10 cs_item_sk->[cr_item_sk];RF11 cs_order_number->[cr_order_number] ------------------PhysicalProject ---------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() +--------------------PhysicalOlapScan[catalog_returns] apply RFs: RF10 RF11 +------------------PhysicalProject +--------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 cs_promo_sk->[p_promo_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[promotion] apply RFs: RF9 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF8 w_warehouse_sk->[inv_warehouse_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) build RFs:RF8 cs_ship_date_sk->[d_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF6 d_date_sk->[inv_date_sk];RF7 cs_item_sk->[inv_item_sk] -------------------------------PhysicalOlapScan[inventory] apply RFs: RF6 RF7 RF8 +----------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq];RF7 inv_date_sk->[d_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 RF7 ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq)) otherCondition=() build RFs:RF5 d_week_seq->[d_week_seq] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[cs_item_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[cs_bill_hdemo_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) build RFs:RF3 d_date_sk->[cs_ship_date_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------------------------------PhysicalOlapScan[item] apply RFs: RF2 +----------------------------------------------PhysicalProject +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[cs_bill_hdemo_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) -----------------------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF1 --------------------------------------------------PhysicalProject -----------------------------------------------------filter((d1.d_year = 2002)) -------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -----------------------------------------------PhysicalProject -------------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) ---------------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] +------------------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 +------------------------------------------------------PhysicalProject +--------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------filter((customer_demographics.cd_marital_status = 'W')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[item] +----------------------------------------filter((household_demographics.hd_buy_potential = '501-1000')) +------------------------------------------PhysicalOlapScan[household_demographics] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] -----------------------PhysicalProject -------------------------PhysicalOlapScan[promotion] -------------------PhysicalProject ---------------------PhysicalOlapScan[catalog_returns] - - - - group expression count exceeds memo_max_group_expression_size(15000) +------------------------------------filter((d1.d_year = 2002)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query73.out b/regression-test/data/shape_check/tpcds_sf100/shape/query73.out index bfc42f79bbc570..54b486b3ff020e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query73.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query73.out @@ -13,9 +13,9 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject @@ -24,9 +24,9 @@ PhysicalResultSink ----------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) ------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown')) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Fairfield County', 'Walker County')) +--------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject ---------------------------filter(s_county IN ('Barrow County', 'Daviess County', 'Fairfield County', 'Walker County')) -----------------------------PhysicalOlapScan[store] +--------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('501-1000', 'Unknown')) +----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query74.out b/regression-test/data/shape_check/tpcds_sf100/shape/query74.out index e291f5bfd582d8..070d5cbe7a3a19 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query74.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query74.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.0), (year_total / year_total), NULL) > if((year_total > 0.0), (year_total / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query75.out b/regression-test/data/shape_check/tpcds_sf100/shape/query75.out index 89334acaef5f92..a4043ba0b6aa88 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query75.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query75.out @@ -9,9 +9,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------PhysicalUnion --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject @@ -24,48 +22,50 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalProject --------------------------filter(d_year IN (1998, 1999)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------PhysicalProject ------------------------------filter((item.i_category = 'Home')) --------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject --------------------------filter(d_year IN (1998, 1999)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_returns] --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 ws_order_number->[wr_order_number];RF11 ws_item_sk->[wr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[web_returns] apply RFs: RF10 RF11 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ws_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ----------------------------PhysicalProject ------------------------------filter((item.i_category = 'Home')) --------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject --------------------------filter(d_year IN (1998, 1999)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) build RFs:RF12 i_brand_id->[i_brand_id];RF13 i_class_id->[i_class_id];RF14 i_category_id->[i_category_id];RF15 i_manufact_id->[i_manufact_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) build RFs:RF6 i_brand_id->[i_brand_id];RF7 i_class_id->[i_class_id];RF8 i_category_id->[i_category_id];RF9 i_manufact_id->[i_manufact_id] --------------filter((curr_yr.d_year = 1999)) -----------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 RF13 RF14 RF15 +----------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 RF8 RF9 --------------filter((prev_yr.d_year = 1998)) ----------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query76.out b/regression-test/data/shape_check/tpcds_sf100/shape/query76.out index 5c06d2cace23e3..eab01ffc7aa6ff 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query76.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query76.out @@ -8,9 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 ss_sold_date_sk->[d_date_sk] -------------------PhysicalProject ---------------------PhysicalOlapScan[date_dim] apply RFs: RF3 +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk,ss_sold_date_sk,ws_sold_date_sk] ------------------PhysicalUnion --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject @@ -19,7 +17,7 @@ PhysicalResultSink ----------------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------------PhysicalProject ----------------------------filter(ss_hdemo_sk IS NULL) -------------------------------PhysicalOlapScan[store_sales] +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ws_item_sk->[i_item_sk] @@ -27,7 +25,7 @@ PhysicalResultSink ----------------------------PhysicalOlapScan[item] apply RFs: RF1 --------------------------PhysicalProject ----------------------------filter(ws_bill_addr_sk IS NULL) -------------------------------PhysicalOlapScan[web_sales] +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] @@ -35,5 +33,7 @@ PhysicalResultSink ----------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------PhysicalProject ----------------------------filter(cs_warehouse_sk IS NULL) -------------------------------PhysicalOlapScan[catalog_sales] +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +------------------PhysicalProject +--------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query77.out b/regression-test/data/shape_check/tpcds_sf100/shape/query77.out index cdecac9706c07d..8d6c6d61c8625d 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query77.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query77.out @@ -10,38 +10,35 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 sr_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject @@ -66,36 +63,33 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 ws_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF9 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wr_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF7 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '1998-09-04') and (date_dim.d_date >= '1998-08-05')) +------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query79.out b/regression-test/data/shape_check/tpcds_sf100/shape/query79.out index ca85e61ee3240e..1a19308d991441 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query79.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query79.out @@ -5,15 +5,15 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject @@ -22,11 +22,11 @@ PhysicalResultSink ----------------------------------filter((date_dim.d_dow = 1) and d_year IN (1998, 1999, 2000)) ------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter(OR[(household_demographics.hd_dep_count = 5),(household_demographics.hd_vehicle_count > 4)]) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) +--------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject ---------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) -----------------------------PhysicalOlapScan[store] +--------------------------filter(OR[(household_demographics.hd_dep_count = 5),(household_demographics.hd_vehicle_count > 4)]) +----------------------------PhysicalOlapScan[household_demographics] ------------PhysicalProject --------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query8.out b/regression-test/data/shape_check/tpcds_sf100/shape/query8.out index 837e29a358bace..f7c11803029e94 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query8.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query8.out @@ -22,26 +22,22 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------PhysicalIntersect RFV2: RF3[ca_zip->substring(ca_zip, 1, 5)] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ---------------------------------PhysicalOlapScan[customer_address] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((cnt > 10)) ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((cnt > 10)) +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalProject ---------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalProject ---------------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) -----------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 +----------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query80.out b/regression-test/data/shape_check/tpcds_sf100/shape/query80.out index b64c3639ecbb6d..e9cb7c678b702c 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query80.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query80.out @@ -15,86 +15,86 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF4 ss_item_sk->[sr_item_sk];RF5 ss_ticket_number->[sr_ticket_number] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF5 p_promo_sk->[ss_promo_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF5 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[ss_promo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store] apply RFs: RF3 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_item_sk->[sr_item_sk];RF1 ss_ticket_number->[sr_ticket_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 RF5 --------------------------------------------PhysicalProject -----------------------------------------------filter((item.i_current_price > 50.00)) -------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalProject -------------------------------------------filter((promotion.p_channel_tv = 'N')) ---------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF11 cp_catalog_page_sk->[cs_catalog_page_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[cs_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF9 cs_item_sk->[cr_item_sk];RF10 cs_order_number->[cr_order_number] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF9 RF10 +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[cs_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF8 p_promo_sk->[cs_promo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF9 cs_catalog_page_sk->[cp_catalog_page_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_page] apply RFs: RF9 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF6 cs_item_sk->[cr_item_sk];RF7 cs_order_number->[cr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 RF8 RF11 +--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 RF10 RF11 --------------------------------------------PhysicalProject -----------------------------------------------filter((item.i_current_price > 50.00)) -------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalProject -------------------------------------------filter((promotion.p_channel_tv = 'N')) ---------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_page] +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF16 ws_item_sk->[wr_item_sk];RF17 ws_order_number->[wr_order_number] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF16 RF17 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF17 p_promo_sk->[ws_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 web_site_sk->[ws_web_site_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ws_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF14 p_promo_sk->[ws_promo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 ws_web_site_sk->[web_site_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF13 i_item_sk->[ws_item_sk] +------------------------------------------PhysicalOlapScan[web_site] apply RFs: RF15 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_item_sk->[wr_item_sk];RF13 ws_order_number->[wr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13 RF14 RF15 +--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF16 RF17 --------------------------------------------PhysicalProject -----------------------------------------------filter((item.i_current_price > 50.00)) -------------------------------------------------PhysicalOlapScan[item] -----------------------------------------PhysicalProject -------------------------------------------filter((promotion.p_channel_tv = 'N')) ---------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------------filter((date_dim.d_date <= '1998-09-27') and (date_dim.d_date >= '1998-08-28')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_site] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query81.out b/regression-test/data/shape_check/tpcds_sf100/shape/query81.out index 5baf0f85350f03..6bdb4ad701cd5e 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query81.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query81.out @@ -7,7 +7,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] --------------------PhysicalProject @@ -28,16 +28,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF4 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF3 +----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF2 RF3 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 ----------------------PhysicalProject ------------------------filter((customer_address.ca_state = 'CA')) --------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query83.out b/regression-test/data/shape_check/tpcds_sf100/shape/query83.out index 6a72866cf2b86c..bd20e2a899a623 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query83.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query83.out @@ -5,67 +5,67 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF12 item_id->[i_item_id] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[wr_returned_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 wr_item_sk->[i_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +----------------------------PhysicalProject +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------PhysicalProject +----------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) +------------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[sr_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cr_returned_date_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cr_item_sk->[i_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF7 ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[sr_returned_date_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF10 RF11 +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ------------------------------------PhysicalProject ---------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -----------------------------------------PhysicalProject -------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ---------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +--------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) +----------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 cr_item_sk->[i_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF7 RF13 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cr_returned_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 sr_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -------------------------------------PhysicalProject ---------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -----------------------------------------PhysicalProject -------------------------------------------filter(d_date IN ('2001-06-06', '2001-09-02', '2001-11-11')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 wr_item_sk->[i_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF3 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[wr_returned_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 ----------------------------PhysicalProject ------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query84.out b/regression-test/data/shape_check/tpcds_sf100/shape/query84.out index 870b88c5adfca1..8f35630c12d28a 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query84.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query84.out @@ -9,23 +9,23 @@ PhysicalResultSink ------------PhysicalProject --------------PhysicalOlapScan[store_returns] apply RFs: RF4 ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF3 ib_income_band_sk->[hd_income_band_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 c_current_hdemo_sk->[hd_demo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 -------------------------PhysicalProject ---------------------------filter((customer_address.ca_city = 'Oakwood')) -----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[household_demographics] apply RFs: RF2 RF3 --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF0 ib_income_band_sk->[hd_income_band_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[household_demographics] apply RFs: RF0 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_city = 'Oakwood')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((income_band.ib_lower_bound >= 5806) and (income_band.ib_upper_bound <= 55806)) -----------------------------PhysicalOlapScan[income_band] +--------------------------PhysicalOlapScan[customer_demographics] +----------------PhysicalProject +------------------filter((income_band.ib_lower_bound >= 5806) and (income_band.ib_upper_bound <= 55806)) +--------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query85.out b/regression-test/data/shape_check/tpcds_sf100/shape/query85.out index afe29ebb5e4289..d4878b2cf34a43 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query85.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query85.out @@ -9,38 +9,38 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() build RFs:RF9 r_reason_sk->[wr_reason_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() build RFs:RF8 r_reason_sk->[wr_reason_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF5 wr_returning_cdemo_sk->[cd_demo_sk];RF6 cd_marital_status->[cd_marital_status];RF7 cd_education_status->[cd_education_status] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('DE', 'FL', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('ID', 'IN', 'ND'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('IL', 'MT', 'OH'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF7 ca_address_sk->[wr_refunded_addr_sk] ----------------------------PhysicalProject -------------------------------filter(cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) ---------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 RF7 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF4 wr_refunded_cdemo_sk->[cd_demo_sk] ---------------------------------PhysicalProject -----------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[wr_returning_cdemo_sk];RF5 cd_marital_status->[cd_marital_status];RF6 cd_education_status->[cd_education_status] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('DE', 'FL', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('ID', 'IN', 'ND'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('IL', 'MT', 'OH'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF3 ca_address_sk->[wr_refunded_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF3 cd_demo_sk->[wr_refunded_cdemo_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF1 ws_item_sk->[wr_item_sk];RF2 ws_order_number->[wr_order_number] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 ws_web_page_sk->[wp_web_page_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 RF3 RF8 +------------------------------------------PhysicalOlapScan[web_page] apply RFs: RF2 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject -----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) -------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF9 +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 RF3 RF4 RF7 RF9 --------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_year = 2000)) -------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('DE', 'FL', 'ID', 'IL', 'IN', 'MT', 'ND', 'OH', 'TX')) -----------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'Secondary')],AND[(cd1.cd_marital_status = 'W'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) +----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 +--------------------------------PhysicalProject +----------------------------------filter(cd_education_status IN ('4 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('M', 'S', 'W')) +------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('DE', 'FL', 'ID', 'IL', 'IN', 'MT', 'ND', 'OH', 'TX')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[reason] +--------------------------filter((date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_page] +----------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query87.out b/regression-test/data/shape_check/tpcds_sf100/shape/query87.out index 247dfbbbc89a90..f331439cc2d319 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query87.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query87.out @@ -38,7 +38,7 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query88.out b/regression-test/data/shape_check/tpcds_sf100/shape/query88.out index a619efe9def125..ae9b03a84ef7de 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query88.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query88.out @@ -14,17 +14,17 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF22 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF21 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ---------------------------------------PhysicalOlapScan[time_dim] +------------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +--------------------------------------PhysicalOlapScan[household_demographics] ------------------------------PhysicalProject ---------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -----------------------------------PhysicalOlapScan[household_demographics] +--------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] @@ -34,17 +34,17 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF19 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF18 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ---------------------------------------PhysicalOlapScan[time_dim] +------------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +--------------------------------------PhysicalOlapScan[household_demographics] ------------------------------PhysicalProject ---------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -----------------------------------PhysicalOlapScan[household_demographics] +--------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) +----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] @@ -54,17 +54,17 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF16 t_time_sk->[ss_sold_time_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF15 hd_demo_sk->[ss_hdemo_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 --------------------------------PhysicalProject -----------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) -------------------------------------PhysicalOlapScan[time_dim] +----------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +------------------------------------PhysicalOlapScan[household_demographics] ----------------------------PhysicalProject -------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) +--------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalProject --------------------------filter((store.s_store_name = 'ese')) ----------------------------PhysicalOlapScan[store] @@ -74,17 +74,17 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF13 t_time_sk->[ss_sold_time_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF12 hd_demo_sk->[ss_hdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 ------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) -----------------------------------PhysicalOlapScan[time_dim] +--------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +----------------------------------PhysicalOlapScan[household_demographics] --------------------------PhysicalProject -----------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -------------------------------PhysicalOlapScan[household_demographics] +----------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject ------------------------filter((store.s_store_name = 'ese')) --------------------------PhysicalOlapScan[store] @@ -94,17 +94,17 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF10 t_time_sk->[ss_sold_time_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF9 hd_demo_sk->[ss_hdemo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ---------------------------------PhysicalOlapScan[time_dim] +------------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +--------------------------------PhysicalOlapScan[household_demographics] ------------------------PhysicalProject ---------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -----------------------------PhysicalOlapScan[household_demographics] +--------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) +----------------------------PhysicalOlapScan[time_dim] --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] @@ -114,17 +114,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF7 t_time_sk->[ss_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF6 hd_demo_sk->[ss_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((store.s_store_name = 'ese')) ----------------------PhysicalOlapScan[store] @@ -134,17 +134,17 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ss_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +----------------------------PhysicalOlapScan[household_demographics] --------------------PhysicalProject -----------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -------------------------PhysicalOlapScan[household_demographics] +----------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) +------------------------PhysicalOlapScan[time_dim] ----------------PhysicalProject ------------------filter((store.s_store_name = 'ese')) --------------------PhysicalOlapScan[store] @@ -154,17 +154,17 @@ PhysicalResultSink ----------PhysicalProject ------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ss_sold_time_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ss_hdemo_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------PhysicalProject -------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_vehicle_count <= 6) and OR[AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 4),AND[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count <= 5)]] and hd_dep_count IN (-1, 3, 4)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------PhysicalOlapScan[time_dim] --------------PhysicalProject ----------------filter((store.s_store_name = 'ese')) ------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query9.out b/regression-test/data/shape_check/tpcds_sf100/shape/query9.out index 06cd8f92785e08..f159ed97647895 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query9.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query9.out @@ -1,8 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute[DistributionSpecGather] -----PhysicalProject +--PhysicalProject +----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] @@ -16,24 +16,17 @@ PhysicalResultSink --------------------------NestedLoopJoin[CROSS_JOIN] ----------------------------NestedLoopJoin[CROSS_JOIN] ------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------NestedLoopJoin[CROSS_JOIN] -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------------PhysicalProject -----------------------------------------filter((reason.r_reason_sk = 1)) -------------------------------------------PhysicalOlapScan[reason] ---------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[LOCAL] ---------------------------------------------PhysicalProject -----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) -------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ---------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------PhysicalProject +----------------------------------NestedLoopJoin[CROSS_JOIN] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) +----------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------PhysicalProject +--------------------------------------filter((reason.r_reason_sk = 1)) +----------------------------------------PhysicalOlapScan[reason] --------------------------------hashAgg[GLOBAL] ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] @@ -44,7 +37,7 @@ PhysicalResultSink --------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject ---------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) +--------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------PhysicalOlapScan[store_sales] ----------------------------hashAgg[GLOBAL] ------------------------------PhysicalDistribute[DistributionSpecGather] @@ -62,7 +55,7 @@ PhysicalResultSink --------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject ---------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) +--------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------PhysicalOlapScan[store_sales] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecGather] @@ -80,7 +73,7 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) +--------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------PhysicalOlapScan[store_sales] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecGather] @@ -98,7 +91,7 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +--------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------PhysicalOlapScan[store_sales] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] @@ -112,4 +105,10 @@ PhysicalResultSink --------------PhysicalProject ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------PhysicalOlapScan[store_sales] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +----------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query90.out b/regression-test/data/shape_check/tpcds_sf100/shape/query90.out index 13607b4ae13f5d..1f880a462795bc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query90.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query90.out @@ -10,17 +10,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ws_ship_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_dep_count = 2)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 2)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour <= 11) and (time_dim.t_hour >= 10)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------PhysicalOlapScan[web_page] @@ -30,17 +30,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ws_ship_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_dep_count = 2)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 2)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour <= 17) and (time_dim.t_hour >= 16)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query91.out b/regression-test/data/shape_check/tpcds_sf100/shape/query91.out index 6caabb13af22f6..4a730e739f3dfc 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query91.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query91.out @@ -9,33 +9,33 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF5 cc_call_center_sk->[cr_call_center_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[c_current_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cr_returning_customer_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 RF5 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cr_returning_customer_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[c_current_hdemo_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cr_call_center_sk->[cc_call_center_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 +------------------------------------------PhysicalOlapScan[call_center] apply RFs: RF0 ----------------------------------------PhysicalProject -------------------------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'Unknown') and cd_marital_status IN ('M', 'W')) ---------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------filter((hd_buy_potential like '1001-5000%')) -----------------------------------------PhysicalOlapScan[household_demographics] +--------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'Unknown') and cd_marital_status IN ('M', 'W')) +----------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject -----------------------PhysicalOlapScan[call_center] +----------------------filter((hd_buy_potential like '1001-5000%')) +------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query93.out b/regression-test/data/shape_check/tpcds_sf100/shape/query93.out index 45f02ddf38ee38..77175ca96ff6bf 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query93.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query93.out @@ -8,14 +8,14 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN colocated] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF2 r_reason_sk->[sr_reason_sk] ------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF0 r_reason_sk->[sr_reason_sk] +--------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF0 sr_item_sk->[ss_item_sk];RF1 sr_ticket_number->[ss_ticket_number] ----------------------PhysicalProject -------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject -------------------------filter((reason.r_reason_desc = 'duplicate purchase')) ---------------------------PhysicalOlapScan[reason] +------------------------PhysicalOlapScan[store_returns] apply RFs: RF2 +------------------PhysicalProject +--------------------filter((reason.r_reason_desc = 'duplicate purchase')) +----------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query94.out b/regression-test/data/shape_check/tpcds_sf100/shape/query94.out index df854654271e34..fe39761d74adb9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query94.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query94.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF3 ws_order_number->[ws_order_number] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] ---------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_returns] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_state = 'OK')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) ---------------------------------PhysicalOlapScan[date_dim] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((web_site.web_company_name = 'pri')) -----------------------------PhysicalOlapScan[web_site] +--------------------------filter((date_dim.d_date <= '2000-04-01') and (date_dim.d_date >= '2000-02-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'OK')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((web_site.web_company_name = 'pri')) +--------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query95.out b/regression-test/data/shape_check/tpcds_sf100/shape/query95.out index 2e4d4278eaaed8..7c953ee6a831c9 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query95.out @@ -3,42 +3,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number];RF1 ws_order_number->[ws_order_number] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number];RF1 ws_order_number->[ws_order_number] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF14 RF15 +----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF14 RF15 +----------PhysicalOlapScan[web_sales] --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] ---------hashAgg[DISTINCT_GLOBAL] +--------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_order_number->[wr_order_number,ws_order_number];RF13 ws_order_number->[wr_order_number,ws_order_number] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF10 wr_order_number->[ws_order_number];RF11 wr_order_number->[ws_order_number] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF10 RF11 RF12 RF13 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF14 ws_order_number->[ws_order_number,ws_order_number];RF15 ws_order_number->[ws_order_number,ws_order_number] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashAgg[GLOBAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF12 web_site_sk->[ws_web_site_sk];RF13 web_site_sk->[ws_web_site_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_ship_addr_sk];RF11 ca_address_sk->[ws_ship_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk];RF7 web_site_sk->[ws_web_site_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk];RF5 d_date_sk->[ws_ship_date_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_ship_addr_sk];RF3 ca_address_sk->[ws_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 RF7 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'NC')) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_ship_date_sk];RF9 d_date_sk->[ws_ship_date_sk] +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 wr_order_number->[ws_order_number,ws_order_number];RF7 wr_order_number->[ws_order_number,ws_order_number] +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF4 ws_order_number->[ws_order_number];RF5 ws_order_number->[ws_order_number] +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 RF7 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) -----------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 RF8 RF9 RF10 RF11 RF12 RF13 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[wr_order_number];RF3 ws_order_number->[wr_order_number] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 RF3 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] +----------------------------filter((date_dim.d_date <= '1999-04-02') and (date_dim.d_date >= '1999-02-01')) +------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------filter((customer_address.ca_state = 'NC')) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((web_site.web_company_name = 'pri')) +----------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query96.out b/regression-test/data/shape_check/tpcds_sf100/shape/query96.out index a7d441a3e3d0ee..9028fb34a8d1d3 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query96.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query96.out @@ -9,17 +9,17 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ss_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--------------------------filter((household_demographics.hd_dep_count = 3)) +----------------------------PhysicalOlapScan[household_demographics] --------------------PhysicalProject -----------------------filter((household_demographics.hd_dep_count = 3)) -------------------------PhysicalOlapScan[household_demographics] +----------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +------------------------PhysicalOlapScan[time_dim] ----------------PhysicalProject ------------------filter((store.s_store_name = 'ese')) --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query98.out b/regression-test/data/shape_check/tpcds_sf100/shape/query98.out index d1a4251b785e74..a50cfba68476d5 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query98.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query98.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-06-19') and (date_dim.d_date >= '2002-05-20')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Music', 'Shoes', 'Sports')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Music', 'Shoes', 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-06-19') and (date_dim.d_date >= '2002-05-20')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf100/shape/query99.out b/regression-test/data/shape_check/tpcds_sf100/shape/query99.out index e8094a7d066e20..b054b9a7e442cb 100644 --- a/regression-test/data/shape_check/tpcds_sf100/shape/query99.out +++ b/regression-test/data/shape_check/tpcds_sf100/shape/query99.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF2 sm_ship_mode_sk->[cs_ship_mode_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cs_call_center_sk->[cc_call_center_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[cs_warehouse_sk] +------------------------PhysicalOlapScan[call_center] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 cs_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 cs_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] -----------------------PhysicalProject -------------------------PhysicalOlapScan[ship_mode] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject ---------------------PhysicalOlapScan[call_center] +--------------------filter((date_dim.d_month_seq <= 1235) and (date_dim.d_month_seq >= 1224)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query13.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query13.out index 027cb5f01acff1..10a88df6e25b29 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query13.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query13.out @@ -5,30 +5,30 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('IL', 'TN', 'TX'),(store_sales.ss_net_profit >= 100.00),(store_sales.ss_net_profit <= 200.00)],AND[ca_state IN ('ID', 'OH', 'WY'),(store_sales.ss_net_profit >= 150.00)],AND[ca_state IN ('IA', 'MS', 'SC'),(store_sales.ss_net_profit <= 250.00)]]) build RFs:RF3 ss_addr_sk->[ca_address_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('IL', 'TN', 'TX'),(store_sales.ss_net_profit >= 100.00),(store_sales.ss_net_profit <= 200.00)],AND[ca_state IN ('ID', 'OH', 'WY'),(store_sales.ss_net_profit >= 150.00)],AND[ca_state IN ('IA', 'MS', 'SC'),(store_sales.ss_net_profit <= 250.00)]]) build RFs:RF3 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('IA', 'ID', 'IL', 'MS', 'OH', 'SC', 'TN', 'TX', 'WY')) ---------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ----------------------------PhysicalProject -------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 +------------------------------PhysicalOlapScan[store] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'M', 'W')) ---------------------------------PhysicalOlapScan[customer_demographics] +------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter(hd_dep_count IN (1, 3)) -----------------------------PhysicalOlapScan[household_demographics] +--------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'M', 'W')) +----------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject -----------------------filter((date_dim.d_year = 2001)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter(hd_dep_count IN (1, 3)) +------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalProject +------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('IA', 'ID', 'IL', 'MS', 'OH', 'SC', 'TN', 'TX', 'WY')) +--------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[store] +--------------filter((date_dim.d_year = 2001)) +----------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query19.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query19.out index addae12e92893c..8df38cc3d78d0d 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query19.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query19.out @@ -9,27 +9,27 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 c_current_addr_sk->[ca_address_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] apply RFs: RF4 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] apply RFs: RF3 +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ------------------------------------PhysicalProject ---------------------------------------filter((item.i_manager_id = 14)) -----------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter((item.i_manager_id = 14)) +------------------------------------PhysicalOlapScan[item] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store] +------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_address] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out index 5d21002157fd9a..411368c8103f61 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query44.out @@ -7,28 +7,23 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] +------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] --------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0 --------------------PhysicalProject -----------------------filter((V21.rnk < 11)) -------------------------PhysicalWindow ---------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute[DistributionSpecGather] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() +------------------------PhysicalProject +--------------------------filter((V11.rnk < 11)) +----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------PhysicalPartitionTopN ----------------------------------PhysicalProject ------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------filter((ss1.ss_store_sk = 4)) ---------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject @@ -38,19 +33,6 @@ PhysicalResultSink ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0 ---------------------PhysicalProject -----------------------filter((V11.rnk < 11)) -------------------------PhysicalWindow ---------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalPartitionTopN -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject ----------------------------------------hashAgg[GLOBAL] ------------------------------------------PhysicalDistribute[DistributionSpecHash] @@ -58,6 +40,13 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) --------------------------------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalProject +--------------------------filter((V21.rnk < 11)) +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -68,4 +57,11 @@ PhysicalResultSink ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------PhysicalProject +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 4)) +--------------------------------------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query45.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query45.out index dcc2e202e23752..5d85587fd460ab 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query45.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query45.out @@ -11,20 +11,20 @@ PhysicalResultSink ----------------filter(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),$c$1]) ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 ----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 ws_bill_customer_sk->[c_customer_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query54.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query54.out index b7c2fe2adcd5b6..48f86f3ab89926 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query54.out @@ -15,23 +15,21 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 ca_county->[s_county];RF6 ca_state->[s_state] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[store] apply RFs: RF5 RF6 --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF4 s_county->[ca_county];RF5 s_state->[ca_state] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 RF4 RF5 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject ------------------------------------------hashAgg[GLOBAL] --------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject ---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 customer_sk->[c_customer_sk] -----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk,ws_bill_customer_sk] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------------PhysicalProject @@ -39,24 +37,32 @@ PhysicalResultSink ------------------------------------------------------------PhysicalUnion --------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 --------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ------------------------------------------------------------PhysicalProject --------------------------------------------------------------filter((item.i_category = 'Music') and (item.i_class = 'country')) ----------------------------------------------------------------PhysicalOlapScan[item] --------------------------------------------------------PhysicalProject ----------------------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) ------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalProject +------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalProject ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) +----------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] @@ -65,12 +71,6 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------hashAgg[LOCAL] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) -----------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query56.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query56.out index 9c20cb7fbf24ec..aa21466c5b9119 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query56.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query56.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject @@ -23,23 +23,23 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 ca_address_sk->[cs_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject @@ -47,37 +47,37 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ws_bill_addr_sk->[ca_address_sk] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] apply RFs: RF11 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query6.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query6.out index 94dfbee3c5e2b2..bf5c172fd1c85c 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query6.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF5 i_category->[i_category] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF4 d_month_seq->[d_month_seq] +--------------------------PhysicalAssertNumRows +----------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------hashAgg[GLOBAL] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------hashAgg[LOCAL] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF1 d_month_seq->[d_month_seq] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalAssertNumRows -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------------hashAgg[LOCAL] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) -----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF0 i_category->[i_category] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF5 +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query61.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query61.out index 654f58923a6f2b..75d1b070942b37 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query61.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query61.out @@ -8,63 +8,63 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------filter((customer_address.ca_gmt_offset = -7.00)) -----------------------PhysicalOlapScan[customer_address] apply RFs: RF10 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] apply RFs: RF9 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 p_promo_sk->[ss_promo_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 RF10 --------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------filter((store.s_gmt_offset = -7.00)) +------------------------------------------PhysicalOlapScan[store] ----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] +------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) +--------------------------------------PhysicalOlapScan[promotion] ------------------------------PhysicalProject ---------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) -----------------------------------PhysicalOlapScan[promotion] +--------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((store.s_gmt_offset = -7.00)) -------------------------------PhysicalOlapScan[store] +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 +----------------------PhysicalProject +------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((item.i_category = 'Home')) +----------------------PhysicalOlapScan[item] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 +----------------------------------PhysicalProject +------------------------------------filter((store.s_gmt_offset = -7.00)) +--------------------------------------PhysicalOlapScan[store] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((item.i_category = 'Home')) -------------------------------PhysicalOlapScan[item] +----------------------------PhysicalOlapScan[customer] apply RFs: RF3 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF0 ---------------------------PhysicalProject -----------------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------------PhysicalOlapScan[customer_address] +------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[customer_address] ------------------PhysicalProject ---------------------filter((store.s_gmt_offset = -7.00)) -----------------------PhysicalOlapScan[store] +--------------------filter((item.i_category = 'Home')) +----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query68.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query68.out index 158dde8b936afe..3d0f3596838ed8 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query68.out @@ -7,17 +7,13 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF4 +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 ----------------------------PhysicalProject @@ -27,7 +23,7 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) --------------------------------------------PhysicalOlapScan[date_dim] @@ -37,4 +33,8 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------filter(OR[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count = 4)]) ------------------------------------PhysicalOlapScan[household_demographics] +--------------------PhysicalProject +----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF5 +----------------PhysicalProject +------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query8.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query8.out index 837e29a358bace..f7c11803029e94 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query8.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query8.out @@ -22,26 +22,22 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------PhysicalIntersect RFV2: RF3[ca_zip->substring(ca_zip, 1, 5)] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ---------------------------------PhysicalOlapScan[customer_address] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((cnt > 10)) ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((cnt > 10)) +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalProject ---------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalProject ---------------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) -----------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 +----------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query91.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query91.out index 25542328573fbd..f66eb35fb1f129 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query91.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query91.out @@ -9,33 +9,33 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF5 cc_call_center_sk->[cr_call_center_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[c_current_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cr_returning_customer_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 RF5 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cr_returning_customer_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[c_current_hdemo_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cr_call_center_sk->[cc_call_center_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 +------------------------------------------PhysicalOlapScan[call_center] apply RFs: RF0 ----------------------------------------PhysicalProject -------------------------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'Unknown') and cd_marital_status IN ('M', 'W')) ---------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------filter((hd_buy_potential like 'Unknown%')) -----------------------------------------PhysicalOlapScan[household_demographics] +--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'Unknown') and cd_marital_status IN ('M', 'W')) +----------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject -----------------------PhysicalOlapScan[call_center] +----------------------filter((hd_buy_potential like 'Unknown%')) +------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query95.out b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query95.out index 84bdd6cf3d8f4a..c295e9d1ccbd38 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf1000/bs_downgrade_shape/query95.out @@ -3,42 +3,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales] apply RFs: RF0 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales] --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] ---------hashAgg[DISTINCT_GLOBAL] +--------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashAgg[GLOBAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'VA')) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk] +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF3 wr_order_number->[ws_order_number,ws_order_number] +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[ws_order_number] +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) -----------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 RF6 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] +----------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) +------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------filter((customer_address.ca_state = 'VA')) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((web_site.web_company_name = 'pri')) +----------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf1000/eliminate_empty/query10_empty.out b/regression-test/data/shape_check/tpcds_sf1000/eliminate_empty/query10_empty.out index 78fd7c847c29ed..7edb31df7ebbc7 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/eliminate_empty/query10_empty.out +++ b/regression-test/data/shape_check/tpcds_sf1000/eliminate_empty/query10_empty.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) +------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] -------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] -------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) ---------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query1.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query1.out index d6cf263a9ea7e9..5b62e1b26e84c0 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query1.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query1.out @@ -18,22 +18,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ctr_customer_sk->[c_customer_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 --------------PhysicalProject -----------------PhysicalOlapScan[customer] apply RFs: RF3 ---------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF2 ctr_store_sk->[ctr_store_sk,s_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] apply RFs: RF2 ------------------PhysicalProject --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 ----------------------PhysicalProject ------------------------filter((store.s_state = 'TN')) ---------------------------PhysicalOlapScan[store] apply RFs: RF2 -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------PhysicalOlapScan[store] Hint log: Used: leading(store_returns broadcast date_dim ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query10.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query10.out index f006e27f47de8b..f3b8045951e584 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query10.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query10.out @@ -6,44 +6,42 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject ----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] -----------------PhysicalProject -------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 c_current_cdemo_sk->[cd_demo_sk] -------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF5 -----------------------------------PhysicalProject -------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) ---------------------------------------PhysicalOlapScan[customer_address] +------------PhysicalProject +--------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) +----------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF5 ss_customer_sk->[c_customer_sk] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 c_current_cdemo_sk->[cd_demo_sk] +--------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF4 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF5 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) +----------------------------------PhysicalOlapScan[customer_address] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------PhysicalProject +--------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) +----------------------------PhysicalOlapScan[date_dim] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +----------------------PhysicalProject +------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) +--------------------------PhysicalOlapScan[date_dim] Hint log: Used: leading(customer_demographics broadcast { c broadcast ca } ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query11.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query11.out index 092d71c23d4c42..5c2bba0689af22 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query11.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query11.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 1999) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.dyear = 1999) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query12.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query12.out index 4f0ce14f1240ce..443439f56531b0 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query12.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query12.out @@ -7,22 +7,21 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2001-07-15') and (date_dim.d_date >= '2001-06-15')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Books', 'Electronics', 'Men')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter((date_dim.d_date <= '2001-07-15') and (date_dim.d_date >= '2001-06-15')) +--------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalProject +--------------------------filter(i_category IN ('Books', 'Electronics', 'Men')) +----------------------------PhysicalOlapScan[item] Hint log: Used: leading(web_sales date_dim item ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query13.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query13.out index 5151c3d99f005c..593d5cee7ec23b 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query13.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query13.out @@ -7,7 +7,7 @@ PhysicalResultSink --------PhysicalProject ----------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF3 ss_cdemo_sk->[cd_demo_sk] ----------------PhysicalProject ------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'M', 'W')) --------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query14.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query14.out index 4ff4d2fd260031..b4080c1c04c194 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query14.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query14.out @@ -7,48 +7,42 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalProject ----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 --------PhysicalIntersect RFV2: RF19[brand_id->i_brand_id] RF20[brand_id->i_brand_id] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------PhysicalProject ---------------------------filter((d1.d_year <= 2001) and (d1.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] +------------------filter((d1.d_year <= 2001) and (d1.d_year >= 1999)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalProject ---------------------------filter((d2.d_year <= 2001) and (d2.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF2 RFV2: RF19 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF19 -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------PhysicalProject +------------------filter((d2.d_year <= 2001) and (d2.d_year >= 1999)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ws_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------PhysicalProject ---------------------------filter((d3.d_year <= 2001) and (d3.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF4 RFV2: RF20 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[web_sales] apply RFs: RF5 +----------------PhysicalProject +------------------filter((d3.d_year <= 2001) and (d3.d_year >= 1999)) +--------------------PhysicalOlapScan[date_dim] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] @@ -82,18 +76,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ss_item_sk,ss_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF11 ss_item_sk->[ss_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ss_item_sk,ss_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF10 ss_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 RF12 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF11 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) @@ -104,18 +98,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF15 i_item_sk->[cs_item_sk,ss_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF14 ss_item_sk->[cs_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[cs_item_sk,ss_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF13 ss_item_sk->[cs_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF13 RF14 RF15 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF15 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF14 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) @@ -126,18 +120,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF18 i_item_sk->[ss_item_sk,ws_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 ss_item_sk->[ws_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF16 d_date_sk->[ws_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF17 i_item_sk->[ss_item_sk,ws_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ss_item_sk->[ws_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17 RF18 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF18 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF17 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query15.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query15.out index 543e845fa83e9c..133020cc4a8bb6 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query15.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query15.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject @@ -17,7 +17,7 @@ PhysicalResultSink ------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2001)) --------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] apply RFs: RF0 ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query16.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query16.out index 391b7d7cc41ba7..91fc55bae67998 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query16.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query16.out @@ -3,35 +3,33 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF4 cc_call_center_sk->[cs_call_center_sk] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[cs_ship_addr_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 ---------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF1 cs_order_number->[cr_order_number] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'PA')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter((call_center.cc_county = 'Williamson County')) -------------------------------PhysicalOlapScan[call_center] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'PA')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((call_center.cc_county = 'Williamson County')) +--------------------PhysicalOlapScan[call_center] Hint log: Used: leading(catalog_sales { cs1 customer_address date_dim call_center } ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query17.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query17.out index 72003f9609ac64..9308fcef4bf1c6 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query17.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query17.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query18.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query18.out index 83435bdb2f7c23..617e49159f93a5 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query18.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query18.out @@ -23,7 +23,7 @@ PhysicalResultSink ------------------------------------filter((cd1.cd_education_status = 'Primary') and (cd1.cd_gender = 'F')) --------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 ----------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query20.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query20.out index 075e5b4807a381..6daebbd5b5b873 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query20.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query20.out @@ -7,22 +7,21 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-07-18') and (date_dim.d_date >= '2002-06-18')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Books', 'Music', 'Sports')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter((date_dim.d_date <= '2002-07-18') and (date_dim.d_date >= '2002-06-18')) +--------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalProject +--------------------------filter(i_category IN ('Books', 'Music', 'Sports')) +----------------------------PhysicalOlapScan[item] Hint log: Used: leading(catalog_sales date_dim item ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query23.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query23.out index 8dab50e01d63c9..e6e4f47ebe7f96 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query23.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query23.out @@ -5,17 +5,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------PhysicalProject +------------------------filter(d_year IN (2000, 2001, 2002, 2003)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter(d_year IN (2000, 2001, 2002, 2003)) -----------------------PhysicalOlapScan[date_dim] ---------------PhysicalProject -----------------PhysicalOlapScan[item] +--------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) ----PhysicalCteProducer ( cteId=CTEId#2 ) ------PhysicalProject @@ -51,29 +53,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF4 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF3 item_sk->[cs_item_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF5 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF8 ws_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 ws_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF7 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 item_sk->[ws_item_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF8 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query24.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query24.out index 9c960c4ec0f3bb..9de92d760ce8ad 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query24.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query24.out @@ -31,24 +31,23 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalOlapScan[store_returns] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalProject ---------------------------filter((ssales.i_color = 'aquamarine')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecGather] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalQuickSort[LOCAL_SORT] +--------PhysicalProject +----------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecGather] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------filter((ssales.i_color = 'aquamarine')) +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) Hint log: Used: leading(store_sales broadcast store shuffle { customer shuffle customer_address } shuffle item shuffle store_returns ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query25.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query25.out index c8ed208401576b..a09596af42b4c4 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query25.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query25.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query27.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query27.out index a85b87b4dde716..7a650a1a895c52 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query27.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query27.out @@ -10,7 +10,7 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query30.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query30.out index 64abd569c96874..23bf5f628d315a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query30.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query30.out @@ -7,7 +7,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] --------------------PhysicalProject @@ -37,9 +37,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) Hint log: Used: leading(web_returns date_dim customer_address ) leading(ctr1 { customer customer_address } ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query38.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query38.out index fc988652648dc2..dc20e01c3ded44 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query38.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query38.out @@ -7,16 +7,16 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------PhysicalIntersect +--------------PhysicalIntersect RFV2: RF6[c_last_name->c_last_name] RF7[c_last_name->c_last_name] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------PhysicalOlapScan[date_dim] @@ -35,19 +35,19 @@ PhysicalResultSink --------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------PhysicalOlapScan[customer] RFV2: RF6 ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query4.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query4.out index 9ad2fbca672cdc..ff05bdb13c78ac 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query4.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query4.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk,ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk,ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -45,19 +45,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id] +----------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id] ------------------PhysicalProject --------------------filter((t_w_firstyear.dyear = 1999) and (t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year_total > 0.000000)) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id,customer_id,customer_id] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id,customer_id,customer_id] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] ----------------------------PhysicalProject ------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query42.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query42.out index fb38db7162c8fb..ef72b755b0dcec 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query42.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query42.out @@ -9,17 +9,17 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 1)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 11) and (dt.d_year = 1998)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 11) and (dt.d_year = 1998)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 1)) +------------------------PhysicalOlapScan[item] Hint log: Used: leading(store_sales item date_dim ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query45.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query45.out index dcc2e202e23752..5d85587fd460ab 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query45.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query45.out @@ -11,20 +11,20 @@ PhysicalResultSink ----------------filter(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),$c$1]) ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 ----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 ws_bill_customer_sk->[c_customer_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query46.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query46.out index 1b99c6d506b15e..608b21ff16e959 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query46.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query46.out @@ -5,34 +5,36 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +----------------------------------------PhysicalProject +------------------------------------------filter(s_city IN ('Fairview', 'Midway')) +--------------------------------------------PhysicalOlapScan[store] ------------------------------------PhysicalProject ---------------------------------------filter(s_city IN ('Fairview', 'Midway')) -----------------------------------------PhysicalOlapScan[store] +--------------------------------------filter(d_dow IN (0, 6) and d_year IN (2000, 2001, 2002)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter(d_dow IN (0, 6) and d_year IN (2000, 2001, 2002)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter(OR[(household_demographics.hd_dep_count = 8),(household_demographics.hd_vehicle_count = 0)]) +------------------------------------PhysicalOlapScan[household_demographics] ----------------------------PhysicalProject -------------------------------filter(OR[(household_demographics.hd_dep_count = 8),(household_demographics.hd_vehicle_count = 0)]) ---------------------------------PhysicalOlapScan[household_demographics] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] +------------------------------PhysicalOlapScan[customer_address] ------------PhysicalProject --------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query47.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query47.out index 9a2258d852cebf..313b82ceed5f16 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query47.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query47.out @@ -32,15 +32,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category,i_category];RF9 i_brand->[i_brand,i_brand];RF10 s_store_name->[s_store_name,s_store_name];RF11 s_company_name->[s_company_name,s_company_name];RF12 expr_(rn - 1)->[(rn + 1),rn] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] +----------------PhysicalProject +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() build RFs:RF3 i_category->[i_category];RF4 i_brand->[i_brand];RF5 s_store_name->[s_store_name];RF6 s_company_name->[s_company_name];RF7 rn->[(rn + 1)] --------------------PhysicalProject -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 RF8 RF9 RF10 RF11 RF12 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 --------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2000)) -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 -----------------PhysicalProject -------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) Hint log: Used: leading(store_sales date_dim store item ) leading(v1 v1_lag v1_lead ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query49.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query49.out index dcf3a9418d3491..c9ecc6306091d4 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query49.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query49.out @@ -28,18 +28,18 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 -----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 ws_order_number->[wr_order_number];RF1 ws_item_sk->[wr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalTopN[MERGE_SORT] --------------------PhysicalDistribute[DistributionSpecGather] @@ -60,18 +60,18 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number];RF4 cs_item_sk->[cr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalTopN[MERGE_SORT] --------------------PhysicalDistribute[DistributionSpecGather] @@ -92,16 +92,16 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF8 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query5.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query5.out index b089989d0f82d4..d2cd0fbafa99c2 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query5.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query5.out @@ -64,11 +64,11 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 ws_item_sk->[wr_item_sk];RF5 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 RF6 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF7 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query52.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query52.out index 36b78a0e92594d..f049f02dd6ea5b 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query52.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query52.out @@ -9,17 +9,17 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 1)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 12) and (dt.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 12) and (dt.d_year = 2000)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 1)) +------------------------PhysicalOlapScan[item] Hint log: Used: leading(store_sales item date_dim ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query53.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query53.out index 1a8edda84fe3f4..1a19ed9d6effd7 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query53.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query53.out @@ -8,27 +8,26 @@ PhysicalResultSink ----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute[DistributionSpecHash] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalProject -----------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) -------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalProject -------------------------------------filter(d_month_seq IN (1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalProject +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter(d_month_seq IN (1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] Hint log: Used: leading(store_sales item date_dim store ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query54.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query54.out index ddc3b69f35f222..03cd161a071f94 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query54.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query54.out @@ -15,15 +15,15 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 ca_county->[s_county];RF6 ca_state->[s_state] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[store] apply RFs: RF5 RF6 --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF4 s_county->[ca_county];RF5 s_state->[ca_state] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 RF4 RF5 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject ------------------------------------------hashAgg[GLOBAL] --------------------------------------------PhysicalDistribute[DistributionSpecHash] @@ -31,7 +31,7 @@ PhysicalResultSink ------------------------------------------------PhysicalProject --------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 customer_sk->[c_customer_sk] ----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF4 ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------------PhysicalProject @@ -50,13 +50,19 @@ PhysicalResultSink ----------------------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) ------------------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalProject ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) +----------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] @@ -65,14 +71,8 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------hashAgg[LOCAL] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) -----------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] Hint log: Used: leading(customer { cs_or_ws_sales item date_dim } ) leading(store_sales { customer_address { my_customers store } } date_dim ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query56.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query56.out index 9c20cb7fbf24ec..aa21466c5b9119 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query56.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query56.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject @@ -23,23 +23,23 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 ca_address_sk->[cs_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject @@ -47,37 +47,37 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ws_bill_addr_sk->[ca_address_sk] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] apply RFs: RF11 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query57.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query57.out index a2a31216a3d458..a5e5d808617be4 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query57.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query57.out @@ -32,15 +32,15 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category,i_category];RF8 i_brand->[i_brand,i_brand];RF9 cc_name->[cc_name,cc_name];RF10 expr_(rn - 1)->[(rn + 1),rn] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] +----------------PhysicalProject +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() build RFs:RF3 i_category->[i_category];RF4 i_brand->[i_brand];RF5 cc_name->[cc_name];RF6 rn->[(rn + 1)] --------------------PhysicalProject -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 RF8 RF9 RF10 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 --------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 -----------------PhysicalProject -------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) Hint log: Used: leading(catalog_sales date_dim call_center item ) leading(v1 v1_lag v1_lead ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query59.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query59.out index 2258c50d809884..94778aa9e18bfc 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query59.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query59.out @@ -16,7 +16,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query6.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query6.out index 94dfbee3c5e2b2..bf5c172fd1c85c 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query6.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query6.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF5 i_category->[i_category] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF4 d_month_seq->[d_month_seq] +--------------------------PhysicalAssertNumRows +----------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------hashAgg[GLOBAL] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------hashAgg[LOCAL] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF1 d_month_seq->[d_month_seq] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalAssertNumRows -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------------hashAgg[LOCAL] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) -----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF0 i_category->[i_category] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF5 +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query60.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query60.out index f024124050e0f8..f8c9a0c54cd368 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query60.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query60.out @@ -61,9 +61,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ca_address_sk->[ws_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -71,13 +71,13 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Jewelry')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Jewelry')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query61.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query61.out index 9dac6305cf3b8a..c8b4faf45a1a8e 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query61.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query61.out @@ -9,7 +9,7 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecGather] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] --------------------PhysicalProject ----------------------filter((customer_address.ca_gmt_offset = -7.00)) ------------------------PhysicalOlapScan[customer_address] apply RFs: RF10 @@ -46,7 +46,7 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query63.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query63.out index 1ca1f9d9304401..d9753477a19246 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query63.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query63.out @@ -8,27 +8,26 @@ PhysicalResultSink ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute[DistributionSpecHash] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalProject -----------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) -------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalProject -------------------------------------filter(d_month_seq IN (1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalProject +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter(d_month_seq IN (1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] Hint log: Used: leading(store_sales item date_dim store ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query65.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query65.out index f52a4be6a9722e..05ff7c0393cc59 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query65.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query65.out @@ -7,40 +7,38 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[ss_store_sk] +----------------hashAgg[GLOBAL] +------------------PhysicalProject +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_month_seq <= 1187) and (date_dim.d_month_seq >= 1176)) +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] apply RFs: RF2 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF1 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF1 ------------------------PhysicalProject --------------------------hashAgg[GLOBAL] ----------------------------PhysicalDistribute[DistributionSpecHash] ------------------------------hashAgg[LOCAL] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_month_seq <= 1187) and (date_dim.d_month_seq >= 1176)) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] apply RFs: RF4 ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashAgg[LOCAL] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1187) and (date_dim.d_month_seq >= 1176)) ---------------------------------------PhysicalOlapScan[date_dim] Hint log: Used: leading(store_sales date_dim ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query66.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query66.out index fb7a3400881984..333504222c2dd5 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query66.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query66.out @@ -14,18 +14,17 @@ PhysicalResultSink ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[ws_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF3 sm_ship_mode_sk->[ws_ship_mode_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF2 t_time_sk->[ws_sold_time_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF0 sm_ship_mode_sk->[ws_ship_mode_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) -----------------------------------------------PhysicalOlapScan[ship_mode] +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -33,23 +32,23 @@ PhysicalResultSink ------------------------------------filter((time_dim.t_time <= 71770) and (time_dim.t_time >= 42970)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] +--------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) +----------------------------------PhysicalOlapScan[ship_mode] --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF7 w_warehouse_sk->[cs_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF7 sm_ship_mode_sk->[cs_ship_mode_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[cs_sold_time_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF4 sm_ship_mode_sk->[cs_ship_mode_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 cs_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF4 ------------------------------------------PhysicalProject ---------------------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) -----------------------------------------------PhysicalOlapScan[ship_mode] +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -57,5 +56,6 @@ PhysicalResultSink ------------------------------------filter((time_dim.t_time <= 71770) and (time_dim.t_time >= 42970)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] +--------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) +----------------------------------PhysicalOlapScan[ship_mode] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query67.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query67.out index a99815bf676d13..822d87876cf111 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query67.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query67.out @@ -26,7 +26,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalTopN[LOCAL_SORT] ----------filter((dw2.rk <= 100)) ------------PhysicalWindow ---------------PhysicalPartitionTopN +--------------PhysicalQuickSort[LOCAL_SORT] ----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalPartitionTopN --------------------PhysicalUnion diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query68.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query68.out index c6e34441ff7600..06f641d43895d5 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query68.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query68.out @@ -7,7 +7,7 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] ----------------PhysicalProject ------------------PhysicalOlapScan[customer_address] apply RFs: RF5 ----------------PhysicalProject @@ -17,7 +17,7 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 ----------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query69.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query69.out index 23e2e0cf0e4401..33a3fa8da5b1f5 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query69.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query69.out @@ -9,39 +9,39 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ss_customer_sk] +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 -------------------------PhysicalProject ---------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) -----------------------------PhysicalOlapScan[date_dim] ---------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[cs_ship_customer_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) -------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 ---------------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) +--------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 ---------------------------------PhysicalProject -----------------------------------filter(ca_state IN ('IL', 'ME', 'TX')) -------------------------------------PhysicalOlapScan[customer_address] +------------------------------filter(ca_state IN ('IL', 'ME', 'TX')) +--------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_demographics] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------PhysicalProject +--------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query74.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query74.out index 3dad31da6fa660..3ef928879fadc9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query74.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query74.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -34,20 +34,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL) > if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL) > if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] -----------------PhysicalProject -------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject -----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.00)) -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 +----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 --------------------PhysicalProject -----------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.00)) -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.00)) +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 +------------------PhysicalProject +--------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.00)) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query75.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query75.out index 8fcdeb91302f20..acf911ed5f6a2a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query75.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query75.out @@ -9,9 +9,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------PhysicalUnion --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject @@ -24,48 +22,50 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalProject --------------------------filter(d_year IN (2001, 2002)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------PhysicalProject ------------------------------filter((item.i_category = 'Sports')) --------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject --------------------------filter(d_year IN (2001, 2002)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_returns] --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 ws_order_number->[wr_order_number];RF11 ws_item_sk->[wr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[web_returns] apply RFs: RF10 RF11 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ws_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ----------------------------PhysicalProject ------------------------------filter((item.i_category = 'Sports')) --------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject --------------------------filter(d_year IN (2001, 2002)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) build RFs:RF12 i_brand_id->[i_brand_id];RF13 i_class_id->[i_class_id];RF14 i_category_id->[i_category_id];RF15 i_manufact_id->[i_manufact_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) build RFs:RF6 i_brand_id->[i_brand_id];RF7 i_class_id->[i_class_id];RF8 i_category_id->[i_category_id];RF9 i_manufact_id->[i_manufact_id] --------------filter((curr_yr.d_year = 2002)) -----------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 RF13 RF14 RF15 +----------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 RF8 RF9 --------------filter((prev_yr.d_year = 2001)) ----------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query76.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query76.out index 13989b9aed9734..dbfa39f5d329bf 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query76.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query76.out @@ -12,27 +12,28 @@ PhysicalResultSink ------------------PhysicalUnion --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------------PhysicalProject ----------------------------filter(ss_customer_sk IS NULL) -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF3 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ws_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ws_item_sk->[i_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF1 -------------------------PhysicalProject ---------------------------filter(ws_promo_sk IS NULL) -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------filter(ws_promo_sk IS NULL) +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------filter(cs_bill_customer_sk IS NULL) -------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(cs_bill_customer_sk IS NULL) +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query77.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query77.out index 3659671c869dc8..ec751206cc4d7a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query77.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query77.out @@ -10,38 +10,35 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 sr_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) +------------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject @@ -66,36 +63,33 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 ws_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF9 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wr_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF7 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) +------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query78.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query78.out index a503af2ad5686b..990698673eb1b8 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query78.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query78.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------filter(OR[(coalesce(ws_qty, 0) > 0),(coalesce(cs_qty, 0) > 0)]) ------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((cs.cs_customer_sk = ss.ss_customer_sk) and (cs.cs_item_sk = ss.ss_item_sk) and (cs.cs_sold_year = ss.ss_sold_year)) otherCondition=() --------------PhysicalProject -----------------hashJoin[LEFT_OUTER_JOIN bucketShuffle] hashCondition=((ws.ws_customer_sk = ss.ss_customer_sk) and (ws.ws_item_sk = ss.ss_item_sk) and (ws.ws_sold_year = ss.ss_sold_year)) otherCondition=() +----------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.ws_customer_sk = ss.ss_customer_sk) and (ws.ws_item_sk = ss.ss_item_sk) and (ws.ws_sold_year = ss.ss_sold_year)) otherCondition=() ------------------PhysicalProject --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query79.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query79.out index 8f352e5cb7aaeb..1ade033847b1c9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query79.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query79.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query8.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query8.out index 356aedf614d944..617fac0e1a9864 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query8.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query8.out @@ -22,28 +22,24 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------PhysicalIntersect RFV2: RF3[ca_zip->substring(ca_zip, 1, 5)] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ---------------------------------PhysicalOlapScan[customer_address] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((cnt > 10)) ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((cnt > 10)) +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalProject ---------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalProject ---------------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) -----------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 +----------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 Hint log: Used: diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query80.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query80.out index e33fb4f9e86ba9..f603805790626f 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query80.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query80.out @@ -15,86 +15,86 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF4 ss_item_sk->[sr_item_sk];RF5 ss_ticket_number->[sr_ticket_number] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF5 p_promo_sk->[ss_promo_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF5 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store] apply RFs: RF3 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF1 p_promo_sk->[ss_promo_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_item_sk->[sr_item_sk];RF1 ss_ticket_number->[sr_ticket_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 RF5 --------------------------------------------PhysicalProject -----------------------------------------------filter((promotion.p_channel_tv = 'N')) -------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_current_price > 50.00)) ---------------------------------------------PhysicalOlapScan[item] +----------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF11 cp_catalog_page_sk->[cs_catalog_page_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[cs_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF9 cs_item_sk->[cr_item_sk];RF10 cs_order_number->[cr_order_number] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF9 RF10 +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[cs_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[cs_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF9 cs_catalog_page_sk->[cp_catalog_page_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_page] apply RFs: RF9 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[cs_promo_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF6 cs_item_sk->[cr_item_sk];RF7 cs_order_number->[cr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 RF8 RF11 +--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 RF10 RF11 --------------------------------------------PhysicalProject -----------------------------------------------filter((promotion.p_channel_tv = 'N')) -------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_current_price > 50.00)) ---------------------------------------------PhysicalOlapScan[item] +----------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_page] +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF16 ws_item_sk->[wr_item_sk];RF17 ws_order_number->[wr_order_number] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF16 RF17 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF17 p_promo_sk->[ws_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 web_site_sk->[ws_web_site_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ws_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[ws_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 ws_web_site_sk->[web_site_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF13 p_promo_sk->[ws_promo_sk] +------------------------------------------PhysicalOlapScan[web_site] apply RFs: RF15 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_item_sk->[wr_item_sk];RF13 ws_order_number->[wr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13 RF14 RF15 +--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF16 RF17 --------------------------------------------PhysicalProject -----------------------------------------------filter((promotion.p_channel_tv = 'N')) -------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_current_price > 50.00)) ---------------------------------------------PhysicalOlapScan[item] +----------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_site] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query81.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query81.out index ed0d2cb8c75887..b95c347c4a341c 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query81.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query81.out @@ -7,7 +7,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] --------------------PhysicalProject @@ -26,7 +26,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF4 ctr_state->[ctr_state] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ctr_customer_sk->[c_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ctr_customer_sk->[c_customer_sk] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[c_current_addr_sk] --------------------------PhysicalProject @@ -37,9 +37,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) Hint log: Used: leading(catalog_returns date_dim customer_address ) leading(customer customer_address ctr1 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query87.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query87.out index 9f5547c4459a45..fb0c3aabfeab87 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query87.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query87.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalExcept +----------PhysicalExcept RFV2: RF6[c_last_name->c_last_name] RF7[c_last_name->c_last_name] ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] @@ -33,7 +33,7 @@ PhysicalResultSink ----------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) ------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[customer] RFV2: RF6 ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] @@ -47,5 +47,5 @@ PhysicalResultSink ----------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) ------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query9.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query9.out index 06cd8f92785e08..f159ed97647895 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query9.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query9.out @@ -1,8 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute[DistributionSpecGather] -----PhysicalProject +--PhysicalProject +----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] @@ -16,24 +16,17 @@ PhysicalResultSink --------------------------NestedLoopJoin[CROSS_JOIN] ----------------------------NestedLoopJoin[CROSS_JOIN] ------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------NestedLoopJoin[CROSS_JOIN] -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------------PhysicalProject -----------------------------------------filter((reason.r_reason_sk = 1)) -------------------------------------------PhysicalOlapScan[reason] ---------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[LOCAL] ---------------------------------------------PhysicalProject -----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) -------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ---------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------PhysicalProject +----------------------------------NestedLoopJoin[CROSS_JOIN] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) +----------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------PhysicalProject +--------------------------------------filter((reason.r_reason_sk = 1)) +----------------------------------------PhysicalOlapScan[reason] --------------------------------hashAgg[GLOBAL] ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] @@ -44,7 +37,7 @@ PhysicalResultSink --------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject ---------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) +--------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------PhysicalOlapScan[store_sales] ----------------------------hashAgg[GLOBAL] ------------------------------PhysicalDistribute[DistributionSpecGather] @@ -62,7 +55,7 @@ PhysicalResultSink --------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject ---------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) +--------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------PhysicalOlapScan[store_sales] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecGather] @@ -80,7 +73,7 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) +--------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------PhysicalOlapScan[store_sales] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecGather] @@ -98,7 +91,7 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +--------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------PhysicalOlapScan[store_sales] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] @@ -112,4 +105,10 @@ PhysicalResultSink --------------PhysicalProject ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------PhysicalOlapScan[store_sales] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +----------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query91.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query91.out index 1a3b0d97b0d8fa..801f439b996217 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query91.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query91.out @@ -17,7 +17,7 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 RF5 ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] --------------------------------PhysicalProject ----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) ------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query93.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query93.out index 8478d4b304a2cc..6b894192d08df0 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query93.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query93.out @@ -8,16 +8,16 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN colocated] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF2 r_reason_sk->[sr_reason_sk] ------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF0 r_reason_sk->[sr_reason_sk] +--------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF0 sr_item_sk->[ss_item_sk];RF1 sr_ticket_number->[ss_ticket_number] ----------------------PhysicalProject -------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject -------------------------filter((reason.r_reason_desc = 'reason 58')) ---------------------------PhysicalOlapScan[reason] +------------------------PhysicalOlapScan[store_returns] apply RFs: RF2 +------------------PhysicalProject +--------------------filter((reason.r_reason_desc = 'reason 58')) +----------------------PhysicalOlapScan[reason] Hint log: Used: diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query94.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query94.out index bd89dd58effa9b..1d74700f0bf4fa 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query94.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query94.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ---------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'OK')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'OK')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((web_site.web_company_name = 'pri')) +--------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query95.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query95.out index 84bdd6cf3d8f4a..c295e9d1ccbd38 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query95.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query95.out @@ -3,42 +3,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales] apply RFs: RF0 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales] --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] ---------hashAgg[DISTINCT_GLOBAL] +--------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashAgg[GLOBAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'VA')) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk] +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF3 wr_order_number->[ws_order_number,ws_order_number] +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[ws_order_number] +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) -----------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 RF6 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] +----------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) +------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------filter((customer_address.ca_state = 'VA')) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((web_site.web_company_name = 'pri')) +----------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf1000/hint/query98.out b/regression-test/data/shape_check/tpcds_sf1000/hint/query98.out index d5984e90c891d2..f31589359db80a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/hint/query98.out +++ b/regression-test/data/shape_check/tpcds_sf1000/hint/query98.out @@ -7,22 +7,21 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '1999-03-07') and (date_dim.d_date >= '1999-02-05')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Jewelry', 'Men', 'Sports')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter((date_dim.d_date <= '1999-03-07') and (date_dim.d_date >= '1999-02-05')) +--------------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalProject +--------------------------filter(i_category IN ('Jewelry', 'Men', 'Sports')) +----------------------------PhysicalOlapScan[item] Hint log: Used: leading(store_sales date_dim item ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query1.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query1.out index 7a66b56b70ee27..c7ce68930adec1 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query1.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query1.out @@ -18,20 +18,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ctr_customer_sk->[c_customer_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 --------------PhysicalProject -----------------PhysicalOlapScan[customer] apply RFs: RF3 ---------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF2 ctr_store_sk->[ctr_store_sk,s_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] apply RFs: RF2 ------------------PhysicalProject --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 ----------------------PhysicalProject ------------------------filter((store.s_state = 'TN')) ---------------------------PhysicalOlapScan[store] apply RFs: RF2 -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query10.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query10.out index 78fd7c847c29ed..7edb31df7ebbc7 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query10.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query10.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) +------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 --------------------------PhysicalProject ----------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] -------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] -------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(ca_county IN ('Campbell County', 'Cleburne County', 'Escambia County', 'Fairfield County', 'Washtenaw County')) ---------------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query11.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query11.out index 658b33ae49d40b..368863a5263c99 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query11.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query11.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -34,12 +34,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 1999) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.dyear = 1999) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query12.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query12.out index f46e97e8a5b3c6..42716789edca42 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query12.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query12.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2001-07-15') and (date_dim.d_date >= '2001-06-15')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Books', 'Electronics', 'Men')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Books', 'Electronics', 'Men')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2001-07-15') and (date_dim.d_date >= '2001-06-15')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query13.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query13.out index 027cb5f01acff1..10a88df6e25b29 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query13.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query13.out @@ -5,30 +5,30 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('IL', 'TN', 'TX'),(store_sales.ss_net_profit >= 100.00),(store_sales.ss_net_profit <= 200.00)],AND[ca_state IN ('ID', 'OH', 'WY'),(store_sales.ss_net_profit >= 150.00)],AND[ca_state IN ('IA', 'MS', 'SC'),(store_sales.ss_net_profit <= 250.00)]]) build RFs:RF3 ss_addr_sk->[ca_address_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('IL', 'TN', 'TX'),(store_sales.ss_net_profit >= 100.00),(store_sales.ss_net_profit <= 200.00)],AND[ca_state IN ('ID', 'OH', 'WY'),(store_sales.ss_net_profit >= 150.00)],AND[ca_state IN ('IA', 'MS', 'SC'),(store_sales.ss_net_profit <= 250.00)]]) build RFs:RF3 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('IA', 'ID', 'IL', 'MS', 'OH', 'SC', 'TN', 'TX', 'WY')) ---------------------PhysicalOlapScan[customer_address] apply RFs: RF3 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=(OR[AND[(household_demographics.hd_dep_count = 1),OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price >= 150.00)]]],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00),(household_demographics.hd_dep_count = 3)]]) build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ----------------------------PhysicalProject -------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 +------------------------------PhysicalOlapScan[store] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'M', 'W')) ---------------------------------PhysicalOlapScan[customer_demographics] +------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter(hd_dep_count IN (1, 3)) -----------------------------PhysicalOlapScan[household_demographics] +--------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = '2 yr Degree')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'College')]] and cd_education_status IN ('2 yr Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'M', 'W')) +----------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject -----------------------filter((date_dim.d_year = 2001)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter(hd_dep_count IN (1, 3)) +------------------------PhysicalOlapScan[household_demographics] +----------------PhysicalProject +------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('IA', 'ID', 'IL', 'MS', 'OH', 'SC', 'TN', 'TX', 'WY')) +--------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[store] +--------------filter((date_dim.d_year = 2001)) +----------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query14.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query14.out index 8336e41c8b5f66..b26122a7d39ad8 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query14.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query14.out @@ -7,48 +7,42 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalProject ----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 --------PhysicalIntersect RFV2: RF19[brand_id->i_brand_id] RF20[brand_id->i_brand_id] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------PhysicalProject ---------------------------filter((d1.d_year <= 2001) and (d1.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] +------------------filter((d1.d_year <= 2001) and (d1.d_year >= 1999)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalProject ---------------------------filter((d2.d_year <= 2001) and (d2.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF2 RFV2: RF19 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF19 -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------PhysicalProject +------------------filter((d2.d_year <= 2001) and (d2.d_year >= 1999)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[ws_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -------------------------PhysicalProject ---------------------------filter((d3.d_year <= 2001) and (d3.d_year >= 1999)) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF4 RFV2: RF20 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] RFV2: RF20 +----------------------PhysicalOlapScan[web_sales] apply RFs: RF5 +----------------PhysicalProject +------------------filter((d3.d_year <= 2001) and (d3.d_year >= 1999)) +--------------------PhysicalOlapScan[date_dim] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] @@ -82,18 +76,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ss_item_sk,ss_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF11 ss_item_sk->[ss_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ss_item_sk,ss_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF10 ss_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 RF12 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF11 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) @@ -104,18 +98,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF15 i_item_sk->[cs_item_sk,ss_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF14 ss_item_sk->[cs_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF13 d_date_sk->[cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[cs_item_sk,ss_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF13 ss_item_sk->[cs_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF13 RF14 RF15 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF15 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF14 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) @@ -126,18 +120,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF18 i_item_sk->[ss_item_sk,ws_item_sk] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF17 ss_item_sk->[ws_item_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF16 d_date_sk->[ws_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF17 i_item_sk->[ss_item_sk,ws_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ss_item_sk->[ws_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17 RF18 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF18 +--------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF17 +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2001)) +------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalAssertNumRows ----------------------PhysicalDistribute[DistributionSpecGather] ------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query15.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query15.out index 06c1b08293ef85..90a0eaf0c974a6 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query15.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query15.out @@ -8,18 +8,18 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 +------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 ----------------------PhysicalProject -------------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2001)) ---------------------------PhysicalOlapScan[date_dim] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +--------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 2001)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query16.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query16.out index 21dcd5cf6df0ae..c0fa42e4418d84 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query16.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query16.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF4 cc_call_center_sk->[cs_call_center_sk] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF4 cs_order_number->[cs_order_number] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[cs_ship_addr_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 ---------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF1 cs_order_number->[cr_order_number] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cs_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'PA')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter((call_center.cc_county = 'Williamson County')) -------------------------------PhysicalOlapScan[call_center] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'PA')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((call_center.cc_county = 'Williamson County')) +--------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query17.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query17.out index 12fa11701b619f..f5771465f5a414 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query17.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query17.out @@ -9,36 +9,36 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -------------------------PhysicalProject ---------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalOlapScan[item] apply RFs: RF9 --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[sr_item_sk,ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +--------------------------PhysicalOlapScan[store] apply RFs: RF8 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ------------------------------------PhysicalProject --------------------------------------filter((d1.d_quarter_name = '2001Q1')) ----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF6 -------------------------------------PhysicalProject ---------------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] +------------------------------filter(d_quarter_name IN ('2001Q1', '2001Q2', '2001Q3')) +--------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query18.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query18.out index ea401d9c36dc08..1f8711102718bc 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query18.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query18.out @@ -14,26 +14,26 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 RF5 +------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF2 ----------------------------------PhysicalProject -------------------------------------filter((cd1.cd_education_status = 'Primary') and (cd1.cd_gender = 'F')) ---------------------------------------PhysicalOlapScan[customer_demographics] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 c_current_cdemo_sk->[cd_demo_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF1 -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cs_bill_customer_sk] --------------------------------------PhysicalProject -----------------------------------------filter(c_birth_month IN (1, 10, 11, 3, 4, 7)) -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 RF5 +------------------------------------------PhysicalProject +--------------------------------------------filter((cd1.cd_education_status = 'Primary') and (cd1.cd_gender = 'F')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------filter(ca_state IN ('AL', 'CA', 'GA', 'IN', 'MO', 'MT', 'TN')) -------------------------------------------PhysicalOlapScan[customer_address] +----------------------------------------filter(c_birth_month IN (1, 10, 11, 3, 4, 7)) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------------PhysicalProject +--------------------------------filter(ca_state IN ('AL', 'CA', 'GA', 'IN', 'MO', 'MT', 'TN')) +----------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query19.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query19.out index addae12e92893c..8df38cc3d78d0d 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query19.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query19.out @@ -9,27 +9,27 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 c_current_addr_sk->[ca_address_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] apply RFs: RF4 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] apply RFs: RF3 +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ------------------------------------PhysicalProject ---------------------------------------filter((item.i_manager_id = 14)) -----------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2002)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter((item.i_manager_id = 14)) +------------------------------------PhysicalOlapScan[item] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store] +------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_address] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query20.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query20.out index 8728415de8b335..234a947205b2ca 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query20.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query20.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-07-18') and (date_dim.d_date >= '2002-06-18')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Books', 'Music', 'Sports')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Books', 'Music', 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-07-18') and (date_dim.d_date >= '2002-06-18')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query21.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query21.out index f68b978b0b2ba6..697bdcc82ea22e 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query21.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query21.out @@ -9,18 +9,18 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 w_warehouse_sk->[inv_warehouse_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] -----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 inv_warehouse_sk->[w_warehouse_sk] ----------------------------PhysicalProject -------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) ---------------------------------PhysicalOlapScan[item] +------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 +----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 RF2 ------------------------PhysicalProject ---------------------------filter((date_dim.d_date <= '1999-07-22') and (date_dim.d_date >= '1999-05-23')) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) +----------------------------PhysicalOlapScan[item] --------------------PhysicalProject -----------------------PhysicalOlapScan[warehouse] +----------------------filter((date_dim.d_date <= '1999-07-22') and (date_dim.d_date >= '1999-05-23')) +------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query23.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query23.out index 8dab50e01d63c9..e6e4f47ebe7f96 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query23.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query23.out @@ -5,17 +5,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((cnt > 4)) --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------PhysicalProject +------------------------filter(d_year IN (2000, 2001, 2002, 2003)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter(d_year IN (2000, 2001, 2002, 2003)) -----------------------PhysicalOlapScan[date_dim] ---------------PhysicalProject -----------------PhysicalOlapScan[item] +--------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) ----PhysicalCteProducer ( cteId=CTEId#2 ) ------PhysicalProject @@ -51,29 +53,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------hashAgg[LOCAL] ----------------PhysicalUnion ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF5 cs_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF4 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF4 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF3 item_sk->[cs_item_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF5 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF8 ws_item_sk->[item_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF7 ws_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF7 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ws_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF6 item_sk->[ws_item_sk] ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF8 +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalProject +------------------------filter((date_dim.d_moy = 7) and (date_dim.d_year = 2000)) +--------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query24.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query24.out index f7c2fac60775de..732d4071999ec8 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query24.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query24.out @@ -7,46 +7,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF5 sr_ticket_number->[ss_ticket_number];RF6 sr_item_sk->[i_item_sk,ss_item_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk) and (store.s_zip = customer_address.ca_zip)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF5 ca_address_sk->[c_current_addr_sk];RF6 ca_zip->[s_zip] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ca_zip->[s_zip];RF3 c_customer_sk->[ss_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF3 RF4 RF5 RF6 -----------------------------PhysicalProject -------------------------------filter((store.s_market_id = 5)) ---------------------------------PhysicalOlapScan[store] apply RFs: RF2 +--------------------------PhysicalOlapScan[item] apply RFs: RF3 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF0 ca_address_sk->[c_current_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +------------------------------filter((store.s_market_id = 5)) +--------------------------------PhysicalOlapScan[store] apply RFs: RF6 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] apply RFs: RF6 +----------------------PhysicalOlapScan[customer] apply RFs: RF5 ----------------PhysicalProject -------------------PhysicalOlapScan[store_returns] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalProject ---------------------------filter((ssales.i_color = 'aquamarine')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecGather] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalQuickSort[LOCAL_SORT] +--------PhysicalProject +----------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecGather] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------filter((ssales.i_color = 'aquamarine')) +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query25.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query25.out index 8ccafdc60f8ba4..bc272863b1b5a2 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query25.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query25.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF8 sr_customer_sk->[cs_bill_customer_sk];RF9 sr_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 -----------------------PhysicalProject -------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 1999)) ---------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[item] apply RFs: RF9 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[sr_item_sk,ss_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +------------------------PhysicalOlapScan[store] apply RFs: RF8 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 +--------------------------------------PhysicalProject +----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject ------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1999)) --------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF6 -----------------------------------PhysicalProject -------------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 1999)) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] -----------------------PhysicalProject -------------------------PhysicalOlapScan[item] +----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 1999)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query26.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query26.out index 383242890f9dd4..395303e1696be6 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query26.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query26.out @@ -8,24 +8,24 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[cs_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[cs_promo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'Unknown') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'W')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2002)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ---------------------------PhysicalOlapScan[promotion] ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) +----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query27.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query27.out index 47ceeb712c2a8c..44df24982ee98f 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query27.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query27.out @@ -10,11 +10,11 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------------PhysicalProject @@ -23,11 +23,11 @@ PhysicalResultSink ------------------------------------filter((customer_demographics.cd_education_status = 'Secondary') and (customer_demographics.cd_gender = 'M') and (customer_demographics.cd_marital_status = 'W')) --------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------PhysicalProject ---------------------------------filter((store.s_state = 'TN')) -----------------------------------PhysicalOlapScan[store] +--------------------------------filter((date_dim.d_year = 1999)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------filter((store.s_state = 'TN')) +------------------------------PhysicalOlapScan[store] ----------------------PhysicalProject ------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query29.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query29.out index 649a6f83d9759a..c17615ad52d1e3 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query29.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query29.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF7 sr_customer_sk->[cs_bill_customer_sk];RF8 sr_item_sk->[cs_item_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 RF8 RF9 +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[sr_item_sk,ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF2 sr_customer_sk->[ss_customer_sk];RF3 sr_item_sk->[ss_item_sk];RF4 sr_ticket_number->[ss_ticket_number] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 RF6 +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject -----------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1998)) -------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF6 ---------------------------------------PhysicalProject -----------------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998)) -------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1998)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +--------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -------------------PhysicalProject ---------------------filter(d_year IN (1998, 1999, 2000)) -----------------------PhysicalOlapScan[date_dim] +----------------------------filter(d_year IN (1998, 1999, 2000)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query3.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query3.out index 4092c73d09fd5b..8beaf9b74953fb 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query3.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query3.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manufact_id = 816)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 11)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 11)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manufact_id = 816)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query30.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query30.out index ffdbebdce5d08e..c9b32a7586f68e 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query30.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query30.out @@ -7,7 +7,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] --------------------PhysicalProject @@ -28,7 +28,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] --------------------------PhysicalProject ----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_birth_month,customer.c_birth_year,customer.c_birth_country,customer.c_login,customer.c_email_address,customer.c_last_review_date_sk,customer.c_salutation,customer.c_first_name,customer.c_last_name,customer.c_preferred_cust_flag,customer.c_birth_day)] apply RFs: RF2 RF3 --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 @@ -37,7 +37,5 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query31.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query31.out index 56ccb985a8c645..4b717aea7202e9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query31.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query31.out @@ -39,29 +39,29 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalQuickSort[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] ----------------PhysicalProject -------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 1999)) ---------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF8 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county] ---------------------PhysicalProject -----------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 1999)) -------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() build RFs:RF4 ca_county->[ca_county] ----------------------------PhysicalProject ------------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 1999)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 RF7 RF8 ----------------------------PhysicalProject ------------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 1999)) ---------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 RF7 RF8 --------------------------PhysicalProject ----------------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 1999)) ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------------PhysicalProject ------------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 1999)) ---------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) +--------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 RF8 +--------------------PhysicalProject +----------------------filter((ws2.d_qoy = 2) and (ws2.d_year = 1999)) +------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF8 +----------------PhysicalProject +------------------filter((ws3.d_qoy = 3) and (ws3.d_year = 1999)) +--------------------PhysicalCteConsumer ( cteId=CTEId#1 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query33.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query33.out index f1cd1e4c777310..45937eb4961690 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query33.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query33.out @@ -9,75 +9,75 @@ PhysicalResultSink ------------hashAgg[LOCAL] --------------PhysicalUnion ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF3 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Books')) -------------------------PhysicalOlapScan[item] apply RFs: RF3 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((item.i_category = 'Books')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF7 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Books')) -------------------------PhysicalOlapScan[item] apply RFs: RF7 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((item.i_category = 'Books')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF11 i_manufact_id->[i_manufact_id] ---------------------PhysicalProject -----------------------filter((item.i_category = 'Books')) -------------------------PhysicalOlapScan[item] apply RFs: RF11 ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 ---------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2001)) -------------------------------------------PhysicalOlapScan[date_dim] -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((item.i_category = 'Books')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query34.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query34.out index c75d4fc3e18155..084973d3646dd5 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query34.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query34.out @@ -13,20 +13,20 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject -----------------------------------filter((store.s_county = 'Williamson County')) -------------------------------------PhysicalOlapScan[store] +----------------------------------filter((date_dim.d_dom <= 28) and (date_dim.d_dom >= 1) and OR[(date_dim.d_dom <= 3),(date_dim.d_dom >= 25)] and d_year IN (2000, 2001, 2002)) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter((store.s_county = 'Williamson County')) +--------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject ---------------------------filter((date_dim.d_dom <= 28) and (date_dim.d_dom >= 1) and OR[(date_dim.d_dom <= 3),(date_dim.d_dom >= 25)] and d_year IN (2000, 2001, 2002)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('0-500', '1001-5000')) +----------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query35.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query35.out index fc317d15ce7bdd..b6bc0d45b0de9e 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query35.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query35.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) -------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] ---------------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ---------------------------------PhysicalProject -----------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) -------------------------------------PhysicalOlapScan[date_dim] -----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) +------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF4 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer_address] +------------------------------------PhysicalOlapScan[customer] apply RFs: RF5 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[customer_demographics] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +--------------------------PhysicalProject +----------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 1999)) +------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query36.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query36.out index e31b175d47d2c5..9cc6fe32072e5d 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query36.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query36.out @@ -15,19 +15,19 @@ PhysicalResultSink ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +--------------------------------------PhysicalOlapScan[item] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 ----------------------------------------PhysicalProject -------------------------------------------filter((store.s_state = 'TN')) ---------------------------------------------PhysicalOlapScan[store] -------------------------------------PhysicalProject ---------------------------------------filter((d1.d_year = 2000)) -----------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------filter((d1.d_year = 2000)) +--------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] +----------------------------------filter((store.s_state = 'TN')) +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query38.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query38.out index fc988652648dc2..dc20e01c3ded44 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query38.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query38.out @@ -7,16 +7,16 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------PhysicalIntersect +--------------PhysicalIntersect RFV2: RF6[c_last_name->c_last_name] RF7[c_last_name->c_last_name] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------PhysicalOlapScan[date_dim] @@ -35,19 +35,19 @@ PhysicalResultSink --------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------PhysicalOlapScan[customer] RFV2: RF6 ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ss_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1200) and (date_dim.d_month_seq >= 1189)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query39.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query39.out index 7b00628d966265..fd677bb7120b21 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query39.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query39.out @@ -5,22 +5,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----PhysicalProject ------filter((if((mean = 0.0), 0.0, (stdev / mean)) > 1.0)) --------hashAgg[GLOBAL] -----------PhysicalDistribute[DistributionSpecHash] -------------hashAgg[LOCAL] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[inv_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] ---------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 2000) and d_moy IN (1, 2)) -------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------PhysicalOlapScan[warehouse] +--------------------PhysicalOlapScan[warehouse] apply RFs: RF1 ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 inv_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF0 +----------------------PhysicalOlapScan[inventory] apply RFs: RF2 +--------------PhysicalProject +----------------filter((date_dim.d_year = 2000) and d_moy IN (1, 2)) +------------------PhysicalOlapScan[date_dim] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query4.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query4.out index c632e138df6ec4..cee8d253c1b8d0 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query4.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query4.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk,ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk,ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -45,19 +45,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id,customer_id,customer_id] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] ----------------------PhysicalProject ------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] ----------------------------PhysicalProject ------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query40.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query40.out index 041e5711184598..69044061da93de 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query40.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query40.out @@ -8,23 +8,23 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 w_warehouse_sk->[cs_warehouse_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 cs_warehouse_sk->[w_warehouse_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[warehouse] apply RFs: RF2 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cs_order_number->[cr_order_number];RF1 cs_item_sk->[cr_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 +--------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 ------------------------------PhysicalProject ---------------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter((date_dim.d_date <= '2001-06-01') and (date_dim.d_date >= '2001-04-02')) -------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 +----------------------PhysicalProject +------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) +--------------------------PhysicalOlapScan[item] ------------------PhysicalProject ---------------------PhysicalOlapScan[warehouse] +--------------------filter((date_dim.d_date <= '2001-06-01') and (date_dim.d_date >= '2001-04-02')) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query42.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query42.out index 082d64052595a4..cccbaa603c20be 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query42.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query42.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 1)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 11) and (dt.d_year = 1998)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 11) and (dt.d_year = 1998)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 1)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query44.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query44.out index 5d21002157fd9a..411368c8103f61 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query44.out @@ -7,28 +7,23 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] +------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] --------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0 --------------------PhysicalProject -----------------------filter((V21.rnk < 11)) -------------------------PhysicalWindow ---------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute[DistributionSpecGather] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((asceding.rnk = descending.rnk)) otherCondition=() +------------------------PhysicalProject +--------------------------filter((V11.rnk < 11)) +----------------------------PhysicalWindow ------------------------------PhysicalQuickSort[LOCAL_SORT] --------------------------------PhysicalPartitionTopN ----------------------------------PhysicalProject ------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject -----------------------------------------hashAgg[GLOBAL] -------------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------------hashAgg[LOCAL] -----------------------------------------------PhysicalProject -------------------------------------------------filter((ss1.ss_store_sk = 4)) ---------------------------------------------------PhysicalOlapScan[store_sales] ---------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] --------------------------------------------PhysicalProject @@ -38,19 +33,6 @@ PhysicalResultSink ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i1.i_product_name)] apply RFs: RF0 ---------------------PhysicalProject -----------------------filter((V11.rnk < 11)) -------------------------PhysicalWindow ---------------------------PhysicalQuickSort[MERGE_SORT] -----------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------PhysicalQuickSort[LOCAL_SORT] ---------------------------------PhysicalPartitionTopN -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject ----------------------------------------hashAgg[GLOBAL] ------------------------------------------PhysicalDistribute[DistributionSpecHash] @@ -58,6 +40,13 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((ss1.ss_store_sk = 4)) --------------------------------------------------PhysicalOlapScan[store_sales] +------------------------PhysicalProject +--------------------------filter((V21.rnk < 11)) +----------------------------PhysicalWindow +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject ----------------------------------------PhysicalAssertNumRows ------------------------------------------PhysicalDistribute[DistributionSpecGather] @@ -68,4 +57,11 @@ PhysicalResultSink ----------------------------------------------------PhysicalProject ------------------------------------------------------filter((store_sales.ss_store_sk = 4) and ss_hdemo_sk IS NULL) --------------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------PhysicalProject +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 4)) +--------------------------------------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query45.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query45.out index dcc2e202e23752..5d85587fd460ab 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query45.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query45.out @@ -11,20 +11,20 @@ PhysicalResultSink ----------------filter(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),$c$1]) ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ws_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 ----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 ws_bill_customer_sk->[c_customer_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() ------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query46.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query46.out index 38585ee71d9963..6287f3f2418e4e 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query46.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query46.out @@ -5,34 +5,34 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] -----------------PhysicalProject -------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ------------------------------------PhysicalProject ---------------------------------------filter(s_city IN ('Fairview', 'Midway')) -----------------------------------------PhysicalOlapScan[store] +--------------------------------------filter(d_dow IN (0, 6) and d_year IN (2000, 2001, 2002)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter(d_dow IN (0, 6) and d_year IN (2000, 2001, 2002)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter(s_city IN ('Fairview', 'Midway')) +------------------------------------PhysicalOlapScan[store] ----------------------------PhysicalProject ------------------------------filter(OR[(household_demographics.hd_dep_count = 8),(household_demographics.hd_vehicle_count = 0)]) --------------------------------PhysicalOlapScan[household_demographics] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------PhysicalOlapScan[customer] apply RFs: RF5 ------------PhysicalProject --------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query47.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query47.out index 0428d0e8670918..43f55ec3ac74d1 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query47.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query47.out @@ -12,33 +12,33 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------filter(OR[(date_dim.d_year = 2000),AND[(date_dim.d_year = 1999),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2001),(date_dim.d_moy = 1)]] and d_year IN (1999, 2000, 2001)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +--------------------------------filter(OR[(date_dim.d_year = 2000),AND[(date_dim.d_year = 1999),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2001),(date_dim.d_moy = 1)]] and d_year IN (1999, 2000, 2001)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------PhysicalOlapScan[store] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category,i_category];RF9 i_brand->[i_brand,i_brand];RF10 s_store_name->[s_store_name,s_store_name];RF11 s_company_name->[s_company_name,s_company_name];RF12 expr_(rn - 1)->[(rn + 1),rn] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] +----------------PhysicalProject +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1)) and (v1.s_company_name = v1_lag.s_company_name) and (v1.s_store_name = v1_lag.s_store_name)) otherCondition=() build RFs:RF3 i_category->[i_category];RF4 i_brand->[i_brand];RF5 s_store_name->[s_store_name];RF6 s_company_name->[s_company_name];RF7 rn->[(rn + 1)] --------------------PhysicalProject -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 RF8 RF9 RF10 RF11 RF12 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 --------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2000)) -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 -----------------PhysicalProject -------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query48.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query48.out index d11dadeae0b923..b5fe58778d4d56 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query48.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query48.out @@ -5,25 +5,25 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('ND', 'NY', 'SD'),(store_sales.ss_net_profit <= 2000.00)],AND[ca_state IN ('GA', 'KS', 'MD'),(store_sales.ss_net_profit >= 150.00),(store_sales.ss_net_profit <= 3000.00)],AND[ca_state IN ('CO', 'MN', 'NC'),(store_sales.ss_net_profit >= 50.00)]]) build RFs:RF2 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[AND[ca_state IN ('ND', 'NY', 'SD'),(store_sales.ss_net_profit <= 2000.00)],AND[ca_state IN ('GA', 'KS', 'MD'),(store_sales.ss_net_profit >= 150.00),(store_sales.ss_net_profit <= 3000.00)],AND[ca_state IN ('CO', 'MN', 'NC'),(store_sales.ss_net_profit >= 50.00)]]) build RFs:RF1 ca_address_sk->[ss_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'Secondary'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Advanced Degree'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'Secondary'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '2 yr Degree'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Advanced Degree'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------PhysicalOlapScan[store] apply RFs: RF0 ------------------------PhysicalProject ---------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'Secondary')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '2 yr Degree')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('2 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('D', 'M', 'S')) -----------------------------PhysicalOlapScan[customer_demographics] +--------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 --------------------PhysicalProject -----------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('CO', 'GA', 'KS', 'MD', 'MN', 'NC', 'ND', 'NY', 'SD')) -------------------------PhysicalOlapScan[customer_address] +----------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'S'),(customer_demographics.cd_education_status = 'Secondary')],AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = '2 yr Degree')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('2 yr Degree', 'Advanced Degree', 'Secondary') and cd_marital_status IN ('D', 'M', 'S')) +------------------------PhysicalOlapScan[customer_demographics] ----------------PhysicalProject -------------------filter((date_dim.d_year = 2001)) ---------------------PhysicalOlapScan[date_dim] +------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('CO', 'GA', 'KS', 'MD', 'MN', 'NC', 'ND', 'NY', 'SD')) +--------------------PhysicalOlapScan[customer_address] ------------PhysicalProject ---------------PhysicalOlapScan[store] +--------------filter((date_dim.d_year = 2001)) +----------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query49.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query49.out index dcf3a9418d3491..c9ecc6306091d4 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query49.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query49.out @@ -28,18 +28,18 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number];RF2 ws_item_sk->[wr_item_sk] +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 -----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 ws_order_number->[wr_order_number];RF1 ws_item_sk->[wr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalTopN[MERGE_SORT] --------------------PhysicalDistribute[DistributionSpecGather] @@ -60,18 +60,18 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF4 cs_order_number->[cr_order_number];RF5 cs_item_sk->[cr_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number];RF4 cs_item_sk->[cr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 +----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalDistribute[DistributionSpecExecutionAny] ------------------PhysicalTopN[MERGE_SORT] --------------------PhysicalDistribute[DistributionSpecGather] @@ -92,16 +92,16 @@ PhysicalResultSink --------------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------------hashAgg[LOCAL] ------------------------------------------------------PhysicalProject ---------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF7 ss_ticket_number->[sr_ticket_number];RF8 ss_item_sk->[sr_item_sk] -----------------------------------------------------------PhysicalProject -------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) ---------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF7 RF8 +--------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +------------------------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 +----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) +------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 --------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) -------------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF8 +----------------------------------------------------------PhysicalProject +------------------------------------------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 1998)) +--------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query5.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query5.out index d61bb667b491c6..393d0aff07b849 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query5.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query5.out @@ -64,11 +64,11 @@ PhysicalResultSink ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 ws_item_sk->[wr_item_sk];RF5 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 RF6 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF7 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query50.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query50.out index f5c3f38463d42c..b0c225dcbaad90 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query50.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query50.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[sr_returned_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 ss_sold_date_sk->[d_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF1 sr_ticket_number->[ss_ticket_number];RF2 sr_item_sk->[ss_item_sk];RF3 sr_customer_sk->[ss_customer_sk] +------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 RF5 +----------------------------PhysicalOlapScan[store] apply RFs: RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk];RF2 ss_customer_sk->[sr_customer_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 RF2 RF5 ------------------------------PhysicalProject ---------------------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) -----------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[store_sales] ------------------PhysicalProject ---------------------PhysicalOlapScan[store] +--------------------filter((d2.d_moy = 8) and (d2.d_year = 2001)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query52.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query52.out index 45fecf5a37245e..c4ca0099a7bf6c 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query52.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query52.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dt.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 1)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((dt.d_moy = 12) and (dt.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((dt.d_moy = 12) and (dt.d_year = 2000)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 1)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query53.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query53.out index d2467a65e93e09..99558445f954c3 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query53.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query53.out @@ -8,25 +8,24 @@ PhysicalResultSink ----------filter((if((avg_quarterly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_quarterly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_quarterly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute[DistributionSpecHash] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalProject -----------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) -------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalProject -------------------------------------filter(d_month_seq IN (1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalProject +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter(d_month_seq IN (1186, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query54.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query54.out index b7c2fe2adcd5b6..48f86f3ab89926 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query54.out @@ -15,23 +15,21 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 ca_county->[s_county];RF6 ca_state->[s_state] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[store] apply RFs: RF5 RF6 --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF4 s_county->[ca_county];RF5 s_state->[ca_state] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 c_current_addr_sk->[ca_address_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 RF4 RF5 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject ------------------------------------------hashAgg[GLOBAL] --------------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject ---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 customer_sk->[c_customer_sk] -----------------------------------------------------PhysicalProject -------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF2 +--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk,ws_bill_customer_sk] ----------------------------------------------------PhysicalProject ------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] --------------------------------------------------------PhysicalProject @@ -39,24 +37,32 @@ PhysicalResultSink ------------------------------------------------------------PhysicalUnion --------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 --------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------------------------------PhysicalProject -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ------------------------------------------------------------PhysicalProject --------------------------------------------------------------filter((item.i_category = 'Music') and (item.i_class = 'country')) ----------------------------------------------------------------PhysicalOlapScan[item] --------------------------------------------------------PhysicalProject ----------------------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) ------------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalProject +------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalProject ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) +----------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] @@ -65,12 +71,6 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------hashAgg[LOCAL] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 1) and (date_dim.d_year = 1999)) -----------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query55.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query55.out index 652a5dab8d16b2..dbf767892d8bab 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query55.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query55.out @@ -9,15 +9,15 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 52)) -----------------------------PhysicalOlapScan[item] +--------------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2000)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter((date_dim.d_moy = 11) and (date_dim.d_year = 2000)) -------------------------PhysicalOlapScan[date_dim] +----------------------filter((item.i_manager_id = 52)) +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query56.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query56.out index 9c20cb7fbf24ec..aa21466c5b9119 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query56.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query56.out @@ -13,9 +13,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject @@ -23,23 +23,23 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF7 ca_address_sk->[cs_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject @@ -47,37 +47,37 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ws_bill_addr_sk->[ca_address_sk] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -6.00)) ---------------------------------PhysicalOlapScan[customer_address] apply RFs: RF11 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) ---------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('orchid', 'pink', 'powder')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query57.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query57.out index 00c01451579574..b01eaad1f78bb9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query57.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query57.out @@ -12,33 +12,33 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((call_center.cc_call_center_sk = catalog_sales.cs_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((call_center.cc_call_center_sk = catalog_sales.cs_call_center_sk)) otherCondition=() build RFs:RF1 cc_call_center_sk->[cs_call_center_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 cs_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------filter(OR[(date_dim.d_year = 2001),AND[(date_dim.d_year = 2000),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2002),(date_dim.d_moy = 1)]] and d_year IN (2000, 2001, 2002)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[call_center] +--------------------------------filter(OR[(date_dim.d_year = 2001),AND[(date_dim.d_year = 2000),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2002),(date_dim.d_moy = 1)]] and d_year IN (2000, 2001, 2002)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------PhysicalOlapScan[call_center] --PhysicalResultSink ----PhysicalProject ------PhysicalTopN[MERGE_SORT] --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category,i_category];RF8 i_brand->[i_brand,i_brand];RF9 cc_name->[cc_name,cc_name];RF10 expr_(rn - 1)->[(rn + 1),rn] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] +----------------PhysicalProject +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lag.cc_name) and (v1.i_brand = v1_lag.i_brand) and (v1.i_category = v1_lag.i_category) and (v1.rn = expr_(rn + 1))) otherCondition=() build RFs:RF3 i_category->[i_category];RF4 i_brand->[i_brand];RF5 cc_name->[cc_name];RF6 rn->[(rn + 1)] --------------------PhysicalProject -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 RF7 RF8 RF9 RF10 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 RF5 RF6 --------------------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000) and (v2.avg_monthly_sales > 0.0000) and (v2.d_year = 2001)) -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 -----------------PhysicalProject -------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query58.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query58.out index 5a44c1cc3d2ca6..f6830c5d3539ec 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query58.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query58.out @@ -11,26 +11,26 @@ PhysicalResultSink ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF12 i_item_sk->[ws_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 ws_item_sk->[i_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF11 RF12 +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 RF10 +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 -------------------------------------PhysicalAssertNumRows ---------------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date = '2001-06-16')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF13 +--------------------------------------filter((date_dim.d_date = '2001-06-16')) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] ------------PhysicalProject --------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject @@ -38,49 +38,49 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cs_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 +----------------------------PhysicalProject +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 RF5 +------------------------------------PhysicalAssertNumRows +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_date = '2001-06-16')) -------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------------------filter((date_dim.d_date = '2001-06-16')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 +----------------------------PhysicalProject +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 RF1 +------------------------------------PhysicalAssertNumRows +--------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 -----------------------------------------PhysicalAssertNumRows -------------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_date = '2001-06-16')) -------------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +------------------------------------------filter((date_dim.d_date = '2001-06-16')) +--------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query59.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query59.out index 262c37a4d1929d..c158995e25d561 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query59.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query59.out @@ -16,7 +16,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query6.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query6.out index 94dfbee3c5e2b2..bf5c172fd1c85c 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query6.out @@ -10,38 +10,38 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF5 i_category->[i_category] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF4 d_month_seq->[d_month_seq] +--------------------------PhysicalAssertNumRows +----------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------hashAgg[GLOBAL] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------hashAgg[LOCAL] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF1 d_month_seq->[d_month_seq] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 ---------------------------------------PhysicalAssertNumRows -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------------hashAgg[LOCAL] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) -----------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF0 i_category->[i_category] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 +------------------------------------------PhysicalProject +--------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF5 +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query60.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query60.out index f024124050e0f8..f8c9a0c54cd368 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query60.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query60.out @@ -61,9 +61,9 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF11 ca_address_sk->[ws_bill_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject @@ -71,13 +71,13 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 2000)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Jewelry')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((customer_address.ca_gmt_offset = -5.00)) ---------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Jewelry')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query61.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query61.out index 654f58923a6f2b..75d1b070942b37 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query61.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query61.out @@ -8,63 +8,63 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF10 c_current_addr_sk->[ca_address_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------filter((customer_address.ca_gmt_offset = -7.00)) -----------------------PhysicalOlapScan[customer_address] apply RFs: RF10 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF9 ss_customer_sk->[c_customer_sk] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] apply RFs: RF9 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[ss_promo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 p_promo_sk->[ss_promo_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 RF10 --------------------------------------PhysicalProject -----------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------filter((store.s_gmt_offset = -7.00)) +------------------------------------------PhysicalOlapScan[store] ----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] +------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) +--------------------------------------PhysicalOlapScan[promotion] ------------------------------PhysicalProject ---------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) -----------------------------------PhysicalOlapScan[promotion] +--------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((store.s_gmt_offset = -7.00)) -------------------------------PhysicalOlapScan[store] +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 +----------------------PhysicalProject +------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((item.i_category = 'Home')) +----------------------PhysicalOlapScan[item] --------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF4 s_store_sk->[ss_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 +----------------------------------PhysicalProject +------------------------------------filter((store.s_gmt_offset = -7.00)) +--------------------------------------PhysicalOlapScan[store] ------------------------------PhysicalProject --------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((item.i_category = 'Home')) -------------------------------PhysicalOlapScan[item] +----------------------------PhysicalOlapScan[customer] apply RFs: RF3 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF0 ---------------------------PhysicalProject -----------------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------------PhysicalOlapScan[customer_address] +------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------PhysicalOlapScan[customer_address] ------------------PhysicalProject ---------------------filter((store.s_gmt_offset = -7.00)) -----------------------PhysicalOlapScan[store] +--------------------filter((item.i_category = 'Home')) +----------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query62.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query62.out index 00e7e385d016fe..88d6665f1cc6a9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query62.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query62.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF2 sm_ship_mode_sk->[ws_ship_mode_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 ws_web_site_sk->[web_site_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[ws_warehouse_sk] +------------------------PhysicalOlapScan[web_site] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 ws_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1234) and (date_dim.d_month_seq >= 1223)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] -----------------------PhysicalProject -------------------------PhysicalOlapScan[ship_mode] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ------------------PhysicalProject ---------------------PhysicalOlapScan[web_site] +--------------------filter((date_dim.d_month_seq <= 1234) and (date_dim.d_month_seq >= 1223)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query63.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query63.out index bbbb80bc4b68e0..cbcb61715d30c1 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query63.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query63.out @@ -8,25 +8,24 @@ PhysicalResultSink ----------filter((if((avg_monthly_sales > 0.0000), (cast(abs((sum_sales - cast(avg_monthly_sales as DECIMALV3(38, 2)))) as DECIMALV3(38, 10)) / avg_monthly_sales), NULL) > 0.100000)) ------------PhysicalWindow --------------PhysicalQuickSort[LOCAL_SORT] -----------------PhysicalDistribute[DistributionSpecHash] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ---------------------------------------PhysicalProject -----------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) -------------------------------------------PhysicalOlapScan[item] -----------------------------------PhysicalProject -------------------------------------filter(d_month_seq IN (1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalProject +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter(d_month_seq IN (1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233)) +------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query65.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query65.out index b2612f6bffc539..2752814f9ca403 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query65.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query65.out @@ -7,29 +7,27 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[ss_store_sk] +----------------hashAgg[GLOBAL] +------------------PhysicalProject +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 +------------------------------PhysicalProject +--------------------------------filter((date_dim.d_month_seq <= 1187) and (date_dim.d_month_seq >= 1176)) +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashAgg[LOCAL] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1187) and (date_dim.d_month_seq >= 1176)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] apply RFs: RF4 +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] apply RFs: RF2 --------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF1 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF1 ------------------------hashAgg[GLOBAL] --------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------hashAgg[LOCAL] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query66.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query66.out index fb7a3400881984..333504222c2dd5 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query66.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query66.out @@ -14,18 +14,17 @@ PhysicalResultSink ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF3 w_warehouse_sk->[ws_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF3 sm_ship_mode_sk->[ws_ship_mode_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF2 t_time_sk->[ws_sold_time_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF0 sm_ship_mode_sk->[ws_ship_mode_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) -----------------------------------------------PhysicalOlapScan[ship_mode] +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -33,23 +32,23 @@ PhysicalResultSink ------------------------------------filter((time_dim.t_time <= 71770) and (time_dim.t_time >= 42970)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] +--------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) +----------------------------------PhysicalOlapScan[ship_mode] --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF7 w_warehouse_sk->[cs_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF7 sm_ship_mode_sk->[cs_ship_mode_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[cs_sold_time_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF4 sm_ship_mode_sk->[cs_ship_mode_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 cs_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF4 ------------------------------------------PhysicalProject ---------------------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) -----------------------------------------------PhysicalOlapScan[ship_mode] +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -57,5 +56,6 @@ PhysicalResultSink ------------------------------------filter((time_dim.t_time <= 71770) and (time_dim.t_time >= 42970)) --------------------------------------PhysicalOlapScan[time_dim] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] +--------------------------------filter(sm_carrier IN ('BOXBUNDLES', 'ORIENTAL')) +----------------------------------PhysicalOlapScan[ship_mode] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query67.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query67.out index 7913aec7a93a82..8ea2253f806b8c 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query67.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query67.out @@ -26,7 +26,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalTopN[LOCAL_SORT] ----------filter((dw2.rk <= 100)) ------------PhysicalWindow ---------------PhysicalPartitionTopN +--------------PhysicalQuickSort[LOCAL_SORT] ----------------PhysicalDistribute[DistributionSpecHash] ------------------PhysicalPartitionTopN --------------------PhysicalUnion diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query68.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query68.out index 158dde8b936afe..3d0f3596838ed8 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query68.out @@ -7,17 +7,13 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 c_current_addr_sk->[ca_address_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[customer_address] apply RFs: RF5 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 ss_customer_sk->[c_customer_sk] ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF4 +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 ----------------------------PhysicalProject @@ -27,7 +23,7 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1998, 1999, 2000)) --------------------------------------------PhysicalOlapScan[date_dim] @@ -37,4 +33,8 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------filter(OR[(household_demographics.hd_dep_count = 3),(household_demographics.hd_vehicle_count = 4)]) ------------------------------------PhysicalOlapScan[household_demographics] +--------------------PhysicalProject +----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF5 +----------------PhysicalProject +------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query69.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query69.out index 23e2e0cf0e4401..33a3fa8da5b1f5 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query69.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query69.out @@ -9,39 +9,39 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF7 c_customer_sk->[ss_customer_sk] +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 -------------------------PhysicalProject ---------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) -----------------------------PhysicalOlapScan[date_dim] ---------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[cs_ship_customer_sk] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 ---------------------------PhysicalProject -----------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) -------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 ---------------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) +--------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 ---------------------------------PhysicalProject -----------------------------------filter(ca_state IN ('IL', 'ME', 'TX')) -------------------------------------PhysicalOlapScan[customer_address] +------------------------------filter(ca_state IN ('IL', 'ME', 'TX')) +--------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[customer_demographics] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 +------------------------PhysicalProject +--------------------------filter((date_dim.d_moy <= 3) and (date_dim.d_moy >= 1) and (date_dim.d_year = 2002)) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query7.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query7.out index 2d63af9e61b19e..0ca8a686c2c672 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query7.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query7.out @@ -8,24 +8,24 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF2 p_promo_sk->[ss_promo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject --------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) ----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject ----------------------------filter((date_dim.d_year = 2001)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ---------------------------PhysicalOlapScan[promotion] ------------------PhysicalProject ---------------------PhysicalOlapScan[item] +--------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) +----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query70.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query70.out index ec1bdd0e99afb6..61b44edc112315 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query70.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query70.out @@ -23,22 +23,22 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((d1.d_month_seq <= 1231) and (d1.d_month_seq >= 1220)) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store] apply RFs: RF2 +--------------------------------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((store.s_state = tmp1.s_state)) otherCondition=() build RFs:RF2 s_state->[s_state] ----------------------------------PhysicalProject ------------------------------------hashAgg[GLOBAL] --------------------------------------PhysicalDistribute[DistributionSpecHash] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------------------------------PhysicalOlapScan[store] apply RFs: RF0 RF2 --------------------------------------------------PhysicalProject -----------------------------------------------------filter((date_dim.d_month_seq <= 1231) and (date_dim.d_month_seq >= 1220)) -------------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------------------------------------PhysicalProject -------------------------------------------------PhysicalOlapScan[store] +------------------------------------------------filter((date_dim.d_month_seq <= 1231) and (date_dim.d_month_seq >= 1220)) +--------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query71.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query71.out index 88a4aed8de2b2f..64cfdd80d11d39 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query71.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query71.out @@ -11,9 +11,9 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF2 t_time_sk->[cs_sold_time_sk,ss_sold_time_sk,ws_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ss_sold_date_sk,ws_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk,ss_item_sk,ws_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((tmp.sold_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ss_item_sk,ws_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk,ss_sold_date_sk,ws_sold_date_sk] ----------------------------PhysicalUnion ------------------------------PhysicalDistribute[DistributionSpecExecutionAny] --------------------------------PhysicalProject @@ -25,11 +25,11 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------------PhysicalProject -------------------------------filter((item.i_manager_id = 1)) ---------------------------------PhysicalOlapScan[item] +------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2002)) +--------------------------------PhysicalOlapScan[date_dim] ------------------------PhysicalProject ---------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2002)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter((item.i_manager_id = 1)) +----------------------------PhysicalOlapScan[item] --------------------PhysicalProject ----------------------filter(t_meal_time IN ('breakfast', 'dinner')) ------------------------PhysicalOlapScan[time_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query72.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query72.out index 722325c11a43cd..b67f5ebb924abf 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query72.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query72.out @@ -8,51 +8,47 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF10 w_warehouse_sk->[inv_warehouse_sk] +----------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() build RFs:RF10 cs_item_sk->[cr_item_sk];RF11 cs_order_number->[cr_order_number] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF8 d_date_sk->[inv_date_sk];RF9 cs_item_sk->[inv_item_sk] -----------------------PhysicalOlapScan[inventory] apply RFs: RF8 RF9 RF10 +--------------------PhysicalOlapScan[catalog_returns] apply RFs: RF10 RF11 +------------------PhysicalProject +--------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 cs_promo_sk->[p_promo_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[promotion] apply RFs: RF9 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((d3.d_date > days_add(d_date, INTERVAL 5 DAY))) build RFs:RF8 cs_ship_date_sk->[d_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq] +----------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq];RF7 inv_date_sk->[d_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() build RFs:RF4 cs_item_sk->[cr_item_sk];RF5 cs_order_number->[cr_order_number] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF4 RF5 +--------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 RF7 +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[cs_bill_hdemo_sk] --------------------------------------PhysicalProject ----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[cs_bill_hdemo_sk] +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] +----------------------------------------------PhysicalProject +------------------------------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk) and (catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk];RF1 d_date_sk->[cs_sold_date_sk] +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 RF7 +----------------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF1 --------------------------------------------------PhysicalProject -----------------------------------------------------NestedLoopJoin[INNER_JOIN](d3.d_date > days_add(d_date, INTERVAL 5 DAY)) +----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] +------------------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 ------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------------------------PhysicalProject ---------------------------------------------------------filter((d1.d_year = 1998)) -----------------------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 -----------------------------------------------PhysicalProject -------------------------------------------------filter((household_demographics.hd_buy_potential = '1001-5000')) ---------------------------------------------------PhysicalOlapScan[household_demographics] +--------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 ------------------------------------------PhysicalProject --------------------------------------------filter((customer_demographics.cd_marital_status = 'S')) ----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[promotion] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] -------------------PhysicalProject ---------------------PhysicalOlapScan[warehouse] - - - - group expression count exceeds memo_max_group_expression_size(10000) +----------------------------------------filter((household_demographics.hd_buy_potential = '1001-5000')) +------------------------------------------PhysicalOlapScan[household_demographics] +----------------------------------PhysicalProject +------------------------------------filter((d1.d_year = 1998)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query74.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query74.out index 3dad31da6fa660..3ef928879fadc9 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query74.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query74.out @@ -3,7 +3,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk,ws_bill_customer_sk] --------PhysicalUnion ----------PhysicalProject ------------hashAgg[GLOBAL] @@ -34,20 +34,20 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL) > if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL) > if((year_total > 0.00), (cast(year_total as DECIMALV3(13, 8)) / year_total), NULL))) build RFs:RF5 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 2000)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] -----------------PhysicalProject -------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) ---------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id,customer_id] +------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF3 customer_id->[customer_id] --------------------PhysicalProject -----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.00)) -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 +----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 2000)) +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 --------------------PhysicalProject -----------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.00)) -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------filter((t_s_firstyear.sale_type = 's') and (t_s_firstyear.year = 1999) and (t_s_firstyear.year_total > 0.00)) +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 +------------------PhysicalProject +--------------------filter((t_w_firstyear.sale_type = 'w') and (t_w_firstyear.year = 1999) and (t_w_firstyear.year_total > 0.00)) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query75.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query75.out index 8fcdeb91302f20..acf911ed5f6a2a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query75.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query75.out @@ -9,9 +9,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------PhysicalUnion --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF2 cs_order_number->[cr_order_number];RF3 cs_item_sk->[cr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------PhysicalProject @@ -24,48 +22,50 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------PhysicalProject --------------------------filter(d_year IN (2001, 2002)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------PhysicalProject ------------------------------filter((item.i_category = 'Sports')) --------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject --------------------------filter(d_year IN (2001, 2002)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_returns] --------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------PhysicalProject -------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF10 ws_order_number->[wr_order_number];RF11 ws_item_sk->[wr_item_sk] ---------------------PhysicalProject -----------------------PhysicalOlapScan[web_returns] apply RFs: RF10 RF11 +------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[ws_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ----------------------------PhysicalProject ------------------------------filter((item.i_category = 'Sports')) --------------------------------PhysicalOlapScan[item] ------------------------PhysicalProject --------------------------filter(d_year IN (2001, 2002)) ----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) build RFs:RF12 i_brand_id->[i_brand_id];RF13 i_class_id->[i_class_id];RF14 i_category_id->[i_category_id];RF15 i_manufact_id->[i_manufact_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((curr_yr.i_brand_id = prev_yr.i_brand_id) and (curr_yr.i_category_id = prev_yr.i_category_id) and (curr_yr.i_class_id = prev_yr.i_class_id) and (curr_yr.i_manufact_id = prev_yr.i_manufact_id)) otherCondition=(((cast(cast(sales_cnt as DECIMALV3(17, 2)) as DECIMALV3(23, 8)) / cast(sales_cnt as DECIMALV3(17, 2))) < 0.900000)) build RFs:RF6 i_brand_id->[i_brand_id];RF7 i_class_id->[i_class_id];RF8 i_category_id->[i_category_id];RF9 i_manufact_id->[i_manufact_id] --------------filter((curr_yr.d_year = 2002)) -----------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF12 RF13 RF14 RF15 +----------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 RF8 RF9 --------------filter((prev_yr.d_year = 2001)) ----------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query76.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query76.out index 13989b9aed9734..dbfa39f5d329bf 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query76.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query76.out @@ -12,27 +12,28 @@ PhysicalResultSink ------------------PhysicalUnion --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------------PhysicalProject ----------------------------filter(ss_customer_sk IS NULL) -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF3 +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ws_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ws_item_sk->[i_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF1 -------------------------PhysicalProject ---------------------------filter(ws_promo_sk IS NULL) -----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------filter(ws_promo_sk IS NULL) +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------filter(cs_bill_customer_sk IS NULL) -------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(cs_bill_customer_sk IS NULL) +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query77.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query77.out index 3659671c869dc8..ec751206cc4d7a 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query77.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query77.out @@ -10,38 +10,35 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalUnion ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[sr_store_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ss.s_store_sk = sr.s_store_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 sr_store_sk->[s_store_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store] apply RFs: RF1 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[sr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) +------------------------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------NestedLoopJoin[CROSS_JOIN] ------------------------PhysicalProject @@ -66,36 +63,33 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ----------------------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 wp_web_page_sk->[ws_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] -------------------------PhysicalProject ---------------------------hashAgg[GLOBAL] -----------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------hashAgg[LOCAL] ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wp_web_page_sk->[wr_web_page_sk] -------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 RF7 -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) ---------------------------------------------PhysicalOlapScan[date_dim] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_page] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------hashJoin[LEFT_OUTER_JOIN colocated] hashCondition=((ws.wp_web_page_sk = wr.wp_web_page_sk)) otherCondition=() +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF9 ws_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF9 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) +------------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF7 wr_web_page_sk->[wp_web_page_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[web_page] apply RFs: RF7 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[wr_returned_date_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalProject +----------------------------------------filter((date_dim.d_date <= '2000-09-09') and (date_dim.d_date >= '2000-08-10')) +------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query79.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query79.out index 605562961aa019..d307321fc9eeac 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query79.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query79.out @@ -5,15 +5,15 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject @@ -22,11 +22,11 @@ PhysicalResultSink ----------------------------------filter((date_dim.d_dow = 1) and d_year IN (2000, 2001, 2002)) ------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter(OR[(household_demographics.hd_dep_count = 7),(household_demographics.hd_vehicle_count > -1)]) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) +--------------------------------PhysicalOlapScan[store] ------------------------PhysicalProject ---------------------------filter((store.s_number_employees <= 295) and (store.s_number_employees >= 200)) -----------------------------PhysicalOlapScan[store] +--------------------------filter(OR[(household_demographics.hd_dep_count = 7),(household_demographics.hd_vehicle_count > -1)]) +----------------------------PhysicalOlapScan[household_demographics] ------------PhysicalProject --------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query8.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query8.out index 837e29a358bace..f7c11803029e94 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query8.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query8.out @@ -22,26 +22,22 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------PhysicalIntersect RFV2: RF3[ca_zip->substring(ca_zip, 1, 5)] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ---------------------------------PhysicalOlapScan[customer_address] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((cnt > 10)) ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((cnt > 10)) +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalProject ---------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalProject ---------------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) -----------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 +----------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query80.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query80.out index e33fb4f9e86ba9..f603805790626f 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query80.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query80.out @@ -15,86 +15,86 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF4 ss_item_sk->[sr_item_sk];RF5 ss_ticket_number->[sr_ticket_number] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF5 p_promo_sk->[ss_promo_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 RF5 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store] apply RFs: RF3 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF1 p_promo_sk->[ss_promo_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_item_sk->[sr_item_sk];RF1 ss_ticket_number->[sr_ticket_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 RF5 --------------------------------------------PhysicalProject -----------------------------------------------filter((promotion.p_channel_tv = 'N')) -------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_current_price > 50.00)) ---------------------------------------------PhysicalOlapScan[item] +----------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF11 cp_catalog_page_sk->[cs_catalog_page_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[cs_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF9 cs_item_sk->[cr_item_sk];RF10 cs_order_number->[cr_order_number] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF9 RF10 +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[cs_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF8 i_item_sk->[cs_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF9 cs_catalog_page_sk->[cp_catalog_page_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_page] apply RFs: RF9 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[cs_promo_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cs_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF6 cs_item_sk->[cr_item_sk];RF7 cs_order_number->[cr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 RF8 RF11 +--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 RF10 RF11 --------------------------------------------PhysicalProject -----------------------------------------------filter((promotion.p_channel_tv = 'N')) -------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_current_price > 50.00)) ---------------------------------------------PhysicalOlapScan[item] +----------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) +------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_page] +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF16 ws_item_sk->[wr_item_sk];RF17 ws_order_number->[wr_order_number] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF16 RF17 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF17 p_promo_sk->[ws_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 web_site_sk->[ws_web_site_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ws_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[ws_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 ws_web_site_sk->[web_site_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF13 p_promo_sk->[ws_promo_sk] +------------------------------------------PhysicalOlapScan[web_site] apply RFs: RF15 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_item_sk->[wr_item_sk];RF13 ws_order_number->[wr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 RF13 RF14 RF15 +--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF16 RF17 --------------------------------------------PhysicalProject -----------------------------------------------filter((promotion.p_channel_tv = 'N')) -------------------------------------------------PhysicalOlapScan[promotion] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_current_price > 50.00)) ---------------------------------------------PhysicalOlapScan[item] +----------------------------------------------filter((date_dim.d_date <= '2002-09-13') and (date_dim.d_date >= '2002-08-14')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[web_site] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] +--------------------------------PhysicalProject +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query81.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query81.out index 88c217db90e759..8bd4ebdfc0cc1c 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query81.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query81.out @@ -7,7 +7,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] --------------------PhysicalProject @@ -28,16 +28,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF4 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF3 +----------------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_last_name,customer.c_salutation,customer.c_first_name)] apply RFs: RF2 RF3 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 ----------------------PhysicalProject ------------------------filter((customer_address.ca_state = 'TN')) --------------------------PhysicalOlapScan[customer_address] ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query83.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query83.out index bb6216b2f45c7e..40e70a92c8ab2b 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query83.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query83.out @@ -5,65 +5,67 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF12 item_id->[i_item_id] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[wr_returned_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 wr_item_sk->[i_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +----------------------------PhysicalProject +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------PhysicalProject +----------------------------------filter(d_date IN ('2001-07-13', '2001-09-10', '2001-11-16')) +------------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[sr_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cr_returned_date_sk] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cr_item_sk->[i_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF7 ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF10 d_date_sk->[sr_returned_date_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF10 RF11 +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 ------------------------------------PhysicalProject ---------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -----------------------------------------PhysicalProject -------------------------------------------filter(d_date IN ('2001-07-13', '2001-09-10', '2001-11-16')) ---------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +--------------------------------------filter(d_date IN ('2001-07-13', '2001-09-10', '2001-11-16')) +----------------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cr_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[cr_returned_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 sr_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 -------------------------------------PhysicalProject ---------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 -----------------------------------------PhysicalProject -------------------------------------------filter(d_date IN ('2001-07-13', '2001-09-10', '2001-11-16')) ---------------------------------------------PhysicalOlapScan[date_dim] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] apply RFs: RF13 -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[wr_item_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[wr_returned_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 RF3 +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 ----------------------------PhysicalProject ------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------PhysicalProject @@ -75,6 +77,4 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter(d_date IN ('2001-07-13', '2001-09-10', '2001-11-16')) ----------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query84.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query84.out index 46602027cd3688..588639a30ce84f 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query84.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query84.out @@ -9,23 +9,23 @@ PhysicalResultSink ------------PhysicalProject --------------PhysicalOlapScan[store_returns] apply RFs: RF4 ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF3 c_current_cdemo_sk->[cd_demo_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF3 ib_income_band_sk->[hd_income_band_sk] ----------------PhysicalProject -------------------PhysicalOlapScan[customer_demographics] apply RFs: RF3 -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 c_current_hdemo_sk->[hd_demo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 -------------------------PhysicalProject ---------------------------filter((customer_address.ca_city = 'Woodland')) -----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalOlapScan[household_demographics] apply RFs: RF2 RF3 --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF0 ib_income_band_sk->[hd_income_band_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[household_demographics] apply RFs: RF0 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_city = 'Woodland')) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((income_band.ib_lower_bound >= 60306) and (income_band.ib_upper_bound <= 110306)) -----------------------------PhysicalOlapScan[income_band] +--------------------------PhysicalOlapScan[customer_demographics] +----------------PhysicalProject +------------------filter((income_band.ib_lower_bound >= 60306) and (income_band.ib_upper_bound <= 110306)) +--------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query85.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query85.out index 02eea508279b3b..cb40603e4d78ed 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query85.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query85.out @@ -11,36 +11,36 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((reason.r_reason_sk = web_returns.wr_reason_sk)) otherCondition=() build RFs:RF9 r_reason_sk->[wr_reason_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF6 wr_returning_cdemo_sk->[cd_demo_sk];RF7 cd_marital_status->[cd_marital_status];RF8 cd_education_status->[cd_education_status] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------filter(cd_education_status IN ('Advanced Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'S', 'U')) -----------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF6 RF7 RF8 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('IA', 'NC', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('GA', 'WI', 'WV'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('KY', 'OK', 'VA'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF7 ca_address_sk->[wr_refunded_addr_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = web_returns.wr_refunded_addr_sk)) otherCondition=(OR[AND[ca_state IN ('IA', 'NC', 'TX'),(web_sales.ws_net_profit >= 100.00),(web_sales.ws_net_profit <= 200.00)],AND[ca_state IN ('GA', 'WI', 'WV'),(web_sales.ws_net_profit >= 150.00)],AND[ca_state IN ('KY', 'OK', 'VA'),(web_sales.ws_net_profit <= 250.00)]]) build RFs:RF4 wr_refunded_addr_sk->[ca_address_sk] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('GA', 'IA', 'KY', 'NC', 'OK', 'TX', 'VA', 'WI', 'WV')) -------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_education_status = cd2.cd_education_status) and (cd1.cd_marital_status = cd2.cd_marital_status) and (cd2.cd_demo_sk = web_returns.wr_returning_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[wr_returning_cdemo_sk];RF5 cd_marital_status->[cd_marital_status];RF6 cd_education_status->[cd_education_status] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'D'),(cd1.cd_education_status = 'Primary'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'College'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'U'),(cd1.cd_education_status = 'Advanced Degree'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF3 cd_demo_sk->[wr_refunded_cdemo_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF1 ws_item_sk->[wr_item_sk];RF2 ws_order_number->[wr_order_number] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 ws_web_page_sk->[wp_web_page_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 RF2 RF3 RF9 +------------------------------------------PhysicalOlapScan[web_page] apply RFs: RF2 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject -----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) -------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF5 +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 RF3 RF4 RF7 RF9 --------------------------------------------PhysicalProject -----------------------------------------------filter((date_dim.d_year = 1998)) -------------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'D'),(cd1.cd_education_status = 'Primary')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'College')],AND[(cd1.cd_marital_status = 'U'),(cd1.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'S', 'U')) -----------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 +--------------------------------PhysicalProject +----------------------------------filter(cd_education_status IN ('Advanced Degree', 'College', 'Primary') and cd_marital_status IN ('D', 'S', 'U')) +------------------------------------PhysicalOlapScan[customer_demographics] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_page] +------------------------------filter((customer_address.ca_country = 'United States') and ca_state IN ('GA', 'IA', 'KY', 'NC', 'OK', 'TX', 'VA', 'WI', 'WV')) +--------------------------------PhysicalOlapScan[customer_address] +------------------------PhysicalProject +--------------------------filter((date_dim.d_year = 1998)) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject ----------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query87.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query87.out index 9f5547c4459a45..fb0c3aabfeab87 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query87.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query87.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalExcept +----------PhysicalExcept RFV2: RF6[c_last_name->c_last_name] RF7[c_last_name->c_last_name] ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] @@ -33,7 +33,7 @@ PhysicalResultSink ----------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) ------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[customer] RFV2: RF6 ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] @@ -47,5 +47,5 @@ PhysicalResultSink ----------------------------filter((date_dim.d_month_seq <= 1213) and (date_dim.d_month_seq >= 1202)) ------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query88.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query88.out index 5da04ad61d3f42..655d55187bcb75 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query88.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query88.out @@ -14,17 +14,17 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF23 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF22 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF22 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF21 t_time_sk->[ss_sold_time_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF21 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF21 RF22 RF23 ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) ---------------------------------------PhysicalOlapScan[time_dim] +------------------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) +--------------------------------------PhysicalOlapScan[household_demographics] ------------------------------PhysicalProject ---------------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) -----------------------------------PhysicalOlapScan[household_demographics] +--------------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] @@ -34,17 +34,17 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF20 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF19 hd_demo_sk->[ss_hdemo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF19 t_time_sk->[ss_sold_time_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF18 t_time_sk->[ss_sold_time_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF18 hd_demo_sk->[ss_hdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF18 RF19 RF20 ----------------------------------PhysicalProject -------------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) ---------------------------------------PhysicalOlapScan[time_dim] +------------------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) +--------------------------------------PhysicalOlapScan[household_demographics] ------------------------------PhysicalProject ---------------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) -----------------------------------PhysicalOlapScan[household_demographics] +--------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute < 30)) +----------------------------------PhysicalOlapScan[time_dim] --------------------------PhysicalProject ----------------------------filter((store.s_store_name = 'ese')) ------------------------------PhysicalOlapScan[store] @@ -54,17 +54,17 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF17 s_store_sk->[ss_store_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF16 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF16 t_time_sk->[ss_sold_time_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF15 t_time_sk->[ss_sold_time_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF15 hd_demo_sk->[ss_hdemo_sk] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF15 RF16 RF17 --------------------------------PhysicalProject -----------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) -------------------------------------PhysicalOlapScan[time_dim] +----------------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) +------------------------------------PhysicalOlapScan[household_demographics] ----------------------------PhysicalProject -------------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) ---------------------------------PhysicalOlapScan[household_demographics] +------------------------------filter((time_dim.t_hour = 9) and (time_dim.t_minute >= 30)) +--------------------------------PhysicalOlapScan[time_dim] ------------------------PhysicalProject --------------------------filter((store.s_store_name = 'ese')) ----------------------------PhysicalOlapScan[store] @@ -74,17 +74,17 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF14 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF13 hd_demo_sk->[ss_hdemo_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF13 t_time_sk->[ss_sold_time_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF12 t_time_sk->[ss_sold_time_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF12 hd_demo_sk->[ss_hdemo_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[store_sales] apply RFs: RF12 RF13 RF14 ------------------------------PhysicalProject ---------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) -----------------------------------PhysicalOlapScan[time_dim] +--------------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) +----------------------------------PhysicalOlapScan[household_demographics] --------------------------PhysicalProject -----------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) -------------------------------PhysicalOlapScan[household_demographics] +----------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute < 30)) +------------------------------PhysicalOlapScan[time_dim] ----------------------PhysicalProject ------------------------filter((store.s_store_name = 'ese')) --------------------------PhysicalOlapScan[store] @@ -94,17 +94,17 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF11 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF10 hd_demo_sk->[ss_hdemo_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF10 t_time_sk->[ss_sold_time_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF9 t_time_sk->[ss_sold_time_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF9 hd_demo_sk->[ss_hdemo_sk] ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[store_sales] apply RFs: RF9 RF10 RF11 ----------------------------PhysicalProject -------------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) ---------------------------------PhysicalOlapScan[time_dim] +------------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) +--------------------------------PhysicalOlapScan[household_demographics] ------------------------PhysicalProject ---------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) -----------------------------PhysicalOlapScan[household_demographics] +--------------------------filter((time_dim.t_hour = 10) and (time_dim.t_minute >= 30)) +----------------------------PhysicalOlapScan[time_dim] --------------------PhysicalProject ----------------------filter((store.s_store_name = 'ese')) ------------------------PhysicalOlapScan[store] @@ -114,17 +114,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF8 s_store_sk->[ss_store_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF7 hd_demo_sk->[ss_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF7 t_time_sk->[ss_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF6 t_time_sk->[ss_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF6 hd_demo_sk->[ss_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute < 30)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((store.s_store_name = 'ese')) ----------------------PhysicalOlapScan[store] @@ -134,17 +134,17 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ss_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 RF5 ------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) +----------------------------PhysicalOlapScan[household_demographics] --------------------PhysicalProject -----------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) -------------------------PhysicalOlapScan[household_demographics] +----------------------filter((time_dim.t_hour = 11) and (time_dim.t_minute >= 30)) +------------------------PhysicalOlapScan[time_dim] ----------------PhysicalProject ------------------filter((store.s_store_name = 'ese')) --------------------PhysicalOlapScan[store] @@ -154,17 +154,17 @@ PhysicalResultSink ----------PhysicalProject ------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ss_sold_time_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ss_hdemo_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ----------------------PhysicalProject -------------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) ---------------------------PhysicalOlapScan[time_dim] +------------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) +--------------------------PhysicalOlapScan[household_demographics] ------------------PhysicalProject ---------------------filter((household_demographics.hd_vehicle_count <= 5) and OR[AND[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count <= 2)],AND[(household_demographics.hd_dep_count = -1),(household_demographics.hd_vehicle_count <= 1)],(household_demographics.hd_dep_count = 3)] and hd_dep_count IN (-1, 0, 3)) -----------------------PhysicalOlapScan[household_demographics] +--------------------filter((time_dim.t_hour = 12) and (time_dim.t_minute < 30)) +----------------------PhysicalOlapScan[time_dim] --------------PhysicalProject ----------------filter((store.s_store_name = 'ese')) ------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query9.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query9.out index 06cd8f92785e08..f159ed97647895 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query9.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query9.out @@ -1,8 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !ds_shape_9 -- PhysicalResultSink ---PhysicalDistribute[DistributionSpecGather] -----PhysicalProject +--PhysicalProject +----NestedLoopJoin[CROSS_JOIN] ------NestedLoopJoin[CROSS_JOIN] --------NestedLoopJoin[CROSS_JOIN] ----------NestedLoopJoin[CROSS_JOIN] @@ -16,24 +16,17 @@ PhysicalResultSink --------------------------NestedLoopJoin[CROSS_JOIN] ----------------------------NestedLoopJoin[CROSS_JOIN] ------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------NestedLoopJoin[CROSS_JOIN] -----------------------------------PhysicalProject -------------------------------------NestedLoopJoin[CROSS_JOIN] ---------------------------------------PhysicalProject -----------------------------------------filter((reason.r_reason_sk = 1)) -------------------------------------------PhysicalOlapScan[reason] ---------------------------------------hashAgg[GLOBAL] -----------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------hashAgg[LOCAL] ---------------------------------------------PhysicalProject -----------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) -------------------------------------------------PhysicalOlapScan[store_sales] -----------------------------------hashAgg[GLOBAL] -------------------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------------------hashAgg[LOCAL] -----------------------------------------PhysicalProject -------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ---------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------PhysicalProject +----------------------------------NestedLoopJoin[CROSS_JOIN] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecGather] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) +----------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------PhysicalProject +--------------------------------------filter((reason.r_reason_sk = 1)) +----------------------------------------PhysicalOlapScan[reason] --------------------------------hashAgg[GLOBAL] ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] @@ -44,7 +37,7 @@ PhysicalResultSink --------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------hashAgg[LOCAL] ------------------------------------PhysicalProject ---------------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) +--------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------PhysicalOlapScan[store_sales] ----------------------------hashAgg[GLOBAL] ------------------------------PhysicalDistribute[DistributionSpecGather] @@ -62,7 +55,7 @@ PhysicalResultSink --------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------hashAgg[LOCAL] ------------------------------PhysicalProject ---------------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) +--------------------------------filter((store_sales.ss_quantity <= 40) and (store_sales.ss_quantity >= 21)) ----------------------------------PhysicalOlapScan[store_sales] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecGather] @@ -80,7 +73,7 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecGather] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) +--------------------------filter((store_sales.ss_quantity <= 60) and (store_sales.ss_quantity >= 41)) ----------------------------PhysicalOlapScan[store_sales] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecGather] @@ -98,7 +91,7 @@ PhysicalResultSink --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +--------------------filter((store_sales.ss_quantity <= 80) and (store_sales.ss_quantity >= 61)) ----------------------PhysicalOlapScan[store_sales] ----------hashAgg[GLOBAL] ------------PhysicalDistribute[DistributionSpecGather] @@ -112,4 +105,10 @@ PhysicalResultSink --------------PhysicalProject ----------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) ------------------PhysicalOlapScan[store_sales] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecGather] +----------hashAgg[LOCAL] +------------PhysicalProject +--------------filter((store_sales.ss_quantity <= 100) and (store_sales.ss_quantity >= 81)) +----------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query90.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query90.out index e5f91ba2a61448..a6386fa6fe3dd7 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query90.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query90.out @@ -10,17 +10,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF5 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[ws_ship_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF4 t_time_sk->[ws_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF3 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF3 hd_demo_sk->[ws_ship_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_dep_count = 6)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 6)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour <= 13) and (time_dim.t_hour >= 12)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------PhysicalOlapScan[web_page] @@ -30,17 +30,17 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ws_ship_hdemo_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ws_sold_time_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ws_sold_time_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ws_ship_hdemo_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 --------------------------PhysicalProject -----------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) -------------------------------PhysicalOlapScan[time_dim] +----------------------------filter((household_demographics.hd_dep_count = 6)) +------------------------------PhysicalOlapScan[household_demographics] ----------------------PhysicalProject -------------------------filter((household_demographics.hd_dep_count = 6)) ---------------------------PhysicalOlapScan[household_demographics] +------------------------filter((time_dim.t_hour <= 15) and (time_dim.t_hour >= 14)) +--------------------------PhysicalOlapScan[time_dim] ------------------PhysicalProject --------------------filter((web_page.wp_char_count <= 5200) and (web_page.wp_char_count >= 5000)) ----------------------PhysicalOlapScan[web_page] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query91.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query91.out index 25542328573fbd..f66eb35fb1f129 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query91.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query91.out @@ -9,33 +9,33 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF5 cc_call_center_sk->[cr_call_center_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF5 hd_demo_sk->[c_current_hdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cr_returned_date_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF4 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cr_returning_customer_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 RF5 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF2 c_current_addr_sk->[ca_address_sk] ---------------------------------PhysicalProject -----------------------------------filter((customer_address.ca_gmt_offset = -7.00)) -------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF2 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cr_returning_customer_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[c_current_hdemo_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[c_current_cdemo_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cr_call_center_sk->[cc_call_center_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 +------------------------------------------PhysicalOlapScan[call_center] apply RFs: RF0 ----------------------------------------PhysicalProject -------------------------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'Unknown') and cd_marital_status IN ('M', 'W')) ---------------------------------------------PhysicalOlapScan[customer_demographics] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------filter((hd_buy_potential like 'Unknown%')) -----------------------------------------PhysicalOlapScan[household_demographics] +--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 +----------------------------PhysicalProject +------------------------------filter((customer_address.ca_gmt_offset = -7.00)) +--------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject ---------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -----------------------------PhysicalOlapScan[date_dim] +--------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'Advanced Degree')]] and cd_education_status IN ('Advanced Degree', 'Unknown') and cd_marital_status IN ('M', 'W')) +----------------------------PhysicalOlapScan[customer_demographics] --------------------PhysicalProject -----------------------PhysicalOlapScan[call_center] +----------------------filter((hd_buy_potential like 'Unknown%')) +------------------------PhysicalOlapScan[household_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query93.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query93.out index 5f2b776e674990..64f23109762e92 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query93.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query93.out @@ -8,14 +8,14 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN colocated] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF2 r_reason_sk->[sr_reason_sk] ------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF0 r_reason_sk->[sr_reason_sk] +--------------------hashJoin[INNER_JOIN colocated] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF0 sr_item_sk->[ss_item_sk];RF1 sr_ticket_number->[ss_ticket_number] ----------------------PhysicalProject -------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 +------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject -------------------------filter((reason.r_reason_desc = 'reason 58')) ---------------------------PhysicalOlapScan[reason] +------------------------PhysicalOlapScan[store_returns] apply RFs: RF2 +------------------PhysicalProject +--------------------filter((reason.r_reason_desc = 'reason 58')) +----------------------PhysicalOlapScan[reason] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query94.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query94.out index bd89dd58effa9b..1d74700f0bf4fa 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query94.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query94.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk] ----------------PhysicalProject -------------------hashJoin[RIGHT_SEMI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF4 ws_order_number->[ws_order_number] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk] --------------------PhysicalProject -----------------------PhysicalOlapScan[web_sales] apply RFs: RF4 ---------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF3 ws_order_number->[wr_order_number] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_returns] apply RFs: RF3 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_ship_date_sk] +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ws_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'OK')) ---------------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '2002-06-30') and (date_dim.d_date >= '2002-05-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'OK')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((web_site.web_company_name = 'pri')) +--------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query95.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query95.out index 84bdd6cf3d8f4a..c295e9d1ccbd38 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query95.out @@ -3,42 +3,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales] apply RFs: RF0 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales] --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] ---------hashAgg[DISTINCT_GLOBAL] +--------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 ws_order_number->[wr_order_number,ws_order_number] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 wr_order_number->[ws_order_number] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 ---------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 ws_order_number->[ws_order_number,ws_order_number] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------hashAgg[GLOBAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF3 web_site_sk->[ws_web_site_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 -----------------------------------PhysicalProject -------------------------------------filter((customer_address.ca_state = 'VA')) ---------------------------------------PhysicalOlapScan[customer_address] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk] +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF3 wr_order_number->[ws_order_number,ws_order_number] +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[ws_order_number] +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) -----------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 RF6 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] +----------------------------filter((date_dim.d_date <= '2001-05-31') and (date_dim.d_date >= '2001-04-01')) +------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------filter((customer_address.ca_state = 'VA')) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((web_site.web_company_name = 'pri')) +----------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query96.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query96.out index 7e3d08cf2617a5..aadb08a88cde03 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query96.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query96.out @@ -9,17 +9,17 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF1 hd_demo_sk->[ss_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF1 t_time_sk->[ss_sold_time_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_time_sk = time_dim.t_time_sk)) otherCondition=() build RFs:RF0 t_time_sk->[ss_sold_time_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF0 hd_demo_sk->[ss_hdemo_sk] ------------------------PhysicalProject --------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ------------------------PhysicalProject ---------------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) -----------------------------PhysicalOlapScan[time_dim] +--------------------------filter((household_demographics.hd_dep_count = 0)) +----------------------------PhysicalOlapScan[household_demographics] --------------------PhysicalProject -----------------------filter((household_demographics.hd_dep_count = 0)) -------------------------PhysicalOlapScan[household_demographics] +----------------------filter((time_dim.t_hour = 8) and (time_dim.t_minute >= 30)) +------------------------PhysicalOlapScan[time_dim] ----------------PhysicalProject ------------------filter((store.s_store_name = 'ese')) --------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query98.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query98.out index beb47b1d23d9dd..e93238da736079 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query98.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query98.out @@ -7,20 +7,19 @@ PhysicalResultSink --------PhysicalProject ----------PhysicalWindow ------------PhysicalQuickSort[LOCAL_SORT] ---------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 -------------------------------PhysicalProject ---------------------------------filter((date_dim.d_date <= '1999-03-07') and (date_dim.d_date >= '1999-02-05')) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------filter(i_category IN ('Jewelry', 'Men', 'Sports')) -------------------------------PhysicalOlapScan[item] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter(i_category IN ('Jewelry', 'Men', 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '1999-03-07') and (date_dim.d_date >= '1999-02-05')) +----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf1000/shape/query99.out b/regression-test/data/shape_check/tpcds_sf1000/shape/query99.out index de639b9015342e..f8e8c2c455ef9b 100644 --- a/regression-test/data/shape_check/tpcds_sf1000/shape/query99.out +++ b/regression-test/data/shape_check/tpcds_sf1000/shape/query99.out @@ -8,22 +8,22 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF2 sm_ship_mode_sk->[cs_ship_mode_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cs_call_center_sk->[cc_call_center_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[cs_warehouse_sk] +------------------------PhysicalOlapScan[call_center] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 cs_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_ship_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 cs_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) -----------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] -----------------------PhysicalProject -------------------------PhysicalOlapScan[ship_mode] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject ---------------------PhysicalOlapScan[call_center] +--------------------filter((date_dim.d_month_seq <= 1205) and (date_dim.d_month_seq >= 1194)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query1.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query1.out index 25c947e5fbd5c3..44f54a4d9a5d94 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query1.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query1.out @@ -18,20 +18,18 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk,s_store_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_store_sk = ctr2.ctr_store_sk)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_store_sk->[ctr_store_sk] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ctr_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ctr_customer_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 RF3 -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +--------------------PhysicalOlapScan[customer] apply RFs: RF2 ------------------PhysicalProject ---------------------filter((store.s_state = 'NM')) -----------------------PhysicalOlapScan[store] apply RFs: RF3 ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalDistribute[DistributionSpecExecutionAny] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store.s_store_sk = ctr1.ctr_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ctr_store_sk] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 +----------------------PhysicalProject +------------------------filter((store.s_state = 'NM')) +--------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query10.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query10.out index 43aef07e0be2c0..1e98edb8414e22 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query10.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query10.out @@ -10,12 +10,12 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] @@ -27,16 +27,16 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 --------------------------------PhysicalProject -----------------------------------filter(ca_county IN ('Bonneville County', 'Boone County', 'Brown County', 'Fillmore County', 'McPherson County')) -------------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2000)) ---------------------------------PhysicalOlapScan[date_dim] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy <= 6) and (date_dim.d_moy >= 3) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalProject +--------------------------------filter(ca_county IN ('Bonneville County', 'Boone County', 'Brown County', 'Fillmore County', 'McPherson County')) +----------------------------------PhysicalOlapScan[customer_address] +--------------------------PhysicalOlapScan[customer_demographics] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query11.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query11.out index 82db2123eb155c..36e01c3016316f 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query11.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query11.out @@ -10,11 +10,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF0 ss_customer_sk->[c_customer_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------PhysicalOlapScan[customer] apply RFs: RF0 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ------------------PhysicalProject --------------------filter(d_year IN (1999, 2000)) ----------------------PhysicalOlapScan[date_dim] @@ -25,11 +25,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 ws_bill_customer_sk->[c_customer_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +------------------------PhysicalOlapScan[customer] apply RFs: RF2 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter(d_year IN (1999, 2000)) ----------------------PhysicalOlapScan[date_dim] @@ -38,12 +38,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF6 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), 0.000000))) build RFs:RF6 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query13.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query13.out index 6a2c7fe65f73d4..9f19b94a300d8c 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query13.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query13.out @@ -13,12 +13,12 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ----------------------------PhysicalProject -------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +------------------------------PhysicalOlapScan[store] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[store] +------------------------------filter((store_sales.ss_net_profit <= 300.00) and (store_sales.ss_net_profit >= 50.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 ------------------------PhysicalProject --------------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary')],AND[(customer_demographics.cd_marital_status = 'U'),(customer_demographics.cd_education_status = 'Secondary')]] and cd_education_status IN ('College', 'Primary', 'Secondary') and cd_marital_status IN ('D', 'U', 'W')) ----------------------------PhysicalOlapScan[customer_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query14.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query14.out index aead55a28782d2..794e2803764cf6 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query14.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query14.out @@ -3,52 +3,46 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 i_brand_id->[i_brand_id,i_brand_id,i_brand_id];RF7 i_class_id->[i_class_id,i_class_id,i_class_id];RF8 i_category_id->[i_category_id,i_category_id,i_category_id] ---------PhysicalIntersect -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_brand_id = t.brand_id) and (item.i_category_id = t.category_id) and (item.i_class_id = t.class_id)) otherCondition=() build RFs:RF6 brand_id->[i_brand_id];RF7 class_id->[i_class_id];RF8 category_id->[i_category_id] +--------PhysicalProject +----------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +--------PhysicalIntersect RFV2: RF19[brand_id->i_brand_id] RF20[brand_id->i_brand_id] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +----------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------PhysicalProject -----------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------PhysicalProject +------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = ics.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +----------------------PhysicalOlapScan[item] apply RFs: RF2 RFV2: RF19 --------------------PhysicalProject -----------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] +----------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +------------------filter((d2.d_year <= 2002) and (d2.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] +----------PhysicalDistribute[DistributionSpecHash] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = iws.i_item_sk)) otherCondition=() build RFs:RF4 ws_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = iss.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[item] apply RFs: RF6 RF7 RF8 +----------------------PhysicalOlapScan[item] apply RFs: RF4 RFV2: RF20 --------------------PhysicalProject -----------------------filter((d1.d_year <= 2002) and (d1.d_year >= 2000)) -------------------------PhysicalOlapScan[date_dim] ---------PhysicalProject -----------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[web_sales] apply RFs: RF5 +----------------PhysicalProject +------------------filter((d3.d_year <= 2002) and (d3.d_year >= 2000)) +--------------------PhysicalOlapScan[date_dim] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------hashAgg[GLOBAL] @@ -84,8 +78,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ss_item_sk,ss_item_sk] -------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF10 ss_item_sk->[ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ss_item_sk,ss_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF10 ss_item_sk->[ss_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 RF12 --------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF11 @@ -106,8 +100,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF15 d_date_sk->[cs_sold_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[cs_item_sk,ss_item_sk] -------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF13 ss_item_sk->[cs_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF14 i_item_sk->[cs_item_sk,ss_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF13 ss_item_sk->[cs_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF13 RF14 RF15 --------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF14 @@ -128,8 +122,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF18 d_date_sk->[ws_sold_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF17 i_item_sk->[ss_item_sk,ws_item_sk] -------------------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ss_item_sk->[ws_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF17 i_item_sk->[ss_item_sk,ws_item_sk] +------------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = cross_items.ss_item_sk)) otherCondition=() build RFs:RF16 ss_item_sk->[ws_item_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF16 RF17 RF18 --------------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF17 diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query15.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query15.out index 828af0129d7187..6fe6b64b1b0ffe 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query15.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query15.out @@ -10,15 +10,15 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF1 ca_address_sk->[c_current_addr_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(OR[substring(ca_zip, 1, 5) IN ('80348', '81792', '83405', '85392', '85460', '85669', '86197', '86475', '88274'),ca_state IN ('CA', 'GA', 'WA'),(catalog_sales.cs_sales_price > 500.00)]) build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cs_bill_customer_sk] +------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 cs_bill_customer_sk->[c_customer_sk] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF1 -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject --------------------filter((date_dim.d_qoy = 2) and (date_dim.d_year = 1998)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query16.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query16.out index ff30193149f0de..4629e9f8d97488 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query16.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query16.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF4 cc_call_center_sk->[cs_call_center_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF3 cc_call_center_sk->[cs_call_center_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[cs_ship_addr_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[cs_ship_addr_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_ship_date_sk] -----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs1.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((cs1.cs_order_number = cr1.cr_order_number)) otherCondition=() build RFs:RF1 cs_order_number->[cr_order_number] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((cs1.cs_order_number = cs2.cs_order_number)) otherCondition=(( not (cs_warehouse_sk = cs_warehouse_sk))) build RFs:RF0 cs_order_number->[cs_order_number] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_date <= '1999-05-31') and (date_dim.d_date >= '1999-04-01')) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 RF4 ------------------------PhysicalProject ---------------------------filter((customer_address.ca_state = 'IL')) -----------------------------PhysicalOlapScan[customer_address] +--------------------------filter((date_dim.d_date <= '1999-05-31') and (date_dim.d_date >= '1999-04-01')) +----------------------------PhysicalOlapScan[date_dim] --------------------PhysicalProject -----------------------filter(cc_county IN ('Bronx County', 'Maverick County', 'Mesa County', 'Raleigh County', 'Richland County')) -------------------------PhysicalOlapScan[call_center] +----------------------filter((customer_address.ca_state = 'IL')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter(cc_county IN ('Bronx County', 'Maverick County', 'Mesa County', 'Raleigh County', 'Richland County')) +--------------------PhysicalOlapScan[call_center] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query17.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query17.out index e0b281146ad099..3ae687663326f2 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query17.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query17.out @@ -9,36 +9,36 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +----------------------PhysicalOlapScan[item] apply RFs: RF9 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF8 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 RF5 RF6 RF9 +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF5 RF7 -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +----------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((d1.d_quarter_name = '2000Q1')) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((d1.d_quarter_name = '2000Q1')) +----------------------------------filter(d_quarter_name IN ('2000Q1', '2000Q2', '2000Q3')) ------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject ------------------------------filter(d_quarter_name IN ('2000Q1', '2000Q2', '2000Q3')) --------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------filter(d_quarter_name IN ('2000Q1', '2000Q2', '2000Q3')) -----------------------------PhysicalOlapScan[date_dim] ---------------------PhysicalProject -----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query18.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query18.out index a3b95e5515ecde..51ae39b4cae2b4 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query18.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query18.out @@ -10,33 +10,33 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[cs_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[cs_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF2 cd_demo_sk->[cs_bill_cdemo_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF2 c_current_cdemo_sk->[cd_demo_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_cdemo_sk = cd2.cd_demo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[c_current_cdemo_sk] +------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF2 +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cs_bill_customer_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cs_bill_customer_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = cd1.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 RF4 RF5 +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF4 RF5 ------------------------------------------PhysicalProject ---------------------------------------------filter(c_birth_month IN (1, 4, 5, 7, 8, 9)) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 RF3 +--------------------------------------------filter((cd1.cd_education_status = 'Unknown') and (cd1.cd_gender = 'M')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[customer_demographics] -----------------------------------PhysicalProject -------------------------------------filter((cd1.cd_education_status = 'Unknown') and (cd1.cd_gender = 'M')) ---------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------filter(c_birth_month IN (1, 4, 5, 7, 8, 9)) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 ------------------------------PhysicalProject --------------------------------filter(ca_state IN ('AL', 'AR', 'GA', 'MS', 'NC', 'TX', 'WV')) ----------------------------------PhysicalOlapScan[customer_address] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter((date_dim.d_year = 2002)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_year = 2002)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query19.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query19.out index 6a9401f72ec7f3..128ee3ec8f9dbe 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query19.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query19.out @@ -11,25 +11,25 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=(( not (substring(ca_zip, 1, 5) = substring(s_zip, 1, 5)))) build RFs:RF4 s_store_sk->[ss_store_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 RF3 RF4 +--------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] +----------------------------------filter((item.i_manager_id = 16)) +------------------------------------PhysicalOlapScan[item] ----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 1998)) ---------------------------------PhysicalOlapScan[date_dim] +------------------------------PhysicalOlapScan[customer] apply RFs: RF3 ------------------------PhysicalProject ---------------------------filter((item.i_manager_id = 16)) -----------------------------PhysicalOlapScan[item] +--------------------------PhysicalOlapScan[customer_address] --------------------PhysicalProject ----------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query2.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query2.out index 0ffcc732cad1c0..41fb77a9a43774 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query2.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query2.out @@ -21,19 +21,19 @@ PhysicalCteAnchor ( cteId=CTEId#1 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 53))) otherCondition=() --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 53))) otherCondition=() -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] -----------------------PhysicalProject -------------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF1 -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 1998)) ---------------------------PhysicalOlapScan[date_dim] +----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] ------------------PhysicalProject --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF2 +------------------PhysicalProject +--------------------filter((date_dim.d_year = 1998)) +----------------------PhysicalOlapScan[date_dim] --------------PhysicalProject -----------------filter((date_dim.d_year = 1999)) -------------------PhysicalOlapScan[date_dim] +----------------hashJoin[INNER_JOIN shuffle] hashCondition=((date_dim.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF1 d_week_seq->[d_week_seq] +------------------PhysicalProject +--------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF1 +------------------PhysicalProject +--------------------filter((date_dim.d_year = 1999)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query21.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query21.out index 31448491385145..440660a02de026 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query21.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query21.out @@ -13,10 +13,10 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = inventory.inv_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[inv_warehouse_sk] -----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 inv_warehouse_sk->[w_warehouse_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[warehouse] +------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 +----------------------------PhysicalOlapScan[inventory] apply RFs: RF1 RF2 ------------------------PhysicalProject --------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) ----------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query22.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query22.out index 9a0efd7d83bee7..7d94a1781b2e94 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query22.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query22.out @@ -10,14 +10,14 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[inv_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[inv_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[inv_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query23.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query23.out index 22ad85973bd63a..abccd352d6295c 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query23.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query23.out @@ -8,45 +8,49 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ss_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject -------------------------PhysicalOlapScan[item] +------------------------filter(d_year IN (2000, 2001, 2002, 2003)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter(d_year IN (2000, 2001, 2002, 2003)) -----------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[item] --PhysicalCteAnchor ( cteId=CTEId#2 ) ----PhysicalCteProducer ( cteId=CTEId#2 ) ------PhysicalProject --------NestedLoopJoin[INNER_JOIN](cast(ssales as DECIMALV3(38, 6)) > (0.9500 * tpcds_cmax)) ----------PhysicalProject ------------hashAgg[GLOBAL] ---------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] -------------------PhysicalProject ---------------------PhysicalOlapScan[store_sales] apply RFs: RF4 +--------------PhysicalDistribute[DistributionSpecHash] +----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------PhysicalOlapScan[customer] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 +----------------------PhysicalProject +------------------------PhysicalOlapScan[customer] ----------PhysicalProject ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecGather] ----------------hashAgg[LOCAL] ------------------PhysicalProject --------------------hashAgg[GLOBAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +----------------------------------PhysicalProject +------------------------------------filter(d_year IN (2000, 2001, 2002, 2003)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[customer] ---------------------------PhysicalProject -----------------------------filter(d_year IN (2000, 2001, 2002, 2003)) -------------------------------PhysicalOlapScan[date_dim] ----PhysicalResultSink ------PhysicalLimit[GLOBAL] --------PhysicalLimit[LOCAL] @@ -57,13 +61,13 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------PhysicalProject -------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF6 cs_bill_customer_sk->[c_customer_sk] +--------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF6 --------------------------PhysicalProject -----------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF5 item_sk->[cs_item_sk] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF5 item_sk->[cs_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF7 ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) ----------------------PhysicalProject ------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2000)) --------------------------PhysicalOlapScan[date_dim] @@ -73,7 +77,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = best_ss_customer.c_customer_sk)) otherCondition=() build RFs:RF9 ws_bill_customer_sk->[c_customer_sk] --------------------------PhysicalCteConsumer ( cteId=CTEId#2 ) apply RFs: RF9 --------------------------PhysicalProject -----------------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF8 item_sk->[ws_item_sk] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = frequent_ss_items.item_sk)) otherCondition=() build RFs:RF8 item_sk->[ws_item_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF10 ------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query24.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query24.out index f9b706ca1c33cf..023e097f3b920d 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query24.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query24.out @@ -7,46 +7,45 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_zip = customer_address.ca_zip) and (store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_zip->[ca_zip];RF6 s_store_sk->[ss_store_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk) and (store.s_zip = customer_address.ca_zip)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF5 ca_address_sk->[c_current_addr_sk];RF6 ca_zip->[s_zip] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[sr_item_sk,ss_item_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=(( not (c_birth_country = upper(ca_country)))) build RFs:RF3 ca_address_sk->[c_current_addr_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 ss_item_sk->[i_item_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] +--------------------------PhysicalOlapScan[item] apply RFs: RF3 +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_ticket_number->[ss_ticket_number];RF1 sr_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 RF6 +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF4 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF3 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 +------------------------------filter((store.s_market_id = 10)) +--------------------------------PhysicalOlapScan[store] apply RFs: RF6 --------------------PhysicalProject -----------------------PhysicalOlapScan[item] +----------------------PhysicalOlapScan[customer] apply RFs: RF5 ----------------PhysicalProject -------------------filter((store.s_market_id = 10)) ---------------------PhysicalOlapScan[store] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalQuickSort[MERGE_SORT] -------PhysicalDistribute[DistributionSpecGather] ---------PhysicalQuickSort[LOCAL_SORT] -----------PhysicalProject -------------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalProject ---------------------------filter((ssales.i_color = 'snow')) -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalProject -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecGather] ---------------------hashAgg[LOCAL] -----------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------PhysicalQuickSort[LOCAL_SORT] +--------PhysicalProject +----------NestedLoopJoin[INNER_JOIN](cast(paid as DECIMALV3(38, 6)) > 0.05*avg(netpaid)) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecGather] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +------------PhysicalProject +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------PhysicalProject +------------------------filter((ssales.i_color = 'snow')) +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query25.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query25.out index 768ad92e931b56..fa4dd08f628705 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query25.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query25.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 RF5 RF6 RF9 +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF5 RF7 ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------filter((d1.d_moy = 4) and (d1.d_year = 2000)) +--------------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((d2.d_moy <= 10) and (d2.d_moy >= 4) and (d2.d_year = 2000)) +----------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter((d3.d_moy <= 10) and (d3.d_moy >= 4) and (d3.d_year = 2000)) ---------------------------PhysicalOlapScan[date_dim] -------------------PhysicalProject ---------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query26.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query26.out index 2b5d23c4aac26d..7626479410d720 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query26.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query26.out @@ -10,21 +10,21 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[cs_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[cs_bill_cdemo_sk] +------------------------PhysicalOlapScan[item] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'S')) +----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject -----------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'S')) -------------------------------PhysicalOlapScan[customer_demographics] -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 1998)) ---------------------------PhysicalOlapScan[date_dim] +----------------------------filter((date_dim.d_year = 1998)) +------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query27.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query27.out index f203bce45719dc..1a85165a5dcc46 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query27.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query27.out @@ -10,24 +10,24 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalRepeat ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------filter((customer_demographics.cd_education_status = '2 yr Degree') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'U')) +--------------------------------------PhysicalOlapScan[customer_demographics] ------------------------------PhysicalProject ---------------------------------filter((customer_demographics.cd_education_status = '2 yr Degree') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'U')) -----------------------------------PhysicalOlapScan[customer_demographics] +--------------------------------filter((date_dim.d_year = 2000)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_year = 2000)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------filter(s_state IN ('AL', 'FL', 'IN', 'NY', 'OH', 'SC')) +------------------------------PhysicalOlapScan[store] ----------------------PhysicalProject -------------------------filter(s_state IN ('AL', 'FL', 'IN', 'NY', 'OH', 'SC')) ---------------------------PhysicalOlapScan[store] +------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query29.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query29.out index 706d570662c86b..50073c083236e9 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query29.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query29.out @@ -8,36 +8,36 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF9 s_store_sk->[ss_store_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF9 ss_item_sk->[i_item_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] +--------------------PhysicalOlapScan[item] apply RFs: RF9 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF8 ss_store_sk->[s_store_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[store] apply RFs: RF8 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[sr_returned_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_date_sk->[sr_returned_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF5 i_item_sk->[sr_item_sk,ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 cs_bill_customer_sk->[sr_customer_sk,ss_customer_sk];RF4 cs_item_sk->[sr_item_sk,ss_item_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_customer_sk = catalog_sales.cs_bill_customer_sk) and (store_returns.sr_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 sr_customer_sk->[cs_bill_customer_sk];RF4 sr_item_sk->[cs_item_sk] +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF7 --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_customer_sk->[ss_customer_sk];RF1 sr_item_sk->[ss_item_sk];RF2 sr_ticket_number->[ss_ticket_number] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 RF5 RF6 RF9 +--------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 RF4 RF5 RF7 ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 +--------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1998)) +--------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject ---------------------------------filter((d1.d_moy = 4) and (d1.d_year = 1998)) +--------------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998)) ----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((d2.d_moy <= 7) and (d2.d_moy >= 4) and (d2.d_year = 1998)) +----------------------------filter(d_year IN (1998, 1999, 2000)) ------------------------------PhysicalOlapScan[date_dim] -----------------------PhysicalProject -------------------------filter(d_year IN (1998, 1999, 2000)) ---------------------------PhysicalOlapScan[date_dim] -------------------PhysicalProject ---------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query30.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query30.out index 001572c66e55b3..701caa14fe3239 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query30.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query30.out @@ -7,35 +7,33 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[wr_returned_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[wr_returning_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[wr_returning_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[wr_returned_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((date_dim.d_year = 2000)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((date_dim.d_year = 2000)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF4 ctr_state->[ctr_state] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ctr_customer_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF2 ctr_state->[ctr_state] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 ------------------PhysicalProject ---------------------PhysicalOlapScan[customer] apply RFs: RF4 ---------------PhysicalProject -----------------filter((customer_address.ca_state = 'GA')) -------------------PhysicalOlapScan[customer_address] +--------------------filter((customer_address.ca_state = 'GA')) +----------------------PhysicalOlapScan[customer_address] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query31.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query31.out index c1c4f648fba5a8..ceea81733bc465 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query31.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query31.out @@ -7,16 +7,16 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[ss_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((ss.d_year = 1999) and d_qoy IN (1, 2, 3)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((ss.d_year = 1999) and d_qoy IN (1, 2, 3)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalCteAnchor ( cteId=CTEId#1 ) ----PhysicalCteProducer ( cteId=CTEId#1 ) ------PhysicalProject @@ -24,34 +24,34 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_bill_addr_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ws_bill_addr_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------PhysicalProject ------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer_address] +------------------------filter((ws.d_year = 1999) and d_qoy IN (1, 2, 3)) +--------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject ---------------------filter((ws.d_year = 1999) and d_qoy IN (1, 2, 3)) -----------------------PhysicalOlapScan[date_dim] +--------------------PhysicalOlapScan[customer_address] ----PhysicalResultSink ------PhysicalProject ---------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] +--------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws3.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF8 ca_county->[ca_county,ca_county,ca_county,ca_county] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ca_county = ws2.ca_county)) otherCondition=((if((web_sales > 0.00), (cast(web_sales as DECIMALV3(38, 8)) / web_sales), NULL) > if((store_sales > 0.00), (cast(store_sales as DECIMALV3(38, 8)) / store_sales), NULL))) build RFs:RF7 ca_county->[ca_county,ca_county,ca_county] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss1.ca_county = ws1.ca_county)) otherCondition=() build RFs:RF6 ca_county->[ca_county,ca_county] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county] ---------------------PhysicalProject -----------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 1999)) -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ss2.ca_county = ss3.ca_county)) otherCondition=() build RFs:RF5 ca_county->[ca_county,ca_county] --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ss1.ca_county = ss2.ca_county)) otherCondition=() build RFs:RF4 ca_county->[ca_county] ----------------------PhysicalProject ------------------------filter((ss1.d_qoy = 1) and (ss1.d_year = 1999)) ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF6 RF7 RF8 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 RF5 RF6 RF7 RF8 ----------------------PhysicalProject ------------------------filter((ss2.d_qoy = 2) and (ss2.d_year = 1999)) ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 RF7 RF8 +--------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF5 RF6 RF7 RF8 +--------------------PhysicalProject +----------------------filter((ss3.d_qoy = 3) and (ss3.d_year = 1999)) +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ----------------PhysicalProject ------------------filter((ws1.d_qoy = 1) and (ws1.d_year = 1999)) --------------------PhysicalCteConsumer ( cteId=CTEId#1 ) apply RFs: RF7 RF8 diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query33.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query33.out index 25ccfd29c87dfc..dd3483b81f76e6 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query33.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query33.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF0 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF4 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Home')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 1998)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_manufact_id = item.i_manufact_id)) otherCondition=() build RFs:RF8 i_manufact_id->[i_manufact_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Home')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query34.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query34.out index f5c833d21c1256..6d2f295450ebf5 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query34.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query34.out @@ -5,7 +5,9 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] +------------PhysicalProject +--------------PhysicalOlapScan[customer] apply RFs: RF3 ------------filter((dn.cnt <= 20) and (dn.cnt >= 15)) --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] @@ -17,7 +19,7 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_dom <= 28) and (date_dim.d_dom >= 1) and OR[(date_dim.d_dom <= 3),(date_dim.d_dom >= 25)] and d_year IN (2000, 2001, 2002)) ------------------------------------PhysicalOlapScan[date_dim] @@ -27,6 +29,4 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.2) and hd_buy_potential IN ('>10000', 'Unknown')) ----------------------------PhysicalOlapScan[household_demographics] -------------PhysicalProject ---------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query35.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query35.out index beedc2a19350ab..6fe507571d6b6a 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query35.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query35.out @@ -10,12 +10,14 @@ PhysicalResultSink --------------hashAgg[LOCAL] ----------------PhysicalProject ------------------filter(OR[ifnull($c$1, FALSE),ifnull($c$2, FALSE)]) ---------------------hashJoin[LEFT_SEMI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() -----------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +--------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] +--------------------------PhysicalProject +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 c_current_addr_sk->[ca_address_sk] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[customer_address] apply RFs: RF4 +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() --------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] @@ -25,18 +27,16 @@ PhysicalResultSink ----------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 +------------------------------------PhysicalOlapScan[customer] apply RFs: RF5 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer_address] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_demographics] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_qoy < 4) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer_demographics] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query36.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query36.out index e2879bb57387ed..89396112f69093 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query36.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query36.out @@ -17,16 +17,16 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF1 ss_item_sk->[i_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +--------------------------------------PhysicalOlapScan[item] apply RFs: RF1 +------------------------------------PhysicalProject +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF2 ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[item] -------------------------------------PhysicalProject ---------------------------------------filter((d1.d_year = 1999)) -----------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------filter((d1.d_year = 1999)) +--------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------filter(s_state IN ('AL', 'FL', 'IN', 'LA', 'MI', 'MN', 'NM', 'TN')) ------------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query37.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query37.out index adb94069ace3e3..80a6cb6cfdc1c5 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query37.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query37.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query38.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query38.out index ce87ec57d57863..b68c98ce241ffe 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query38.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query38.out @@ -7,47 +7,47 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------PhysicalIntersect +--------------PhysicalIntersect RFV2: RF6[c_last_name->c_last_name] RF7[c_last_name->c_last_name] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ws_bill_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] +--------------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] +--------------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] RFV2: RF6 ----------------hashAgg[GLOBAL] ------------------PhysicalDistribute[DistributionSpecHash] --------------------hashAgg[LOCAL] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF4 RF5 +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[customer] +--------------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query39.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query39.out index 81c822f42d871d..c1bc48f9cc3505 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query39.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query39.out @@ -10,14 +10,14 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[inv_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[inv_item_sk] ---------------------------PhysicalOlapScan[inventory] apply RFs: RF0 RF1 RF2 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +------------------------PhysicalOlapScan[warehouse] apply RFs: RF1 ----------------------PhysicalProject -------------------------PhysicalOlapScan[warehouse] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 inv_item_sk->[i_item_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[item] apply RFs: RF0 +--------------------------PhysicalOlapScan[inventory] apply RFs: RF2 ------------------PhysicalProject --------------------filter((date_dim.d_year = 2000) and d_moy IN (2, 3)) ----------------------PhysicalOlapScan[date_dim] @@ -26,8 +26,8 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalQuickSort[LOCAL_SORT] ----------hashJoin[INNER_JOIN shuffle] hashCondition=((inv1.i_item_sk = inv2.i_item_sk) and (inv1.w_warehouse_sk = inv2.w_warehouse_sk)) otherCondition=() build RFs:RF3 i_item_sk->[i_item_sk];RF4 w_warehouse_sk->[w_warehouse_sk] -------------filter((inv2.d_moy = 3)) ---------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 ------------filter((inv1.d_moy = 2)) +--------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 +------------filter((inv2.d_moy = 3)) --------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query4.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query4.out index 163b1cb7c71753..2664831cd6d237 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query4.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query4.out @@ -10,11 +10,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF0 ss_customer_sk->[c_customer_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------PhysicalOlapScan[customer] apply RFs: RF0 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ------------------PhysicalProject --------------------filter(d_year IN (1999, 2000)) ----------------------PhysicalOlapScan[date_dim] @@ -25,11 +25,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = catalog_sales.cs_bill_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = catalog_sales.cs_bill_customer_sk)) otherCondition=() build RFs:RF2 cs_bill_customer_sk->[c_customer_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +------------------------PhysicalOlapScan[customer] apply RFs: RF2 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter(d_year IN (1999, 2000)) ----------------------PhysicalOlapScan[date_dim] @@ -40,11 +40,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF4 ws_bill_customer_sk->[c_customer_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +------------------------PhysicalOlapScan[customer] apply RFs: RF4 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[web_sales] apply RFs: RF5 ------------------PhysicalProject --------------------filter(d_year IN (1999, 2000)) ----------------------PhysicalOlapScan[date_dim] @@ -53,19 +53,19 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF10 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF10 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.dyear = 2000) and (t_w_secyear.sale_type = 'w')) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF10 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF9 customer_id->[customer_id,customer_id,customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF9 customer_id->[customer_id,customer_id,customer_id,customer_id] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_c_secyear.customer_id)) otherCondition=((if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL) > if((year_total > 0.000000), (cast(year_total as DECIMALV3(38, 16)) / year_total), NULL))) build RFs:RF8 customer_id->[customer_id] ----------------------PhysicalProject ------------------------filter((t_c_secyear.dyear = 2000) and (t_c_secyear.sale_type = 'c')) --------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_c_firstyear.customer_id)) otherCondition=() build RFs:RF7 customer_id->[customer_id,customer_id] --------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF6 customer_id->[customer_id] ----------------------------PhysicalProject ------------------------------filter((t_s_secyear.dyear = 2000) and (t_s_secyear.sale_type = 's')) diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query40.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query40.out index 414f6e3e0bd2ed..2d49d8a4cf774f 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query40.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query40.out @@ -8,19 +8,19 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[cs_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[cs_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[cs_warehouse_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF2 cs_warehouse_sk->[w_warehouse_sk] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +----------------------------PhysicalOlapScan[warehouse] apply RFs: RF2 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF0 cs_order_number->[cr_order_number];RF1 cs_item_sk->[cr_item_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +--------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_returns] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[warehouse] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 ----------------------PhysicalProject ------------------------filter((item.i_current_price <= 1.49) and (item.i_current_price >= 0.99)) --------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query44.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query44.out index 450cb5f62c2a17..adaca3125ea1d8 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query44.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query44.out @@ -7,7 +7,9 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((i2.i_item_sk = descending.item_sk)) otherCondition=() build RFs:RF1 item_sk->[i_item_sk] +----------------PhysicalProject +------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] apply RFs: RF1 ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((i1.i_item_sk = asceding.item_sk)) otherCondition=() build RFs:RF0 item_sk->[i_item_sk] --------------------PhysicalProject @@ -17,55 +19,49 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((V11.rnk < 11)) ----------------------------PhysicalWindow -------------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------------PhysicalPartitionTopN +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) +--------------------------------------PhysicalProject +----------------------------------------PhysicalAssertNumRows +------------------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------------------PhysicalProject +----------------------------------------------hashAgg[GLOBAL] +------------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------------hashAgg[LOCAL] +----------------------------------------------------PhysicalProject +------------------------------------------------------filter((store_sales.ss_store_sk = 366) and ss_cdemo_sk IS NULL) +--------------------------------------------------------PhysicalOlapScan[store_sales] --------------------------------------PhysicalProject -----------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) -------------------------------------------PhysicalProject ---------------------------------------------hashAgg[GLOBAL] -----------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((ss1.ss_store_sk = 366)) -------------------------------------------------------PhysicalOlapScan[store_sales] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------------PhysicalProject ---------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------filter((store_sales.ss_store_sk = 366) and ss_cdemo_sk IS NULL) -------------------------------------------------------------PhysicalOlapScan[store_sales] +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 366)) +--------------------------------------------------PhysicalOlapScan[store_sales] ------------------------PhysicalProject --------------------------filter((V21.rnk < 11)) ----------------------------PhysicalWindow -------------------------------PhysicalQuickSort[MERGE_SORT] ---------------------------------PhysicalDistribute[DistributionSpecGather] -----------------------------------PhysicalQuickSort[LOCAL_SORT] -------------------------------------PhysicalPartitionTopN +------------------------------PhysicalQuickSort[LOCAL_SORT] +--------------------------------PhysicalPartitionTopN +----------------------------------PhysicalProject +------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) --------------------------------------PhysicalProject -----------------------------------------NestedLoopJoin[INNER_JOIN](cast(rank_col as DECIMALV3(38, 5)) > (0.9 * rank_col)) -------------------------------------------PhysicalProject ---------------------------------------------hashAgg[GLOBAL] -----------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------PhysicalProject -----------------------------------------------------filter((ss1.ss_store_sk = 366)) -------------------------------------------------------PhysicalOlapScan[store_sales] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalAssertNumRows -----------------------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------------------PhysicalProject ---------------------------------------------------hashAgg[GLOBAL] -----------------------------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------------------------hashAgg[LOCAL] ---------------------------------------------------------PhysicalProject -----------------------------------------------------------filter((store_sales.ss_store_sk = 366) and ss_cdemo_sk IS NULL) -------------------------------------------------------------PhysicalOlapScan[store_sales] -----------------PhysicalProject -------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(i2.i_product_name)] +----------------------------------------PhysicalAssertNumRows +------------------------------------------PhysicalDistribute[DistributionSpecGather] +--------------------------------------------PhysicalProject +----------------------------------------------hashAgg[GLOBAL] +------------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------------hashAgg[LOCAL] +----------------------------------------------------PhysicalProject +------------------------------------------------------filter((store_sales.ss_store_sk = 366) and ss_cdemo_sk IS NULL) +--------------------------------------------------------PhysicalOlapScan[store_sales] +--------------------------------------PhysicalProject +----------------------------------------hashAgg[GLOBAL] +------------------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------------------hashAgg[LOCAL] +----------------------------------------------PhysicalProject +------------------------------------------------filter((ss1.ss_store_sk = 366)) +--------------------------------------------------PhysicalOlapScan[store_sales] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query45.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query45.out index 9f0c50ae0a648a..f14418fa328cd3 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query45.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query45.out @@ -13,15 +13,15 @@ PhysicalResultSink --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[c_current_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 c_current_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ws_bill_customer_sk] +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF1 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 ws_bill_customer_sk->[c_customer_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF2 RF3 +----------------------------------PhysicalOlapScan[customer] apply RFs: RF0 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +----------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 ------------------------PhysicalProject --------------------------filter((date_dim.d_qoy = 1) and (date_dim.d_year = 1998)) ----------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query46.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query46.out index 3675020a5eb76c..3df758359802ed 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query46.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query46.out @@ -5,32 +5,34 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] ----------------PhysicalProject ------------------hashAgg[GLOBAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 +----------------------------------------PhysicalProject +------------------------------------------filter(d_dow IN (0, 6) and d_year IN (2000, 2001, 2002)) +--------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------filter(d_dow IN (0, 6) and d_year IN (2000, 2001, 2002)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter(s_city IN ('Fairview', 'Farmington', 'Five Forks', 'Oakland', 'Winchester')) +----------------------------------------PhysicalOlapScan[store] --------------------------------PhysicalProject -----------------------------------filter(s_city IN ('Fairview', 'Farmington', 'Five Forks', 'Oakland', 'Winchester')) -------------------------------------PhysicalOlapScan[store] -----------------------------PhysicalProject -------------------------------filter(OR[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count = 1)]) ---------------------------------PhysicalOlapScan[household_demographics] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[customer_address] +----------------------------------filter(OR[(household_demographics.hd_dep_count = 0),(household_demographics.hd_vehicle_count = 1)]) +------------------------------------PhysicalOlapScan[household_demographics] ----------------PhysicalProject ------------------PhysicalOlapScan[customer] apply RFs: RF5 ------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query47.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query47.out index d1c72cdf6f5766..546c016c5b0067 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query47.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query47.out @@ -16,11 +16,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 ------------------------------PhysicalProject --------------------------------filter(OR[(date_dim.d_year = 1999),AND[(date_dim.d_year = 1998),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2000),(date_dim.d_moy = 1)]] and d_year IN (1998, 1999, 2000)) ----------------------------------PhysicalOlapScan[date_dim] @@ -32,7 +32,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1)) and (v1.s_company_name = v1_lead.s_company_name) and (v1.s_store_name = v1_lead.s_store_name)) otherCondition=() build RFs:RF8 i_category->[i_category];RF9 i_brand->[i_brand];RF10 s_store_name->[s_store_name];RF11 s_company_name->[s_company_name];RF12 rn->[(rn - 1)] ----------------PhysicalProject ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF8 RF9 RF10 RF11 RF12 ----------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query48.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query48.out index 3cd8b7c9432955..bb9ac45cdb5db6 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query48.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query48.out @@ -11,12 +11,12 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = store_sales.ss_cdemo_sk)) otherCondition=(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown'),(store_sales.ss_sales_price >= 100.00),(store_sales.ss_sales_price <= 150.00)],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College'),(store_sales.ss_sales_price <= 100.00)],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary'),(store_sales.ss_sales_price >= 150.00)]]) build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] ------------------------PhysicalProject ---------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) -----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------PhysicalOlapScan[store] apply RFs: RF0 ------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] +--------------------------filter((store_sales.ss_net_profit <= 25000.00) and (store_sales.ss_net_profit >= 0.00) and (store_sales.ss_sales_price <= 200.00) and (store_sales.ss_sales_price >= 50.00)) +----------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 --------------------PhysicalProject ----------------------filter(OR[AND[(customer_demographics.cd_marital_status = 'M'),(customer_demographics.cd_education_status = 'Unknown')],AND[(customer_demographics.cd_marital_status = 'W'),(customer_demographics.cd_education_status = 'College')],AND[(customer_demographics.cd_marital_status = 'D'),(customer_demographics.cd_education_status = 'Primary')]] and cd_education_status IN ('College', 'Primary', 'Unknown') and cd_marital_status IN ('D', 'M', 'W')) ------------------------PhysicalOlapScan[customer_demographics] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query49.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query49.out index a5885662602076..bd706e8fa17390 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query49.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query49.out @@ -30,13 +30,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 wr_order_number->[ws_order_number];RF1 wr_item_sk->[ws_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws.ws_item_sk = wr.wr_item_sk) and (ws.ws_order_number = wr.wr_order_number)) otherCondition=() build RFs:RF0 ws_order_number->[wr_order_number];RF1 ws_item_sk->[wr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((wr.wr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[web_returns] +------------------------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((ws.ws_net_paid > 0.00) and (ws.ws_net_profit > 1.00) and (ws.ws_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -62,13 +62,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cr_order_number->[cs_order_number];RF4 cr_item_sk->[cs_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 +------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs.cs_item_sk = cr.cr_item_sk) and (cs.cs_order_number = cr.cr_order_number)) otherCondition=() build RFs:RF3 cs_order_number->[cr_order_number];RF4 cs_item_sk->[cr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((cr.cr_return_amount > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[catalog_returns] +------------------------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF3 RF4 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((cs.cs_net_paid > 0.00) and (cs.cs_net_profit > 1.00) and (cs.cs_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------------------------------------------PhysicalOlapScan[date_dim] @@ -94,13 +94,13 @@ PhysicalResultSink ------------------------------------------------------PhysicalProject --------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] ----------------------------------------------------------PhysicalProject -------------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 sr_ticket_number->[ss_ticket_number];RF7 sr_item_sk->[ss_item_sk] ---------------------------------------------------------------PhysicalProject -----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) -------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF6 RF7 RF8 +------------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((sts.ss_item_sk = sr.sr_item_sk) and (sts.ss_ticket_number = sr.sr_ticket_number)) otherCondition=() build RFs:RF6 ss_ticket_number->[sr_ticket_number];RF7 ss_item_sk->[sr_item_sk] --------------------------------------------------------------PhysicalProject ----------------------------------------------------------------filter((sr.sr_return_amt > 10000.00)) -------------------------------------------------------------------PhysicalOlapScan[store_returns] +------------------------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF6 RF7 +--------------------------------------------------------------PhysicalProject +----------------------------------------------------------------filter((sts.ss_net_paid > 0.00) and (sts.ss_net_profit > 1.00) and (sts.ss_quantity > 0)) +------------------------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF8 ----------------------------------------------------------PhysicalProject ------------------------------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) --------------------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query5.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query5.out index 06f53170859331..d10c4e55c215f8 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query5.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query5.out @@ -35,9 +35,9 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF3 cp_catalog_page_sk->[cr_catalog_page_sk,cs_catalog_page_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF2 cp_catalog_page_sk->[cr_catalog_page_sk,cs_catalog_page_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((salesreturns.date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk,cs_sold_date_sk] ------------------------------------PhysicalUnion --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject @@ -46,10 +46,10 @@ PhysicalResultSink ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[catalog_page] +--------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[catalog_page] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] @@ -62,12 +62,13 @@ PhysicalResultSink --------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF6 RF7 ---------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 wr_item_sk->[ws_item_sk];RF5 wr_order_number->[ws_order_number] -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 RF7 -------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF6 +--------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = web_sales.ws_item_sk) and (web_returns.wr_order_number = web_sales.ws_order_number)) otherCondition=() build RFs:RF4 ws_item_sk->[wr_item_sk];RF5 ws_order_number->[wr_order_number] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF4 RF5 RF6 +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF7 ------------------------------------PhysicalProject --------------------------------------filter((date_dim.d_date <= '2000-09-02') and (date_dim.d_date >= '2000-08-19')) ----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query50.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query50.out index d2eda4d35debce..26346247cf042f 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query50.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query50.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[sr_returned_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF4 ss_sold_date_sk->[d_date_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] +------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[store] apply RFs: RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 sr_ticket_number->[ss_ticket_number];RF1 sr_item_sk->[ss_item_sk];RF2 sr_customer_sk->[ss_customer_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = store_returns.sr_customer_sk) and (store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_ticket_number->[sr_ticket_number];RF1 ss_item_sk->[sr_item_sk];RF2 ss_customer_sk->[sr_customer_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +--------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 RF2 RF5 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_returns] apply RFs: RF5 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] -----------------------PhysicalProject -------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[store_sales] ------------------PhysicalProject --------------------filter((d2.d_moy = 9) and (d2.d_year = 1998)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query51.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query51.out index a89b73db446b0a..e0e044da3b2ab8 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query51.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query51.out @@ -18,9 +18,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 +----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -31,9 +31,9 @@ PhysicalResultSink ------------------------------PhysicalDistribute[DistributionSpecHash] --------------------------------hashAgg[LOCAL] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_month_seq <= 1225) and (date_dim.d_month_seq >= 1214)) ------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query53.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query53.out index 08f3ba6e090871..3d34c22a08bd17 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query53.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query53.out @@ -13,19 +13,19 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------filter(d_month_seq IN (1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store] +----------------------------------filter(d_month_seq IN (1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223)) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) ---------------------------------PhysicalOlapScan[item] +------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out index 6d88dce347de99..64a8c60f9293fe 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query54.out @@ -15,46 +15,54 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 s_county->[ca_county];RF6 s_state->[ca_state] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_county = store.s_county) and (customer_address.ca_state = store.s_state)) otherCondition=() build RFs:RF5 ca_county->[s_county];RF6 ca_state->[s_state] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------------PhysicalOlapScan[store] apply RFs: RF5 RF6 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((my_customers.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ----------------------------------------PhysicalProject ------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF7 ----------------------------------------PhysicalProject ------------------------------------------hashAgg[GLOBAL] ---------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] +--------------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------------hashAgg[LOCAL] ------------------------------------------------PhysicalProject ---------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[cs_item_sk,ws_item_sk] +--------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk,ws_bill_customer_sk] ----------------------------------------------------PhysicalProject -------------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = cs_or_ws_sales.customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[cs_bill_customer_sk,ws_bill_customer_sk] ---------------------------------------------------------PhysicalUnion -----------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] -------------------------------------------------------------PhysicalProject ---------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 -----------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk,ws_sold_date_sk] +--------------------------------------------------------PhysicalProject +----------------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cs_or_ws_sales.item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk,ws_item_sk] +------------------------------------------------------------PhysicalUnion +--------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +--------------------------------------------------------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------------------------------------------------------PhysicalProject +------------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 ------------------------------------------------------------PhysicalProject ---------------------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 +--------------------------------------------------------------filter((item.i_category = 'Books') and (item.i_class = 'business')) +----------------------------------------------------------------PhysicalOlapScan[item] --------------------------------------------------------PhysicalProject -----------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 +----------------------------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) +------------------------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------------------------PhysicalProject -------------------------------------------------------filter((item.i_category = 'Books') and (item.i_class = 'business')) ---------------------------------------------------------PhysicalOlapScan[item] -------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) -----------------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF5 RF6 ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store] +--------------------------------------PhysicalOlapScan[customer_address] ----------------------------PhysicalProject ------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) <= d_month_seq+3) +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------hashAgg[GLOBAL] +--------------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------------hashAgg[LOCAL] +------------------------------------------PhysicalProject +--------------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) +----------------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject ----------------------------------NestedLoopJoin[INNER_JOIN](cast(d_month_seq as BIGINT) >= d_month_seq+1) -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[GLOBAL] @@ -63,12 +71,6 @@ PhysicalResultSink ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) --------------------------------------------------PhysicalOlapScan[date_dim] ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------hashAgg[GLOBAL] ---------------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------------hashAgg[LOCAL] -------------------------------------------PhysicalProject ---------------------------------------------filter((date_dim.d_moy = 2) and (date_dim.d_year = 2000)) -----------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query56.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query56.out index cf15de9fc368e7..8aa54d2497eeb6 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query56.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query56.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('chiffon', 'lace', 'smoke')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('chiffon', 'lace', 'smoke')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('chiffon', 'lace', 'smoke')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('chiffon', 'lace', 'smoke')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -6.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter(i_color IN ('chiffon', 'lace', 'smoke')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2001)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 5) and (date_dim.d_year = 2001)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -6.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter(i_color IN ('chiffon', 'lace', 'smoke')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query57.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query57.out index 697bd284f5701e..4b4909987a4be7 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query57.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query57.out @@ -16,11 +16,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 cs_item_sk->[i_item_sk] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 +------------------------------------PhysicalOlapScan[item] apply RFs: RF0 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] +------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF1 RF2 ------------------------------PhysicalProject --------------------------------filter(OR[(date_dim.d_year = 1999),AND[(date_dim.d_year = 1998),(date_dim.d_moy = 12)],AND[(date_dim.d_year = 2000),(date_dim.d_moy = 1)]] and d_year IN (1998, 1999, 2000)) ----------------------------------PhysicalOlapScan[date_dim] @@ -32,7 +32,7 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] +--------------hashJoin[INNER_JOIN shuffle] hashCondition=((v1.cc_name = v1_lead.cc_name) and (v1.i_brand = v1_lead.i_brand) and (v1.i_category = v1_lead.i_category) and (v1.rn = expr_(rn - 1))) otherCondition=() build RFs:RF7 i_category->[i_category];RF8 i_brand->[i_brand];RF9 cc_name->[cc_name];RF10 rn->[(rn - 1)] ----------------PhysicalProject ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF7 RF8 RF9 RF10 ----------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query58.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query58.out index a2dad371e9f207..17be337e03ad42 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query58.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query58.out @@ -5,82 +5,82 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev))) build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = ws_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * ws_items.ws_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * ws_items.ws_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev)) and (cast(ws_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev))) build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF12 item_id->[i_item_id] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 ws_item_sk->[i_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 RF10 +--------------------------------PhysicalAssertNumRows +----------------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_date = '1998-02-21')) +----------------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((ss_items.item_id = cs_items.item_id)) otherCondition=((cast(cs_item_rev as DECIMALV3(38, 3)) <= (1.1 * ss_items.ss_item_rev)) and (cast(cs_item_rev as DECIMALV3(38, 3)) >= (0.9 * ss_items.ss_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) <= (1.1 * cs_items.cs_item_rev)) and (cast(ss_item_rev as DECIMALV3(38, 3)) >= (0.9 * cs_items.cs_item_rev))) build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cs_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF10 RF11 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF7 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 RF5 ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date = '1998-02-21')) --------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF13 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF5 +------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 RF1 ------------------------------------PhysicalAssertNumRows --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------PhysicalProject ------------------------------------------filter((date_dim.d_date = '1998-02-21')) --------------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ws_item_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] -------------------------PhysicalProject ---------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 ---------------------------------PhysicalAssertNumRows -----------------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_date = '1998-02-21')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query59.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query59.out index 67fb3df373c6e1..9c14a31e0d9f68 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query59.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query59.out @@ -16,27 +16,27 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF5 d_week_seq->[d_week_seq] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF5 s_store_id2->[s_store_id] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((expr_cast(d_week_seq1 as BIGINT) = expr_(cast(d_week_seq2 as BIGINT) - 52)) and (y.s_store_id1 = x.s_store_id2)) otherCondition=() build RFs:RF4 s_store_id2->[s_store_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq1)) otherCondition=() build RFs:RF4 d_week_seq->[d_week_seq] ------------------PhysicalProject --------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF5 +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF3 RF4 ----------------------PhysicalProject -------------------------PhysicalOlapScan[store] apply RFs: RF4 +------------------------PhysicalOlapScan[store] apply RFs: RF5 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +--------------------filter((d.d_month_seq <= 1216) and (d.d_month_seq >= 1205)) +----------------------PhysicalOlapScan[date_dim] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_week_seq = d_week_seq2)) otherCondition=() build RFs:RF2 d_week_seq->[d_week_seq] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((wss.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ---------------------------PhysicalProject -----------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[store] +------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF1 RF2 ----------------------PhysicalProject -------------------------filter((d.d_month_seq <= 1228) and (d.d_month_seq >= 1217)) ---------------------------PhysicalOlapScan[date_dim] ---------------PhysicalProject -----------------filter((d.d_month_seq <= 1216) and (d.d_month_seq >= 1205)) -------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[store] +------------------PhysicalProject +--------------------filter((d.d_month_seq <= 1228) and (d.d_month_seq >= 1217)) +----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query6.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query6.out index 8ac3c94831968d..bf5c172fd1c85c 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query6.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query6.out @@ -13,32 +13,32 @@ PhysicalResultSink --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((j.i_category = i.i_category)) otherCondition=((cast(i_current_price as DECIMALV3(38, 5)) > (1.2 * avg(j.i_current_price)))) build RFs:RF5 i_category->[i_category] ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d.d_month_seq = date_dim.d_month_seq)) otherCondition=() build RFs:RF4 d_month_seq->[d_month_seq] +--------------------------PhysicalAssertNumRows +----------------------------PhysicalDistribute[DistributionSpecGather] +------------------------------hashAgg[GLOBAL] +--------------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------------hashAgg[LOCAL] +------------------------------------PhysicalProject +--------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) +----------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_item_sk = i.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ------------------------------PhysicalProject --------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((s.ss_sold_date_sk = d.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] ---------------------------------------PhysicalProject -----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_customer_sk = s.ss_customer_sk)) otherCondition=() build RFs:RF1 ss_customer_sk->[c_customer_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((a.ca_address_sk = c.c_current_addr_sk)) otherCondition=() build RFs:RF0 c_current_addr_sk->[ca_address_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------------PhysicalOlapScan[customer_address] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[customer_address] +--------------------------------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------------------------PhysicalProject +----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF4 +------------------------------------PhysicalOlapScan[date_dim] ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[item] apply RFs: RF5 ---------------------------PhysicalAssertNumRows -----------------------------PhysicalDistribute[DistributionSpecGather] -------------------------------hashAgg[GLOBAL] ---------------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------------hashAgg[LOCAL] -------------------------------------PhysicalProject ---------------------------------------filter((date_dim.d_moy = 3) and (date_dim.d_year = 2002)) -----------------------------------------PhysicalOlapScan[date_dim] ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query60.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query60.out index 7884fdb7891a59..cea142ca974a48 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query60.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query60.out @@ -13,71 +13,71 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF2 ca_address_sk->[ss_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ss_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF0 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 1998)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 1998)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF0 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF0 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cs_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF7 i_item_sk->[cs_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF6 ca_address_sk->[cs_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[cs_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF4 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 1998)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 1998)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF4 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF4 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[ws_sold_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 i_item_sk->[ws_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF10 ca_address_sk->[ws_bill_addr_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[ws_bill_addr_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF9 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF9 RF10 RF11 ------------------------------------PhysicalProject ---------------------------------------filter((customer_address.ca_gmt_offset = -5.00)) -----------------------------------------PhysicalOlapScan[customer_address] ---------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[item] apply RFs: RF8 -----------------------------------PhysicalProject -------------------------------------filter((item.i_category = 'Children')) ---------------------------------------PhysicalOlapScan[item] -----------------------------PhysicalProject -------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 1998)) ---------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter((date_dim.d_moy = 10) and (date_dim.d_year = 1998)) +----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalProject +----------------------------------filter((customer_address.ca_gmt_offset = -5.00)) +------------------------------------PhysicalOlapScan[customer_address] +----------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((item.i_item_id = item.i_item_id)) otherCondition=() build RFs:RF8 i_item_id->[i_item_id] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[item] apply RFs: RF8 +------------------------------PhysicalProject +--------------------------------filter((item.i_category = 'Children')) +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query61.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query61.out index 98825fe6cf8c4a..bfb503565a6895 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query61.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query61.out @@ -12,26 +12,26 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF9 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF8 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF7 s_store_sk->[ss_store_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF6 c_customer_sk->[ss_customer_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF6 p_promo_sk->[ss_promo_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF5 p_promo_sk->[ss_promo_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF5 s_store_sk->[ss_store_sk] --------------------------------------PhysicalProject ----------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF5 RF6 RF7 RF8 RF10 --------------------------------------PhysicalProject -----------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) -------------------------------------------PhysicalOlapScan[promotion] +----------------------------------------filter((store.s_gmt_offset = -6.00)) +------------------------------------------PhysicalOlapScan[store] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF9 +------------------------------------filter(OR[(promotion.p_channel_dmail = 'Y'),(promotion.p_channel_email = 'Y'),(promotion.p_channel_tv = 'Y')]) +--------------------------------------PhysicalOlapScan[promotion] ------------------------------PhysicalProject ---------------------------------filter((store.s_gmt_offset = -6.00)) -----------------------------------PhysicalOlapScan[store] +--------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2001)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] apply RFs: RF9 ----------------------PhysicalProject ------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------PhysicalOlapScan[customer_address] @@ -46,21 +46,21 @@ PhysicalResultSink ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ss_customer_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------------------------filter((store.s_gmt_offset = -6.00)) +--------------------------------------PhysicalOlapScan[store] ------------------------------PhysicalProject ---------------------------------filter((store.s_gmt_offset = -6.00)) -----------------------------------PhysicalOlapScan[store] +--------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] --------------------------PhysicalProject -----------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2001)) -------------------------------PhysicalOlapScan[date_dim] +----------------------------PhysicalOlapScan[customer] apply RFs: RF3 ----------------------PhysicalProject ------------------------filter((customer_address.ca_gmt_offset = -6.00)) --------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query62.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query62.out index 48210f34fe86e1..0d1062df17e20e 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query62.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query62.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 ws_web_site_sk->[web_site_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 sm_ship_mode_sk->[ws_ship_mode_sk] +------------------------PhysicalOlapScan[web_site] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 ws_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[ws_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[ship_mode] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_site] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter((date_dim.d_month_seq <= 1226) and (date_dim.d_month_seq >= 1215)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query63.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query63.out index 1ad6a72b1612f8..23f371f9df8e1e 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query63.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query63.out @@ -13,19 +13,19 @@ PhysicalResultSink --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------filter(d_month_seq IN (1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222)) -----------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) +----------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store] +----------------------------------filter(d_month_seq IN (1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222)) +------------------------------------PhysicalOlapScan[date_dim] ----------------------------PhysicalProject -------------------------------filter(OR[AND[i_category IN ('Books', 'Children', 'Electronics'),i_class IN ('personal', 'portable', 'reference', 'self-help'),i_brand IN ('exportiunivamalg #9', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9')],AND[i_category IN ('Men', 'Music', 'Women'),i_class IN ('accessories', 'classical', 'fragrances', 'pants'),i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'importoamalg #1')]] and i_brand IN ('amalgimporto #1', 'edu packscholar #1', 'exportiimporto #1', 'exportiunivamalg #9', 'importoamalg #1', 'scholaramalgamalg #14', 'scholaramalgamalg #7', 'scholaramalgamalg #9') and i_category IN ('Books', 'Children', 'Electronics', 'Men', 'Music', 'Women') and i_class IN ('accessories', 'classical', 'fragrances', 'pants', 'personal', 'portable', 'reference', 'self-help')) ---------------------------------PhysicalOlapScan[item] +------------------------------PhysicalOlapScan[store] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query65.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query65.out index 8acaa4ea496595..f4ecad505175f5 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query65.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query65.out @@ -7,35 +7,35 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[s_store_sk,ss_store_sk] -----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF3 i_item_sk->[ss_item_sk] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF2 s_store_sk->[ss_store_sk] -------------------------hashAgg[GLOBAL] ---------------------------PhysicalDistribute[DistributionSpecHash] -----------------------------hashAgg[LOCAL] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 RF2 RF3 RF4 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) ---------------------------------------PhysicalOlapScan[date_dim] -------------------------PhysicalProject ---------------------------PhysicalOlapScan[store] apply RFs: RF4 ---------------------PhysicalProject -----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((sb.ss_store_sk = sc.ss_store_sk)) otherCondition=((cast(revenue as DECIMALV3(38, 5)) <= (0.1 * sb.ave))) build RFs:RF4 ss_store_sk->[ss_store_sk] ----------------hashAgg[GLOBAL] ------------------PhysicalProject --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 RF4 ------------------------------PhysicalProject --------------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) ----------------------------------PhysicalOlapScan[date_dim] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = sc.ss_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] +--------------------PhysicalProject +----------------------PhysicalLazyMaterializeOlapScan[item lazySlots:(item.i_current_price,item.i_wholesale_cost,item.i_brand)] apply RFs: RF2 +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = sc.ss_store_sk)) otherCondition=() build RFs:RF1 ss_store_sk->[s_store_sk] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[store] apply RFs: RF1 +------------------------hashAgg[GLOBAL] +--------------------------PhysicalDistribute[DistributionSpecHash] +----------------------------hashAgg[LOCAL] +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 +----------------------------------PhysicalProject +------------------------------------filter((date_dim.d_month_seq <= 1197) and (date_dim.d_month_seq >= 1186)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query66.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query66.out index a1d83638320768..78c289aee343ba 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query66.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query66.out @@ -20,11 +20,11 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[ws_warehouse_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 ws_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[warehouse] +--------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF2 RF3 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] @@ -44,11 +44,11 @@ PhysicalResultSink ----------------------------------PhysicalProject ------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 w_warehouse_sk->[cs_warehouse_sk] +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF4 cs_warehouse_sk->[w_warehouse_sk] ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 +--------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF4 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[warehouse] +--------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF5 RF6 RF7 --------------------------------------PhysicalProject ----------------------------------------filter((date_dim.d_year = 2001)) ------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query68.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query68.out index 630126cf643027..bd23215f674407 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query68.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query68.out @@ -7,32 +7,34 @@ PhysicalResultSink --------PhysicalDistribute[DistributionSpecGather] ----------PhysicalTopN[LOCAL_SORT] ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = current_addr.ca_address_sk)) otherCondition=(( not (ca_city = bought_city))) build RFs:RF5 ca_address_sk->[c_current_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((dn.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ss_customer_sk] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ss_addr_sk] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ss_addr_sk->[ca_address_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +----------------------------------PhysicalOlapScan[customer_address] apply RFs: RF3 +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[ss_hdemo_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 RF4 +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF4 +--------------------------------------------PhysicalProject +----------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1999, 2000, 2001)) +------------------------------------------------PhysicalOlapScan[date_dim] ----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (1999, 2000, 2001)) ---------------------------------------------PhysicalOlapScan[date_dim] +------------------------------------------filter(s_city IN ('Bethel', 'Pleasant Hill')) +--------------------------------------------PhysicalOlapScan[store] ------------------------------------PhysicalProject ---------------------------------------filter(s_city IN ('Bethel', 'Pleasant Hill')) -----------------------------------------PhysicalOlapScan[store] ---------------------------------PhysicalProject -----------------------------------filter(OR[(household_demographics.hd_dep_count = 4),(household_demographics.hd_vehicle_count = 0)]) -------------------------------------PhysicalOlapScan[household_demographics] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer_address] +--------------------------------------filter(OR[(household_demographics.hd_dep_count = 4),(household_demographics.hd_vehicle_count = 0)]) +----------------------------------------PhysicalOlapScan[household_demographics] --------------------PhysicalProject ----------------------PhysicalLazyMaterializeOlapScan[customer lazySlots:(customer.c_first_name)] apply RFs: RF5 ----------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query69.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query69.out index 115564d2edf45e..259e26cc35c4d8 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query69.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query69.out @@ -9,12 +9,12 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = catalog_sales.cs_ship_customer_sk)) otherCondition=() --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = c.c_current_cdemo_sk)) otherCondition=() build RFs:RF5 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] -----------------------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((c.c_current_addr_sk = ca.ca_address_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +----------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((c.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() ------------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((c.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query7.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query7.out index 82a5672ef981f2..0ca8a686c2c672 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query7.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query7.out @@ -10,21 +10,21 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 ss_item_sk->[i_item_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[ss_cdemo_sk] +------------------------PhysicalOlapScan[item] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF0 cd_demo_sk->[ss_cdemo_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF3 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[item] +--------------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) +----------------------------------PhysicalOlapScan[customer_demographics] --------------------------PhysicalProject -----------------------------filter((customer_demographics.cd_education_status = 'College') and (customer_demographics.cd_gender = 'F') and (customer_demographics.cd_marital_status = 'W')) -------------------------------PhysicalOlapScan[customer_demographics] -----------------------PhysicalProject -------------------------filter((date_dim.d_year = 2001)) ---------------------------PhysicalOlapScan[date_dim] +----------------------------filter((date_dim.d_year = 2001)) +------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------filter(OR[(promotion.p_channel_email = 'N'),(promotion.p_channel_event = 'N')]) ----------------------PhysicalOlapScan[promotion] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query70.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query70.out index 3038640513b88d..962242ecd85a43 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query70.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query70.out @@ -31,11 +31,11 @@ PhysicalResultSink ------------------------------------------PhysicalProject --------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 s_store_sk->[ss_store_sk] +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store.s_store_sk = store_sales.ss_store_sk)) otherCondition=() build RFs:RF0 ss_store_sk->[s_store_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +----------------------------------------------------PhysicalOlapScan[store] apply RFs: RF0 RF2 --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[store] apply RFs: RF2 +----------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ----------------------------------------------PhysicalProject ------------------------------------------------filter((date_dim.d_month_seq <= 1229) and (date_dim.d_month_seq >= 1218)) --------------------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query72.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query72.out index a74beecafbb85a..1bd3a72f0198b3 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query72.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query72.out @@ -8,47 +8,47 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk) and (d1.d_week_seq = d2.d_week_seq)) otherCondition=((cast(d_date as DATETIMEV2(0)) > cast((cast(d_date as BIGINT) + 5) as DATETIMEV2(0)))) build RFs:RF7 d_week_seq->[d_week_seq];RF8 d_date_sk->[cs_sold_date_sk] +----------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() build RFs:RF10 cs_item_sk->[cr_item_sk];RF11 cs_order_number->[cr_order_number] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF6 hd_demo_sk->[cs_bill_hdemo_sk] +--------------------PhysicalOlapScan[catalog_returns] apply RFs: RF10 RF11 +------------------PhysicalProject +--------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF9 cs_promo_sk->[p_promo_sk] +----------------------PhysicalProject +------------------------PhysicalOlapScan[promotion] apply RFs: RF9 ----------------------PhysicalProject -------------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=((cast(d_date as DATETIMEV2(0)) > cast((cast(d_date as BIGINT) + 5) as DATETIMEV2(0)))) build RFs:RF8 cs_ship_date_sk->[d_date_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = d3.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_ship_date_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_week_seq = d2.d_week_seq) and (inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF6 d_week_seq->[d_week_seq];RF7 inv_date_sk->[d_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((inventory.inv_date_sk = d2.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[inv_date_sk] +--------------------------------PhysicalOlapScan[date_dim] apply RFs: RF6 RF7 +------------------------------PhysicalProject +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = d1.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] ----------------------------------PhysicalProject -------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_hdemo_sk = household_demographics.hd_demo_sk)) otherCondition=() build RFs:RF4 hd_demo_sk->[cs_bill_hdemo_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((catalog_returns.cr_item_sk = catalog_sales.cs_item_sk) and (catalog_returns.cr_order_number = catalog_sales.cs_order_number)) otherCondition=() +----------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_cdemo_sk = customer_demographics.cd_demo_sk)) otherCondition=() build RFs:RF3 cd_demo_sk->[cs_bill_cdemo_sk] ------------------------------------------PhysicalProject ---------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk,inv_item_sk] +--------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] +----------------------------------------------PhysicalProject +------------------------------------------------PhysicalOlapScan[item] apply RFs: RF2 ----------------------------------------------PhysicalProject -------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF1 w_warehouse_sk->[inv_warehouse_sk] +------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((warehouse.w_warehouse_sk = inventory.inv_warehouse_sk)) otherCondition=() build RFs:RF1 inv_warehouse_sk->[w_warehouse_sk] --------------------------------------------------PhysicalProject -----------------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 inv_item_sk->[cs_item_sk] -------------------------------------------------------PhysicalProject ---------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF2 RF3 RF5 RF6 RF8 -------------------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF1 RF2 RF4 +----------------------------------------------------PhysicalOlapScan[warehouse] apply RFs: RF1 --------------------------------------------------PhysicalProject -----------------------------------------------------PhysicalOlapScan[warehouse] -----------------------------------------------PhysicalProject -------------------------------------------------PhysicalOlapScan[item] +----------------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = inventory.inv_item_sk)) otherCondition=((inventory.inv_quantity_on_hand < catalog_sales.cs_quantity)) build RFs:RF0 cs_item_sk->[inv_item_sk] +------------------------------------------------------PhysicalOlapScan[inventory] apply RFs: RF0 +------------------------------------------------------PhysicalProject +--------------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 RF4 RF5 ------------------------------------------PhysicalProject ---------------------------------------------PhysicalOlapScan[catalog_returns] +--------------------------------------------filter((customer_demographics.cd_marital_status = 'D')) +----------------------------------------------PhysicalOlapScan[customer_demographics] --------------------------------------PhysicalProject -----------------------------------------filter((customer_demographics.cd_marital_status = 'D')) -------------------------------------------PhysicalOlapScan[customer_demographics] +----------------------------------------filter((household_demographics.hd_buy_potential = '1001-5000')) +------------------------------------------PhysicalOlapScan[household_demographics] ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF7 -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[date_dim] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[promotion] -----------------------PhysicalProject -------------------------filter((household_demographics.hd_buy_potential = '1001-5000')) ---------------------------PhysicalOlapScan[household_demographics] -------------------PhysicalProject ---------------------filter((d1.d_year = 2000)) -----------------------PhysicalOlapScan[date_dim] +------------------------------------filter((d1.d_year = 2000)) +--------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query73.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query73.out index 70d93fd9695e48..d8ce3d8bbc2ba7 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query73.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query73.out @@ -5,7 +5,9 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((dj.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 ss_customer_sk->[c_customer_sk] +------------PhysicalProject +--------------PhysicalOlapScan[customer] apply RFs: RF3 ------------filter((dj.cnt <= 5) and (dj.cnt >= 1)) --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] @@ -17,7 +19,7 @@ PhysicalResultSink ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +----------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 --------------------------------PhysicalProject ----------------------------------filter((date_dim.d_dom <= 2) and (date_dim.d_dom >= 1) and d_year IN (2000, 2001, 2002)) ------------------------------------PhysicalOlapScan[date_dim] @@ -27,6 +29,4 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((household_demographics.hd_vehicle_count > 0) and (if((hd_vehicle_count > 0), (cast(hd_dep_count as DOUBLE) / cast(hd_vehicle_count as DOUBLE)), NULL) > 1.0) and hd_buy_potential IN ('5001-10000', '>10000')) ----------------------------PhysicalOlapScan[household_demographics] -------------PhysicalProject ---------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query74.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query74.out index 9e05ae4a5ee925..93b437b3f4f362 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query74.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query74.out @@ -10,11 +10,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = store_sales.ss_customer_sk)) otherCondition=() build RFs:RF0 ss_customer_sk->[c_customer_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 +------------------------PhysicalOlapScan[customer] apply RFs: RF0 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[store_sales] apply RFs: RF1 ------------------PhysicalProject --------------------filter(d_year IN (1998, 1999)) ----------------------PhysicalOlapScan[date_dim] @@ -25,11 +25,11 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ws_sold_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ws_bill_customer_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_customer_sk = web_sales.ws_bill_customer_sk)) otherCondition=() build RFs:RF2 ws_bill_customer_sk->[c_customer_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 +------------------------PhysicalOlapScan[customer] apply RFs: RF2 ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] +------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter(d_year IN (1998, 1999)) ----------------------PhysicalOlapScan[date_dim] @@ -38,12 +38,12 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), NULL) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] +------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_firstyear.customer_id = t_w_secyear.customer_id)) otherCondition=((if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), NULL) > if((year_total > 0.00), (cast(year_total as DECIMALV3(38, 8)) / year_total), NULL))) build RFs:RF6 customer_id->[customer_id] --------------PhysicalProject ----------------filter((t_w_secyear.sale_type = 'w') and (t_w_secyear.year = 1999)) ------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((t_s_firstyear.customer_id = t_w_firstyear.customer_id)) otherCondition=() build RFs:RF5 customer_id->[customer_id,customer_id] ------------------hashJoin[INNER_JOIN shuffle] hashCondition=((t_s_secyear.customer_id = t_s_firstyear.customer_id)) otherCondition=() build RFs:RF4 customer_id->[customer_id] --------------------PhysicalProject ----------------------filter((t_s_secyear.sale_type = 's') and (t_s_secyear.year = 1999)) diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query75.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query75.out index b45f54f94a72ed..b8b723b0a50f39 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query75.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query75.out @@ -3,68 +3,61 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----hashAgg[GLOBAL] -------PhysicalDistribute[DistributionSpecHash] ---------hashAgg[LOCAL] -----------hashAgg[GLOBAL] -------------hashAgg[LOCAL] ---------------PhysicalUnion -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[catalog_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Sports')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (2000, 2001)) -------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[store_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Sports')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (2000, 2001)) -------------------------------PhysicalOlapScan[date_dim] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_returns] -------------------------------PhysicalProject ---------------------------------filter((item.i_category = 'Sports')) -----------------------------------PhysicalOlapScan[item] ---------------------------PhysicalProject -----------------------------filter(d_year IN (2000, 2001)) -------------------------------PhysicalOlapScan[date_dim] +------hashAgg[GLOBAL] +--------PhysicalDistribute[DistributionSpecHash] +----------hashAgg[LOCAL] +------------PhysicalUnion +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = catalog_sales.cs_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cs_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = catalog_sales.cs_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[cs_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (2000, 2001)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[catalog_returns] +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = store_sales.ss_sold_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[ss_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = store_sales.ss_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF3 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (2000, 2001)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[store_returns] +--------------PhysicalDistribute[DistributionSpecExecutionAny] +----------------PhysicalProject +------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((date_dim.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ws_item_sk] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 +----------------------------PhysicalProject +------------------------------filter((item.i_category = 'Sports')) +--------------------------------PhysicalOlapScan[item] +------------------------PhysicalProject +--------------------------filter(d_year IN (2000, 2001)) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------PhysicalOlapScan[web_returns] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query76.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query76.out index e7b8d0959016bf..b111474efaef5d 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query76.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query76.out @@ -12,28 +12,28 @@ PhysicalResultSink ------------------PhysicalUnion --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ss_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF0 ss_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------filter(ss_customer_sk IS NULL) -------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(ss_customer_sk IS NULL) +------------------------------PhysicalOlapScan[store_sales] apply RFs: RF3 --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF1 ws_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------filter(ws_ship_addr_sk IS NULL) -------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF1 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(ws_ship_addr_sk IS NULL) +------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 --------------------PhysicalDistribute[DistributionSpecExecutionAny] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[cs_item_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 cs_item_sk->[i_item_sk] --------------------------PhysicalProject -----------------------------filter(cs_ship_mode_sk IS NULL) -------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 +----------------------------PhysicalOlapScan[item] apply RFs: RF2 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[item] +----------------------------filter(cs_ship_mode_sk IS NULL) +------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject --------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query78.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query78.out index 7634bed6b90645..ca587d029056c9 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query78.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query78.out @@ -14,16 +14,16 @@ PhysicalResultSink ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] +--------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((store_returns.sr_ticket_number = store_sales.ss_ticket_number) and (store_sales.ss_item_sk = store_returns.sr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_year = 2001)) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------------------PhysicalOlapScan[store_returns] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[store_returns] +--------------------------------filter((date_dim.d_year = 2001)) +----------------------------------PhysicalOlapScan[date_dim] ------------------PhysicalProject --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] @@ -31,7 +31,7 @@ PhysicalResultSink --------------------------PhysicalProject ----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] ------------------------------PhysicalProject ---------------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() +--------------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((web_returns.wr_order_number = web_sales.ws_order_number) and (web_sales.ws_item_sk = web_returns.wr_item_sk)) otherCondition=() ----------------------------------PhysicalProject ------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF1 ----------------------------------PhysicalProject @@ -46,7 +46,7 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject -----------------------------hashJoin[LEFT_ANTI_JOIN shuffle] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() +----------------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((catalog_returns.cr_order_number = catalog_sales.cs_order_number) and (catalog_sales.cs_item_sk = catalog_returns.cr_item_sk)) otherCondition=() ------------------------------PhysicalProject --------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 ------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query79.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query79.out index 3de405496a1870..c7730242fdb2fc 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query79.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query79.out @@ -5,7 +5,7 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((ms.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[ss_customer_sk] ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecHash] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query8.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query8.out index 9f0c46970cecdf..f7c11803029e94 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query8.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query8.out @@ -22,26 +22,22 @@ PhysicalResultSink ------------------------PhysicalOlapScan[store] ------------------PhysicalProject --------------------PhysicalIntersect RFV2: RF3[ca_zip->substring(ca_zip, 1, 5)] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((cnt > 10)) ---------------------------------hashAgg[GLOBAL] -----------------------------------PhysicalDistribute[DistributionSpecHash] -------------------------------------hashAgg[LOCAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +----------------------------PhysicalOlapScan[customer_address] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------PhysicalProject +--------------------------filter((cnt > 10)) +----------------------------hashAgg[GLOBAL] +------------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------------hashAgg[LOCAL] +----------------------------------PhysicalProject +------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] --------------------------------------PhysicalProject -----------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] -------------------------------------------PhysicalProject ---------------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) -----------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 -------------------------------------------PhysicalProject ---------------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) -----------------------------------------------PhysicalOlapScan[customer_address] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecHash] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) ---------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 +----------------------------------------filter((customer.c_preferred_cust_flag = 'Y')) +------------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------------PhysicalProject +----------------------------------------filter(substring(ca_zip, 1, 5) IN ('10298', '10374', '10425', '11340', '11489', '11618', '11652', '11686', '11855', '11912', '12197', '12318', '12320', '12350', '13086', '13123', '13261', '13338', '13376', '13378', '13443', '13844', '13869', '13918', '14073', '14155', '14196', '14242', '14312', '14440', '14530', '14851', '15371', '15475', '15543', '15734', '15751', '15782', '15794', '16005', '16226', '16364', '16515', '16704', '16791', '16891', '17167', '17193', '17291', '17672', '17819', '17879', '17895', '18218', '18360', '18367', '18410', '18421', '18434', '18569', '18700', '18767', '18829', '18884', '19326', '19444', '19489', '19753', '19833', '19988', '20244', '20317', '20534', '20601', '20712', '21060', '21094', '21204', '21231', '21343', '21727', '21800', '21814', '22728', '22815', '22911', '23065', '23952', '24227', '24255', '24286', '24594', '24660', '24891', '24987', '25115', '25178', '25214', '25264', '25333', '25494', '25717', '25973', '26217', '26689', '27052', '27116', '27156', '27287', '27369', '27385', '27413', '27642', '27700', '28055', '28239', '28571', '28577', '28810', '29086', '29392', '29450', '29752', '29818', '30106', '30415', '30621', '31013', '31016', '31655', '31830', '32489', '32669', '32754', '32919', '32958', '32961', '33113', '33122', '33159', '33467', '33562', '33773', '33869', '34306', '34473', '34594', '34948', '34972', '35076', '35390', '35834', '35863', '35926', '36201', '36335', '36430', '36479', '37119', '37788', '37914', '38353', '38607', '38919', '39214', '39459', '39500', '39503', '40146', '40936', '40979', '41162', '41232', '41255', '41331', '41351', '41352', '41419', '41807', '41836', '41967', '42361', '43432', '43639', '43830', '43933', '44529', '45266', '45484', '45533', '45645', '45676', '45859', '46081', '46131', '46507', '47289', '47369', '47529', '47602', '47770', '48017', '48162', '48333', '48530', '48567', '49101', '49130', '49140', '49211', '49230', '49254', '49472', '50412', '50632', '50636', '50679', '50788', '51089', '51184', '51195', '51634', '51717', '51766', '51782', '51793', '51933', '52094', '52301', '52389', '52868', '53163', '53535', '53565', '54010', '54207', '54364', '54558', '54585', '55233', '55349', '56224', '56355', '56436', '56455', '56600', '56877', '57025', '57553', '57631', '57649', '57839', '58032', '58058', '58062', '58117', '58218', '58412', '58454', '58581', '59004', '59080', '59130', '59226', '59345', '59386', '59494', '59852', '60083', '60298', '60560', '60624', '60736', '61527', '61794', '61860', '61997', '62361', '62585', '62878', '63073', '63180', '63193', '63294', '63792', '63991', '64592', '65148', '65177', '65501', '66057', '66943', '67881', '67975', '67998', '68101', '68293', '68341', '68605', '68730', '68770', '68843', '68852', '68908', '69280', '69952', '69998', '70041', '70070', '70073', '70450', '71144', '71256', '71286', '71836', '71948', '71954', '71997', '72592', '72991', '73021', '73108', '73134', '73146', '73219', '73873', '74686', '75660', '75675', '75742', '75752', '77454', '77817', '78093', '78366', '79077', '79658', '80332', '80846', '81003', '81070', '81084', '81335', '81504', '81755', '81963', '82080', '82602', '82620', '83041', '83086', '83583', '83647', '83833', '83910', '83986', '84247', '84680', '84844', '84919', '85066', '85761', '86057', '86379', '86709', '88086', '88137', '88217', '89193', '89338', '90209', '90229', '90669', '91110', '91894', '92292', '92380', '92645', '92696', '93498', '94791', '94835', '94898', '95042', '95430', '95464', '95694', '96435', '96560', '97173', '97462', '98069', '98072', '98338', '98533', '98569', '98584', '98862', '99060', '99132')) +------------------------------------------PhysicalOlapScan[customer_address] RFV2: RF3 diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query80.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query80.out index 8805cfd6e7362c..d0d053c72936f9 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query80.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query80.out @@ -15,53 +15,53 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF5 p_promo_sk->[ss_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF3 p_promo_sk->[ss_promo_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF4 i_item_sk->[ss_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF3 ss_store_sk->[s_store_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_store_sk = store.s_store_sk)) otherCondition=() build RFs:RF1 s_store_sk->[ss_store_sk] +------------------------------------------PhysicalOlapScan[store] apply RFs: RF3 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ss_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = store_returns.sr_item_sk) and (store_sales.ss_ticket_number = store_returns.sr_ticket_number)) otherCondition=() build RFs:RF0 ss_item_sk->[sr_item_sk];RF1 ss_ticket_number->[sr_ticket_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------------------------PhysicalOlapScan[store_returns] apply RFs: RF0 RF1 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '2002-09-05') and (date_dim.d_date >= '2002-08-06')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[store_sales] apply RFs: RF2 RF4 RF5 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[store] -----------------------------------------PhysicalProject -------------------------------------------filter((item.i_current_price > 50.00)) ---------------------------------------------PhysicalOlapScan[item] +----------------------------------------------filter((date_dim.d_date <= '2002-09-05') and (date_dim.d_date >= '2002-08-06')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject ---------------------------------------filter((promotion.p_channel_tv = 'N')) -----------------------------------------PhysicalOlapScan[promotion] +--------------------------------------filter((item.i_current_price > 50.00)) +----------------------------------------PhysicalOlapScan[item] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] +----------------------------------filter((promotion.p_channel_tv = 'N')) +------------------------------------PhysicalOlapScan[promotion] --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF7 p_promo_sk->[cs_promo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[cs_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cs_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[cs_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[cs_sold_date_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF9 cs_catalog_page_sk->[cp_catalog_page_sk] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[catalog_page] apply RFs: RF9 ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_catalog_page_sk = catalog_page.cp_catalog_page_sk)) otherCondition=() build RFs:RF4 cp_catalog_page_sk->[cs_catalog_page_sk] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[cs_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((catalog_sales.cs_item_sk = catalog_returns.cr_item_sk) and (catalog_sales.cs_order_number = catalog_returns.cr_order_number)) otherCondition=() build RFs:RF6 cs_item_sk->[cr_item_sk];RF7 cs_order_number->[cr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF4 RF5 RF6 RF7 +--------------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[catalog_returns] +--------------------------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF8 RF10 RF11 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[catalog_page] -----------------------------------------PhysicalProject -------------------------------------------filter((date_dim.d_date <= '2002-09-05') and (date_dim.d_date >= '2002-08-06')) ---------------------------------------------PhysicalOlapScan[date_dim] +----------------------------------------------filter((date_dim.d_date <= '2002-09-05') and (date_dim.d_date >= '2002-08-06')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject --------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------PhysicalOlapScan[item] @@ -73,24 +73,24 @@ PhysicalResultSink ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF11 p_promo_sk->[ws_promo_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_promo_sk = promotion.p_promo_sk)) otherCondition=() build RFs:RF17 p_promo_sk->[ws_promo_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[ws_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF16 i_item_sk->[ws_item_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[LEFT_OUTER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF15 ws_web_site_sk->[web_site_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF9 web_site_sk->[ws_web_site_sk] +------------------------------------------PhysicalOlapScan[web_site] apply RFs: RF15 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF14 d_date_sk->[ws_sold_date_sk] --------------------------------------------PhysicalProject -----------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF8 d_date_sk->[ws_sold_date_sk] +----------------------------------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF12 ws_item_sk->[wr_item_sk];RF13 ws_order_number->[wr_order_number] ------------------------------------------------PhysicalProject ---------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 RF9 RF10 RF11 +--------------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 RF13 ------------------------------------------------PhysicalProject ---------------------------------------------------filter((date_dim.d_date <= '2002-09-05') and (date_dim.d_date >= '2002-08-06')) -----------------------------------------------------PhysicalOlapScan[date_dim] +--------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF14 RF16 RF17 --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[web_site] -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_returns] +----------------------------------------------filter((date_dim.d_date <= '2002-09-05') and (date_dim.d_date >= '2002-08-06')) +------------------------------------------------PhysicalOlapScan[date_dim] ------------------------------------PhysicalProject --------------------------------------filter((item.i_current_price > 50.00)) ----------------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query81.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query81.out index 887315b443ab47..cfc028708172da 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query81.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query81.out @@ -7,35 +7,33 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --------PhysicalDistribute[DistributionSpecHash] ----------hashAgg[LOCAL] ------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[cr_returning_addr_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[cr_returning_addr_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[cr_returned_date_sk] --------------------PhysicalProject ----------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 --------------------PhysicalProject -----------------------PhysicalOlapScan[customer_address] +----------------------filter((date_dim.d_year = 1998)) +------------------------PhysicalOlapScan[date_dim] ----------------PhysicalProject -------------------filter((date_dim.d_year = 1998)) ---------------------PhysicalOlapScan[date_dim] +------------------PhysicalOlapScan[customer_address] --PhysicalResultSink ----PhysicalTopN[MERGE_SORT] ------PhysicalDistribute[DistributionSpecGather] --------PhysicalTopN[LOCAL_SORT] ----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF4 ca_address_sk->[c_current_addr_sk] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF4 ctr_state->[ctr_state] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((ctr1.ctr_state = ctr2.ctr_state)) otherCondition=((cast(ctr_total_return as DECIMALV3(38, 5)) > (avg(cast(ctr_total_return as DECIMALV3(38, 4))) * 1.2))) build RFs:RF3 ctr_state->[ctr_state] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[ctr_customer_sk] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ctr1.ctr_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 ctr_customer_sk->[c_customer_sk] ----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] apply RFs: RF4 -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalDistribute[DistributionSpecExecutionAny] ---------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) ---------------PhysicalProject -----------------filter((customer_address.ca_state = 'TX')) -------------------PhysicalOlapScan[customer_address] +------------------------PhysicalOlapScan[customer] apply RFs: RF2 RF3 +----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF4 +------------------PhysicalProject +--------------------filter((customer_address.ca_state = 'TX')) +----------------------PhysicalOlapScan[customer_address] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalCteConsumer ( cteId=CTEId#0 ) diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query82.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query82.out index 1c36a3b82fb29e..bac260378d9eb7 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query82.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query82.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[ss_item_sk] ------------------PhysicalProject --------------------PhysicalOlapScan[store_sales] apply RFs: RF2 ------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query83.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query83.out index e5be6405f585a7..c6226dffced0f3 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query83.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query83.out @@ -5,32 +5,32 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------PhysicalProject -----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id,i_item_id] +----------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = wr_items.item_id)) otherCondition=() build RFs:RF13 item_id->[i_item_id] ------------PhysicalProject ---------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF12 item_id->[i_item_id] -----------------PhysicalProject -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] +--------------hashAgg[GLOBAL] +----------------PhysicalDistribute[DistributionSpecHash] +------------------hashAgg[LOCAL] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF12 d_date_sk->[wr_returned_date_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF11 d_date_sk->[sr_returned_date_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF11 wr_item_sk->[i_item_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF10 i_item_sk->[sr_item_sk] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF10 RF11 ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF12 RF13 +------------------------------PhysicalOlapScan[item] apply RFs: RF11 RF13 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF9 d_date->[d_date] +------------------------------PhysicalOlapScan[web_returns] apply RFs: RF12 +------------------------PhysicalProject +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF10 d_date->[d_date] +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[date_dim] apply RFs: RF10 +----------------------------PhysicalProject +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF9 d_week_seq->[d_week_seq] --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF9 --------------------------------PhysicalProject -----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF8 d_week_seq->[d_week_seq] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF8 -------------------------------------PhysicalProject ---------------------------------------filter(d_date IN ('2000-06-17', '2000-08-22', '2000-11-17')) -----------------------------------------PhysicalOlapScan[date_dim] +----------------------------------filter(d_date IN ('2000-06-17', '2000-08-22', '2000-11-17')) +------------------------------------PhysicalOlapScan[date_dim] +------------PhysicalProject +--------------hashJoin[INNER_JOIN colocated] hashCondition=((sr_items.item_id = cr_items.item_id)) otherCondition=() build RFs:RF8 item_id->[i_item_id] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] @@ -38,11 +38,11 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF7 d_date_sk->[cr_returned_date_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 i_item_sk->[cr_item_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF6 cr_item_sk->[i_item_sk] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF6 RF7 +----------------------------------PhysicalOlapScan[item] apply RFs: RF6 RF8 --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[item] apply RFs: RF13 +----------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF7 ----------------------------PhysicalProject ------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF5 d_date->[d_date] --------------------------------PhysicalProject @@ -54,27 +54,27 @@ PhysicalResultSink ------------------------------------PhysicalProject --------------------------------------filter(d_date IN ('2000-06-17', '2000-08-22', '2000-11-17')) ----------------------------------------PhysicalOlapScan[date_dim] -------------PhysicalProject ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[wr_returned_date_sk] -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 i_item_sk->[wr_item_sk] -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[web_returns] apply RFs: RF2 RF3 -----------------------------PhysicalProject -------------------------------PhysicalOlapScan[item] +----------------PhysicalProject +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecHash] +----------------------hashAgg[LOCAL] ------------------------PhysicalProject ---------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[sr_returned_date_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = item.i_item_sk)) otherCondition=() build RFs:RF2 sr_item_sk->[i_item_sk] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[item] apply RFs: RF2 +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[store_returns] apply RFs: RF3 ----------------------------PhysicalProject -------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_date = date_dim.d_date)) otherCondition=() build RFs:RF1 d_date->[d_date] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 +----------------------------------PhysicalOlapScan[date_dim] apply RFs: RF1 --------------------------------PhysicalProject -----------------------------------filter(d_date IN ('2000-06-17', '2000-08-22', '2000-11-17')) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((date_dim.d_week_seq = date_dim.d_week_seq)) otherCondition=() build RFs:RF0 d_week_seq->[d_week_seq] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[date_dim] apply RFs: RF0 +------------------------------------PhysicalProject +--------------------------------------filter(d_date IN ('2000-06-17', '2000-08-22', '2000-11-17')) +----------------------------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query84.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query84.out index 8a35f6f150fea9..5e664a57bfe173 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query84.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query84.out @@ -11,20 +11,20 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[INNER_JOIN broadcast] hashCondition=((income_band.ib_income_band_sk = household_demographics.hd_income_band_sk)) otherCondition=() build RFs:RF3 ib_income_band_sk->[hd_income_band_sk] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 hd_demo_sk->[c_current_hdemo_sk] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((household_demographics.hd_demo_sk = customer.c_current_hdemo_sk)) otherCondition=() build RFs:RF2 c_current_hdemo_sk->[hd_demo_sk] +--------------------PhysicalProject +----------------------PhysicalOlapScan[household_demographics] apply RFs: RF2 RF3 --------------------PhysicalProject ----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_demographics.cd_demo_sk = customer.c_current_cdemo_sk)) otherCondition=() build RFs:RF1 cd_demo_sk->[c_current_cdemo_sk] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_current_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF0 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 RF2 +------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF1 ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_city = 'Hopewell')) --------------------------------PhysicalOlapScan[customer_address] ------------------------PhysicalProject --------------------------PhysicalOlapScan[customer_demographics] ---------------------PhysicalProject -----------------------PhysicalOlapScan[household_demographics] apply RFs: RF3 ----------------PhysicalProject ------------------filter((income_band.ib_lower_bound >= 37855) and (income_band.ib_upper_bound <= 87855)) --------------------PhysicalOlapScan[income_band] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query85.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query85.out index 4496c97b3fd7a8..7b9d21d2f22f32 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query85.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query85.out @@ -19,16 +19,16 @@ PhysicalResultSink --------------------------------PhysicalProject ----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((cd1.cd_demo_sk = web_returns.wr_refunded_cdemo_sk)) otherCondition=(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree'),(web_sales.ws_sales_price >= 100.00),(web_sales.ws_sales_price <= 150.00)],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'College'),(web_sales.ws_sales_price <= 100.00)],AND[(cd1.cd_marital_status = 'D'),(cd1.cd_education_status = 'Secondary'),(web_sales.ws_sales_price >= 150.00)]]) build RFs:RF3 cd_demo_sk->[wr_refunded_cdemo_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 wp_web_page_sk->[ws_web_page_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_web_page_sk = web_page.wp_web_page_sk)) otherCondition=() build RFs:RF2 ws_web_page_sk->[wp_web_page_sk] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] +------------------------------------------PhysicalOlapScan[web_page] apply RFs: RF2 +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_item_sk = web_returns.wr_item_sk) and (web_sales.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF0 ws_item_sk->[wr_item_sk];RF1 ws_order_number->[wr_order_number] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[web_returns] apply RFs: RF0 RF1 RF3 RF4 RF7 RF9 --------------------------------------------PhysicalProject ----------------------------------------------filter((web_sales.ws_net_profit <= 300.00) and (web_sales.ws_net_profit >= 50.00) and (web_sales.ws_sales_price <= 200.00) and (web_sales.ws_sales_price >= 50.00)) -------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF8 -----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[web_page] +------------------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF8 ------------------------------------PhysicalProject --------------------------------------filter(OR[AND[(cd1.cd_marital_status = 'M'),(cd1.cd_education_status = '4 yr Degree')],AND[(cd1.cd_marital_status = 'S'),(cd1.cd_education_status = 'College')],AND[(cd1.cd_marital_status = 'D'),(cd1.cd_education_status = 'Secondary')]] and cd_education_status IN ('4 yr Degree', 'College', 'Secondary') and cd_marital_status IN ('D', 'M', 'S')) ----------------------------------------PhysicalOlapScan[customer_demographics] apply RFs: RF5 RF6 diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query86.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query86.out index 5173961b93d094..8b6b0e20a6f4d3 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query86.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query86.out @@ -15,14 +15,14 @@ PhysicalResultSink ------------------------hashAgg[LOCAL] --------------------------PhysicalRepeat ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ws_sold_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF1 i_item_sk->[ws_item_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((item.i_item_sk = web_sales.ws_item_sk)) otherCondition=() build RFs:RF0 i_item_sk->[ws_item_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((d1.d_date_sk = web_sales.ws_sold_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_sold_date_sk] ------------------------------------PhysicalProject --------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[item] +--------------------------------------filter((d1.d_month_seq <= 1226) and (d1.d_month_seq >= 1215)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((d1.d_month_seq <= 1226) and (d1.d_month_seq >= 1215)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[item] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query87.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query87.out index 995578ba1f269c..d59bbc8361b23b 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query87.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query87.out @@ -5,47 +5,47 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------hashAgg[LOCAL] --------PhysicalProject -----------PhysicalExcept +----------PhysicalExcept RFV2: RF6[c_last_name->c_last_name] RF7[c_last_name->c_last_name] ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[ss_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[ss_customer_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_sales.ss_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF0 c_customer_sk->[ss_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_sales.ss_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ss_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF3 c_customer_sk->[cs_bill_customer_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_sales.cs_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cs_bill_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cs_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF2 RF3 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] RFV2: RF6 ------------hashAgg[GLOBAL] --------------PhysicalDistribute[DistributionSpecHash] ----------------hashAgg[LOCAL] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF5 d_date_sk->[ws_sold_date_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF5 c_customer_sk->[ws_bill_customer_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_sales.ws_bill_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF4 c_customer_sk->[ws_bill_customer_sk] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_sales.ws_sold_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_sold_date_sk] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[web_sales] apply RFs: RF4 RF5 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] +----------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) +------------------------------PhysicalOlapScan[date_dim] ----------------------PhysicalProject -------------------------filter((date_dim.d_month_seq <= 1232) and (date_dim.d_month_seq >= 1221)) ---------------------------PhysicalOlapScan[date_dim] +------------------------PhysicalOlapScan[customer] RFV2: RF7 diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query9.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query9.out index c6d5dd064ce48b..f159ed97647895 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query9.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query9.out @@ -18,15 +18,15 @@ PhysicalResultSink ------------------------------NestedLoopJoin[CROSS_JOIN] --------------------------------PhysicalProject ----------------------------------NestedLoopJoin[CROSS_JOIN] -------------------------------------PhysicalProject ---------------------------------------filter((reason.r_reason_sk = 1)) -----------------------------------------PhysicalOlapScan[reason] ------------------------------------hashAgg[GLOBAL] --------------------------------------PhysicalDistribute[DistributionSpecGather] ----------------------------------------hashAgg[LOCAL] ------------------------------------------PhysicalProject --------------------------------------------filter((store_sales.ss_quantity <= 20) and (store_sales.ss_quantity >= 1)) ----------------------------------------------PhysicalOlapScan[store_sales] +------------------------------------PhysicalProject +--------------------------------------filter((reason.r_reason_sk = 1)) +----------------------------------------PhysicalOlapScan[reason] --------------------------------hashAgg[GLOBAL] ----------------------------------PhysicalDistribute[DistributionSpecGather] ------------------------------------hashAgg[LOCAL] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query91.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query91.out index 15a09077f4ccd5..f66eb35fb1f129 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query91.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query91.out @@ -15,20 +15,20 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer_address.ca_address_sk = customer.c_current_addr_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[c_current_addr_sk] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[cr_returned_date_sk] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF2 c_customer_sk->[cr_returning_customer_sk] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((catalog_returns.cr_returning_customer_sk = customer.c_customer_sk)) otherCondition=() build RFs:RF1 c_customer_sk->[cr_returning_customer_sk] +----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_returned_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF1 d_date_sk->[cr_returned_date_sk] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cc_call_center_sk->[cr_call_center_sk] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_returns.cr_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF0 cr_call_center_sk->[cc_call_center_sk] ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF0 RF1 RF2 +------------------------------------------PhysicalOlapScan[call_center] apply RFs: RF0 ----------------------------------------PhysicalProject -------------------------------------------PhysicalOlapScan[call_center] +------------------------------------------PhysicalOlapScan[catalog_returns] apply RFs: RF1 RF2 ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 +--------------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) +----------------------------------------PhysicalOlapScan[date_dim] --------------------------------PhysicalProject -----------------------------------filter((date_dim.d_moy = 12) and (date_dim.d_year = 2000)) -------------------------------------PhysicalOlapScan[date_dim] +----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 RF5 ----------------------------PhysicalProject ------------------------------filter((customer_address.ca_gmt_offset = -7.00)) --------------------------------PhysicalOlapScan[customer_address] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query93.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query93.out index ea2a35bae4e88b..6ca53877369063 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query93.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query93.out @@ -10,7 +10,7 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_reason_sk = reason.r_reason_sk)) otherCondition=() build RFs:RF2 r_reason_sk->[sr_reason_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF0 sr_item_sk->[ss_item_sk];RF1 sr_ticket_number->[ss_ticket_number] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((store_returns.sr_item_sk = store_sales.ss_item_sk) and (store_returns.sr_ticket_number = store_sales.ss_ticket_number)) otherCondition=() build RFs:RF0 sr_item_sk->[ss_item_sk];RF1 sr_ticket_number->[ss_ticket_number] ----------------------PhysicalProject ------------------------PhysicalOlapScan[store_sales] apply RFs: RF0 RF1 ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query94.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query94.out index 2f12dce9e26230..6d3ac90445a2c7 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query94.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query94.out @@ -3,33 +3,31 @@ PhysicalResultSink --PhysicalLimit[GLOBAL] ----PhysicalLimit[LOCAL] -------hashAgg[DISTINCT_GLOBAL] +------hashAgg[GLOBAL] --------PhysicalDistribute[DistributionSpecGather] -----------hashAgg[DISTINCT_LOCAL] -------------hashAgg[GLOBAL] ---------------hashAgg[LOCAL] -----------------hashJoin[LEFT_ANTI_JOIN bucketShuffle] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() -------------------PhysicalProject ---------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF3 ws_order_number->[ws_order_number] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF2 web_site_sk->[ws_web_site_sk] +----------hashAgg[GLOBAL] +------------PhysicalProject +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk] +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] +------------------------hashJoin[RIGHT_ANTI_JOIN shuffleBucket] hashCondition=((ws1.ws_order_number = wr1.wr_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF1 ca_address_sk->[ws_ship_addr_sk] +----------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] ------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF0 d_date_sk->[ws_ship_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 RF1 RF2 RF3 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '1999-05-31') and (date_dim.d_date >= '1999-04-01')) ---------------------------------------PhysicalOlapScan[date_dim] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------filter((customer_address.ca_state = 'NE')) -----------------------------------PhysicalOlapScan[customer_address] ---------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] -----------------------PhysicalProject -------------------------PhysicalOlapScan[web_sales] -------------------PhysicalProject ---------------------PhysicalOlapScan[web_returns] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 +------------------------PhysicalProject +--------------------------filter((date_dim.d_date <= '1999-05-31') and (date_dim.d_date >= '1999-04-01')) +----------------------------PhysicalOlapScan[date_dim] +--------------------PhysicalProject +----------------------filter((customer_address.ca_state = 'NE')) +------------------------PhysicalOlapScan[customer_address] +----------------PhysicalProject +------------------filter((web_site.web_company_name = 'pri')) +--------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query95.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query95.out index 140ec5cb678d55..15211e4f78cde1 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query95.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query95.out @@ -3,42 +3,40 @@ PhysicalCteAnchor ( cteId=CTEId#0 ) --PhysicalCteProducer ( cteId=CTEId#0 ) ----PhysicalProject -------hashJoin[INNER_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] +------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_order_number = ws2.ws_order_number)) otherCondition=(( not (ws_warehouse_sk = ws_warehouse_sk))) build RFs:RF0 ws_order_number->[ws_order_number] --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF0 RF7 +----------PhysicalOlapScan[web_sales] apply RFs: RF0 --------PhysicalProject -----------PhysicalOlapScan[web_sales] apply RFs: RF7 +----------PhysicalOlapScan[web_sales] --PhysicalResultSink ----PhysicalLimit[GLOBAL] ------PhysicalLimit[LOCAL] ---------hashAgg[DISTINCT_GLOBAL] +--------hashAgg[GLOBAL] ----------PhysicalDistribute[DistributionSpecGather] -------------hashAgg[DISTINCT_LOCAL] ---------------hashAgg[GLOBAL] -----------------hashAgg[LOCAL] -------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF6 wr_order_number->[ws_order_number,ws_order_number] ---------------------hashJoin[LEFT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF5 ws_order_number->[ws_order_number] +------------hashAgg[GLOBAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF6 web_site_sk->[ws_web_site_sk] +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF5 ca_address_sk->[ws_ship_addr_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_web_site_sk = web_site.web_site_sk)) otherCondition=() build RFs:RF4 web_site_sk->[ws_web_site_sk] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_addr_sk = customer_address.ca_address_sk)) otherCondition=() build RFs:RF3 ca_address_sk->[ws_ship_addr_sk] -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF2 d_date_sk->[ws_ship_date_sk] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[web_sales] apply RFs: RF2 RF3 RF4 RF5 RF6 -----------------------------------PhysicalProject -------------------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) ---------------------------------------PhysicalOlapScan[date_dim] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((ws1.ws_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF4 d_date_sk->[ws_ship_date_sk] +--------------------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((ws1.ws_order_number = web_returns.wr_order_number)) otherCondition=() build RFs:RF3 wr_order_number->[ws_order_number,ws_order_number] +----------------------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((ws1.ws_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF2 ws_order_number->[ws_order_number] +------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF2 RF3 ------------------------------PhysicalProject ---------------------------------filter((customer_address.ca_state = 'AL')) -----------------------------------PhysicalOlapScan[customer_address] +--------------------------------PhysicalOlapScan[web_sales] apply RFs: RF3 RF4 RF5 RF6 +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF1 ws_order_number->[wr_order_number] +--------------------------------PhysicalProject +----------------------------------PhysicalOlapScan[web_returns] apply RFs: RF1 +--------------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) --------------------------PhysicalProject -----------------------------filter((web_site.web_company_name = 'pri')) -------------------------------PhysicalOlapScan[web_site] -----------------------PhysicalCteConsumer ( cteId=CTEId#0 ) apply RFs: RF6 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((web_returns.wr_order_number = ws_wh.ws_order_number)) otherCondition=() build RFs:RF7 wr_order_number->[ws_order_number,ws_order_number] -------------------------PhysicalCteConsumer ( cteId=CTEId#0 ) -------------------------PhysicalProject ---------------------------PhysicalOlapScan[web_returns] +----------------------------filter((date_dim.d_date <= '2002-05-31') and (date_dim.d_date >= '2002-04-01')) +------------------------------PhysicalOlapScan[date_dim] +----------------------PhysicalProject +------------------------filter((customer_address.ca_state = 'AL')) +--------------------------PhysicalOlapScan[customer_address] +------------------PhysicalProject +--------------------filter((web_site.web_company_name = 'pri')) +----------------------PhysicalOlapScan[web_site] diff --git a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query99.out b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query99.out index d9bb469d649b59..475fc510ac5c7b 100644 --- a/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query99.out +++ b/regression-test/data/shape_check/tpcds_sf10t_orc/shape/query99.out @@ -10,19 +10,19 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_date_sk = date_dim.d_date_sk)) otherCondition=() build RFs:RF3 d_date_sk->[cs_ship_date_sk] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cc_call_center_sk->[cs_call_center_sk] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_call_center_sk = call_center.cc_call_center_sk)) otherCondition=() build RFs:RF2 cs_call_center_sk->[cc_call_center_sk] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 sm_ship_mode_sk->[cs_ship_mode_sk] +------------------------PhysicalOlapScan[call_center] apply RFs: RF2 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_ship_mode_sk = ship_mode.sm_ship_mode_sk)) otherCondition=() build RFs:RF1 cs_ship_mode_sk->[sm_ship_mode_sk] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[ship_mode] apply RFs: RF1 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 w_warehouse_sk->[cs_warehouse_sk] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((catalog_sales.cs_warehouse_sk = warehouse.w_warehouse_sk)) otherCondition=() build RFs:RF0 cs_warehouse_sk->[w_warehouse_sk] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF0 RF1 RF2 RF3 +--------------------------------PhysicalOlapScan[warehouse] apply RFs: RF0 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[warehouse] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[ship_mode] -----------------------PhysicalProject -------------------------PhysicalOlapScan[call_center] +--------------------------------PhysicalOlapScan[catalog_sales] apply RFs: RF3 ------------------PhysicalProject --------------------filter((date_dim.d_month_seq <= 1189) and (date_dim.d_month_seq >= 1178)) ----------------------PhysicalOlapScan[date_dim] diff --git a/regression-test/data/shape_check/tpch_sf1000/hint/q14.out b/regression-test/data/shape_check/tpch_sf1000/hint/q14.out index 5acf4ce223f7ff..31800215ff6ea5 100644 --- a/regression-test/data/shape_check/tpch_sf1000/hint/q14.out +++ b/regression-test/data/shape_check/tpch_sf1000/hint/q14.out @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() +------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() --------------PhysicalProject ----------------PhysicalOlapScan[part] --------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/hint/q15.out b/regression-test/data/shape_check/tpch_sf1000/hint/q15.out index baf30727e22858..145c9dff734c4c 100644 --- a/regression-test/data/shape_check/tpch_sf1000/hint/q15.out +++ b/regression-test/data/shape_check/tpch_sf1000/hint/q15.out @@ -7,7 +7,7 @@ PhysicalResultSink --------PhysicalProject ----------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() ------------PhysicalProject ---------------hashJoin[INNER_JOIN shuffleBucket] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() +--------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() ----------------PhysicalProject ------------------PhysicalOlapScan[supplier] ----------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/hint/q3.out b/regression-test/data/shape_check/tpch_sf1000/hint/q3.out index d4cf366b41a7d2..8498c01769698d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/hint/q3.out +++ b/regression-test/data/shape_check/tpch_sf1000/hint/q3.out @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() +------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() --------------PhysicalProject ----------------filter((lineitem.l_shipdate > '1995-03-15')) ------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/hint/q7.out b/regression-test/data/shape_check/tpch_sf1000/hint/q7.out index 6e932cbc45682c..26425b016aa293 100644 --- a/regression-test/data/shape_check/tpch_sf1000/hint/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/hint/q7.out @@ -8,7 +8,7 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=(OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]]) +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=(OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]]) ------------------PhysicalProject --------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/hint/q8.out b/regression-test/data/shape_check/tpch_sf1000/hint/q8.out index 31f98f976f45a2..2bff8f5b6a09f2 100644 --- a/regression-test/data/shape_check/tpch_sf1000/hint/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/hint/q8.out @@ -11,11 +11,11 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() ------------------------PhysicalProject --------------------------PhysicalOlapScan[supplier] ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() ----------------------------PhysicalProject ------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() --------------------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q10.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q10.out index bf421bf4350674..28bbc56dca0a1d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q10.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q10.out @@ -8,19 +8,19 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 c_nationkey->[n_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] -----------------------PhysicalProject -------------------------filter((lineitem.l_returnflag = 'R')) ---------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------PhysicalOlapScan[nation] apply RFs: RF2 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] --------------------------PhysicalProject -----------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) -------------------------------PhysicalOlapScan[orders] +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] -------------------PhysicalProject ---------------------PhysicalOlapScan[nation] +----------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) +------------------------------PhysicalOlapScan[orders] apply RFs: RF1 +----------------------PhysicalProject +------------------------filter((lineitem.l_returnflag = 'R')) +--------------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q13.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q13.out index 6165574e0ee265..30ddf4c78e4a2d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q13.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q13.out @@ -10,10 +10,10 @@ PhysicalResultSink --------------PhysicalProject ----------------hashAgg[GLOBAL] ------------------PhysicalProject ---------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() +--------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() +----------------------PhysicalProject +------------------------PhysicalOlapScan[customer] ----------------------PhysicalProject ------------------------filter(( not (o_comment like '%special%requests%'))) --------------------------PhysicalOlapScan[orders] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q14.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q14.out index be755b04f33939..7e7cbfa1b90e37 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q14.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q14.out @@ -6,10 +6,10 @@ PhysicalResultSink ------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() +------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey] +--------------PhysicalProject +----------------PhysicalOlapScan[part] apply RFs: RF0 --------------PhysicalProject ----------------filter((lineitem.l_shipdate < '1995-10-01') and (lineitem.l_shipdate >= '1995-09-01')) ------------------PhysicalOlapScan[lineitem] ---------------PhysicalProject -----------------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q15.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q15.out index 9e6b383230a34f..9dfc1cbacba29a 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q15.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q15.out @@ -2,12 +2,12 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute[DistributionSpecGather] -------PhysicalQuickSort[LOCAL_SORT] ---------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() -------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() +----PhysicalQuickSort[LOCAL_SORT] +------PhysicalProject +--------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecGather] +--------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] @@ -15,16 +15,15 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) ----------------------------PhysicalOlapScan[lineitem] -----------------PhysicalProject -------------------PhysicalOlapScan[supplier] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) -------------------------------PhysicalOlapScan[lineitem] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 supplier_no->[s_suppkey] +--------------PhysicalProject +----------------PhysicalOlapScan[supplier] apply RFs: RF0 +--------------PhysicalProject +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) +--------------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q17.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q17.out index 5574a3599beb7c..850c567ab4aa39 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q17.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q17.out @@ -9,11 +9,12 @@ PhysicalResultSink ------------filter((cast(l_quantity as DECIMALV3(38, 5)) < (0.2 * avg(cast(l_quantity as DECIMALV3(17, 4))) OVER(PARTITION BY p_partkey)))) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -----------------------PhysicalProject -------------------------filter((part.p_brand = 'Brand#23') and (part.p_container = 'MED BOX')) ---------------------------PhysicalOlapScan[part] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +------------------------PhysicalProject +--------------------------filter((part.p_brand = 'Brand#23') and (part.p_container = 'MED BOX')) +----------------------------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q18.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q18.out index c84338debea515..acdcd91caa9409 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q18.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q18.out @@ -6,11 +6,13 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------PhysicalProject ----------------PhysicalOlapScan[lineitem] apply RFs: RF2 --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 o_custkey->[c_custkey] +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] apply RFs: RF1 ------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] --------------------PhysicalProject ----------------------PhysicalOlapScan[orders] apply RFs: RF0 @@ -19,6 +21,4 @@ PhysicalResultSink ------------------------hashAgg[GLOBAL] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineitem] -------------------PhysicalProject ---------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q20-rewrite.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q20-rewrite.out index 91208a71c2c13d..a45b337c1e90af 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q20-rewrite.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q20-rewrite.out @@ -9,20 +9,20 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey,ps_suppkey] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF1 ps_partkey->[l_partkey];RF2 ps_suppkey->[l_suppkey] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF1 l_partkey->[p_partkey,ps_partkey];RF2 l_suppkey->[ps_suppkey] +--------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 RF2 RF3 +----------------------PhysicalProject +------------------------filter((p_name like 'forest%')) +--------------------------PhysicalOlapScan[part] apply RFs: RF1 --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 RF3 ---------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF3 -----------------------PhysicalProject -------------------------filter((p_name like 'forest%')) ---------------------------PhysicalOlapScan[part] +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 ----------------PhysicalProject ------------------PhysicalOlapScan[supplier] apply RFs: RF4 ------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q20.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q20.out index e5d22d11cfa918..fc9f06234417ab 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q20.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q20.out @@ -7,23 +7,23 @@ PhysicalResultSink --------PhysicalProject ----------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject ---------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey,ps_suppkey] +--------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 ps_suppkey->[s_suppkey] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF1 ps_partkey->[l_partkey];RF2 ps_suppkey->[l_suppkey] +------------------PhysicalOlapScan[supplier] apply RFs: RF3 RF4 +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF1 l_partkey->[p_partkey,ps_partkey];RF2 l_suppkey->[ps_suppkey] +--------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 RF2 +----------------------PhysicalProject +------------------------filter((p_name like 'forest%')) +--------------------------PhysicalOlapScan[part] apply RFs: RF1 --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) -------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 RF3 ---------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF3 -----------------------PhysicalProject -------------------------filter((p_name like 'forest%')) ---------------------------PhysicalOlapScan[part] -----------------PhysicalProject -------------------PhysicalOlapScan[supplier] apply RFs: RF4 +------------------------------PhysicalOlapScan[lineitem] ------------PhysicalProject --------------filter((nation.n_name = 'CANADA')) ----------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q21.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q21.out index c54a6b502f590d..5092a9143bb3b7 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q21.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q21.out @@ -10,21 +10,21 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF3 o_orderkey->[l_orderkey,l_orderkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF3 o_orderkey->[l_orderkey,l_orderkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] ---------------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF2 l_suppkey->[s_suppkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[supplier] apply RFs: RF2 RF4 +--------------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF3 -----------------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF0 l_orderkey->[l_orderkey] +------------------------------filter((l3.l_receiptdate > l3.l_commitdate)) +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +----------------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF0 l_orderkey->[l_orderkey] ------------------------------PhysicalProject ---------------------------------filter((l3.l_receiptdate > l3.l_commitdate)) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF3 ------------------------------PhysicalProject --------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[supplier] apply RFs: RF4 +----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 ----------------------PhysicalProject ------------------------filter((orders.o_orderstatus = 'F')) --------------------------PhysicalOlapScan[orders] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q22.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q22.out index 5f75b319bf08a6..1b86d0f64eaefd 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q22.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q22.out @@ -8,18 +8,18 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(c_acctbal)) +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecGather] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) +----------------------------PhysicalOlapScan[customer] ------------------PhysicalProject ---------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------PhysicalProject ---------------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(c_acctbal)) +--------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[orders] apply RFs: RF0 ----------------------PhysicalProject ------------------------filter(substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) --------------------------PhysicalOlapScan[customer] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) ---------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q3.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q3.out index 5e1ce9d65f8b5d..607e950b788900 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q3.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q3.out @@ -5,17 +5,19 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------filter((lineitem.l_shipdate > '1995-03-15')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ------------------PhysicalProject ---------------------filter((orders.o_orderdate < '1995-03-15')) -----------------------PhysicalOlapScan[orders] apply RFs: RF0 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +----------------------PhysicalProject +------------------------filter((customer.c_mktsegment = 'BUILDING')) +--------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------PhysicalProject +------------------------filter((orders.o_orderdate < '1995-03-15')) +--------------------------PhysicalOlapScan[orders] apply RFs: RF1 ------------------PhysicalProject ---------------------filter((customer.c_mktsegment = 'BUILDING')) -----------------------PhysicalOlapScan[customer] +--------------------filter((lineitem.l_shipdate > '1995-03-15')) +----------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q5.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q5.out index e375e65d7c3815..91f94812190ce2 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q5.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q5.out @@ -14,16 +14,16 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = supplier.s_nationkey) and (lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] ----------------------------------PhysicalProject -------------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) ---------------------------------------PhysicalOlapScan[orders] apply RFs: RF0 +------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF4 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF4 +------------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) +--------------------------------------PhysicalOlapScan[orders] apply RFs: RF1 +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 --------------------------PhysicalProject ----------------------------PhysicalOlapScan[supplier] apply RFs: RF4 ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q7.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q7.out index e953eb4cbcee33..262586bd741361 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q7.out @@ -10,18 +10,18 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n2.n_nationkey) and (supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[c_nationkey];RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF2 c_custkey->[o_custkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF2 c_custkey->[o_custkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[orders] apply RFs: RF1 RF2 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[l_suppkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF0 l_suppkey->[s_suppkey] ------------------------------PhysicalProject ---------------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +--------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[supplier] apply RFs: RF4 +--------------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) +----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[orders] apply RFs: RF2 ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] apply RFs: RF3 ------------------NestedLoopJoin[INNER_JOIN]OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q8.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q8.out index eedc274096c789..f7b64bd421dcf4 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q8.out @@ -11,33 +11,33 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF6 r_regionkey->[n_regionkey] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF5 s_nationkey->[n_nationkey] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[nation] apply RFs: RF5 ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[c_nationkey] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF3 c_custkey->[o_custkey] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF3 c_custkey->[o_custkey] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() +----------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] --------------------------------------------PhysicalProject -----------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF1 +----------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF2 --------------------------------------------PhysicalProject -----------------------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) -------------------------------------------------PhysicalOlapScan[orders] apply RFs: RF3 +----------------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) +------------------------------------------------PhysicalOlapScan[part] ----------------------------------------PhysicalProject -------------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) ---------------------------------------------PhysicalOlapScan[part] +------------------------------------------PhysicalOlapScan[supplier] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[supplier] +--------------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) +----------------------------------------PhysicalOlapScan[orders] apply RFs: RF3 --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[nation] apply RFs: RF6 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[nation] --------------------PhysicalProject ----------------------filter((region.r_name = 'AMERICA')) ------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q9.out b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q9.out index f2155663071dfa..8fe74102c9abfd 100644 --- a/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q9.out +++ b/regression-test/data/shape_check/tpch_sf1000/nostats_rf_prune/q9.out @@ -8,26 +8,26 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF4 l_orderkey->[o_orderkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF2 p_partkey->[l_partkey] +------------------------PhysicalOlapScan[orders] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 l_suppkey->[ps_suppkey];RF3 l_partkey->[ps_partkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[partsupp] apply RFs: RF2 RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF1 l_suppkey->[s_suppkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 +--------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[orders] ---------------------------PhysicalProject -----------------------------filter((p_name like '%green%')) -------------------------------PhysicalOlapScan[part] -----------------------PhysicalProject -------------------------PhysicalOlapScan[partsupp] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +----------------------------------PhysicalProject +------------------------------------filter((p_name like '%green%')) +--------------------------------------PhysicalOlapScan[part] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() -----------------------PhysicalProject -------------------------PhysicalOlapScan[supplier] -----------------------PhysicalProject -------------------------PhysicalOlapScan[nation] +--------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q10.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q10.out index 860280d12dd4cb..28bbc56dca0a1d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q10.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q10.out @@ -5,20 +5,22 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 o_custkey->[c_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 c_nationkey->[n_nationkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[customer] apply RFs: RF1 +--------------------PhysicalOlapScan[nation] apply RFs: RF2 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ----------------------PhysicalProject -------------------------filter((lineitem.l_returnflag = 'R')) ---------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------PhysicalProject +----------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) +------------------------------PhysicalOlapScan[orders] apply RFs: RF1 ----------------------PhysicalProject -------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) ---------------------------PhysicalOlapScan[orders] ---------------PhysicalProject -----------------PhysicalOlapScan[nation] +------------------------filter((lineitem.l_returnflag = 'R')) +--------------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q11.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q11.out index 32ac3f813c6280..713ec1bfdcc886 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q11.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q11.out @@ -9,29 +9,29 @@ PhysicalResultSink ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[s_nationkey] --------------------PhysicalProject -----------------------PhysicalOlapScan[partsupp] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[ps_suppkey] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[supplier] apply RFs: RF2 +--------------------------PhysicalOlapScan[partsupp] apply RFs: RF2 ------------------------PhysicalProject ---------------------------filter((nation.n_name = 'GERMANY')) -----------------------------PhysicalOlapScan[nation] +--------------------------PhysicalOlapScan[supplier] apply RFs: RF3 +--------------------PhysicalProject +----------------------filter((nation.n_name = 'GERMANY')) +------------------------PhysicalOlapScan[nation] ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[ps_suppkey] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[partsupp] apply RFs: RF1 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[ps_suppkey] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 +------------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------filter((nation.n_name = 'GERMANY')) ---------------------------------PhysicalOlapScan[nation] +------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 +------------------------PhysicalProject +--------------------------filter((nation.n_name = 'GERMANY')) +----------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q13.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q13.out index 6165574e0ee265..30ddf4c78e4a2d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q13.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q13.out @@ -10,10 +10,10 @@ PhysicalResultSink --------------PhysicalProject ----------------hashAgg[GLOBAL] ------------------PhysicalProject ---------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() +--------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() +----------------------PhysicalProject +------------------------PhysicalOlapScan[customer] ----------------------PhysicalProject ------------------------filter(( not (o_comment like '%special%requests%'))) --------------------------PhysicalOlapScan[orders] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q14.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q14.out index 6df1a05fa3b57f..7e7cbfa1b90e37 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q14.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q14.out @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey] --------------PhysicalProject ----------------PhysicalOlapScan[part] apply RFs: RF0 --------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q15.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q15.out index 9e6b383230a34f..9dfc1cbacba29a 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q15.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q15.out @@ -2,12 +2,12 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute[DistributionSpecGather] -------PhysicalQuickSort[LOCAL_SORT] ---------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() -------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() +----PhysicalQuickSort[LOCAL_SORT] +------PhysicalProject +--------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecGather] +--------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] @@ -15,16 +15,15 @@ PhysicalResultSink ------------------------PhysicalProject --------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) ----------------------------PhysicalOlapScan[lineitem] -----------------PhysicalProject -------------------PhysicalOlapScan[supplier] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) -------------------------------PhysicalOlapScan[lineitem] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 supplier_no->[s_suppkey] +--------------PhysicalProject +----------------PhysicalOlapScan[supplier] apply RFs: RF0 +--------------PhysicalProject +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) +--------------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q16.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q16.out index 5fe9babe975e0c..7b04caaf3e087a 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q16.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q16.out @@ -5,18 +5,17 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] -----------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN colocated] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +--------------------PhysicalProject +----------------------PhysicalOlapScan[partsupp] apply RFs: RF0 +--------------------PhysicalProject +----------------------filter((s_comment like '%Customer%Complaints%')) +------------------------PhysicalOlapScan[supplier] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN colocated] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 -----------------------PhysicalProject -------------------------filter(( not (p_brand = 'Brand#45')) and ( not (p_type like 'MEDIUM POLISHED%')) and p_size IN (14, 19, 23, 3, 36, 45, 49, 9)) ---------------------------PhysicalOlapScan[part] -------------------PhysicalProject ---------------------filter((s_comment like '%Customer%Complaints%')) -----------------------PhysicalOlapScan[supplier] +--------------------filter(( not (p_brand = 'Brand#45')) and ( not (p_type like 'MEDIUM POLISHED%')) and p_size IN (14, 19, 23, 3, 36, 45, 49, 9)) +----------------------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q18.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q18.out index c84338debea515..acdcd91caa9409 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q18.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q18.out @@ -6,11 +6,13 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------PhysicalProject ----------------PhysicalOlapScan[lineitem] apply RFs: RF2 --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 o_custkey->[c_custkey] +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] apply RFs: RF1 ------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] --------------------PhysicalProject ----------------------PhysicalOlapScan[orders] apply RFs: RF0 @@ -19,6 +21,4 @@ PhysicalResultSink ------------------------hashAgg[GLOBAL] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineitem] -------------------PhysicalProject ---------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q2.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q2.out index 2a4aed95629cb3..2bbd70beab96a1 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q2.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q2.out @@ -10,24 +10,23 @@ PhysicalResultSink --------------filter((partsupp.ps_supplycost = min(ps_supplycost) OVER(PARTITION BY p_partkey))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 ps_suppkey->[s_suppkey] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] -------------------------------PhysicalLazyMaterializeOlapScan[supplier lazySlots:(supplier.s_address,supplier.s_phone,supplier.s_comment)] apply RFs: RF2 RF3 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF1 r_regionkey->[n_regionkey] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[nation] apply RFs: RF1 -----------------------------------PhysicalProject -------------------------------------filter((region.r_name = 'EUROPE')) ---------------------------------------PhysicalOlapScan[region] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 -------------------------------PhysicalProject ---------------------------------filter((p_type like '%BRASS') and (part.p_size = 15)) -----------------------------------PhysicalLazyMaterializeOlapScan[part lazySlots:(part.p_mfgr)] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF3 r_regionkey->[n_regionkey] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 +------------------------------------PhysicalProject +--------------------------------------filter((p_type like '%BRASS') and (part.p_size = 15)) +----------------------------------------PhysicalLazyMaterializeOlapScan[part lazySlots:(part.p_mfgr)] +--------------------------------PhysicalLazyMaterializeOlapScan[supplier lazySlots:(supplier.s_address,supplier.s_phone,supplier.s_comment)] apply RFs: RF2 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[nation] apply RFs: RF3 +------------------------PhysicalProject +--------------------------filter((region.r_name = 'EUROPE')) +----------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q20-rewrite.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q20-rewrite.out index ef604a2ae5259a..a45b337c1e90af 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q20-rewrite.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q20-rewrite.out @@ -5,27 +5,27 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF4 s_suppkey->[l_suppkey,ps_suppkey] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF2 ps_partkey->[l_partkey];RF3 ps_suppkey->[l_suppkey] +--------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey,ps_suppkey] ----------------PhysicalProject -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) -----------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 RF4 -----------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[ps_partkey] -------------------PhysicalProject ---------------------PhysicalOlapScan[partsupp] apply RFs: RF1 RF4 -------------------PhysicalProject ---------------------filter((p_name like 'forest%')) -----------------------PhysicalOlapScan[part] -------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] -----------------PhysicalProject -------------------PhysicalOlapScan[supplier] apply RFs: RF0 +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF1 l_partkey->[p_partkey,ps_partkey];RF2 l_suppkey->[ps_suppkey] +--------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 RF2 RF3 +----------------------PhysicalProject +------------------------filter((p_name like 'forest%')) +--------------------------PhysicalOlapScan[part] apply RFs: RF1 +--------------------PhysicalProject +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 ----------------PhysicalProject -------------------filter((nation.n_name = 'CANADA')) ---------------------PhysicalOlapScan[nation] +------------------PhysicalOlapScan[supplier] apply RFs: RF4 +------------PhysicalProject +--------------filter((nation.n_name = 'CANADA')) +----------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q20.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q20.out index 9294ea8fbc57d6..fc9f06234417ab 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q20.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q20.out @@ -5,26 +5,26 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF4 s_suppkey->[l_suppkey,ps_suppkey] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF2 ps_partkey->[l_partkey];RF3 ps_suppkey->[l_suppkey] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ---------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 RF4 -----------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[ps_partkey] -------------------PhysicalProject ---------------------PhysicalOlapScan[partsupp] apply RFs: RF1 RF4 -------------------PhysicalProject ---------------------filter((p_name like 'forest%')) -----------------------PhysicalOlapScan[part] -------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] +--------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 ps_suppkey->[s_suppkey] ----------------PhysicalProject -------------------PhysicalOlapScan[supplier] apply RFs: RF0 +------------------PhysicalOlapScan[supplier] apply RFs: RF3 RF4 ----------------PhysicalProject -------------------filter((nation.n_name = 'CANADA')) ---------------------PhysicalOlapScan[nation] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF1 l_partkey->[p_partkey,ps_partkey];RF2 l_suppkey->[ps_suppkey] +--------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 RF2 +----------------------PhysicalProject +------------------------filter((p_name like 'forest%')) +--------------------------PhysicalOlapScan[part] apply RFs: RF1 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) +------------------------------PhysicalOlapScan[lineitem] +------------PhysicalProject +--------------filter((nation.n_name = 'CANADA')) +----------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q21.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q21.out index 0436a7b245b174..5092a9143bb3b7 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q21.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q21.out @@ -8,28 +8,27 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF4 l_orderkey->[l_orderkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[lineitem] apply RFs: RF4 -------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF3 l_orderkey->[l_orderkey] ---------------------PhysicalProject -----------------------filter((l3.l_receiptdate > l3.l_commitdate)) -------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF2 l_orderkey->[o_orderkey] -------------------------PhysicalProject ---------------------------filter((orders.o_orderstatus = 'F')) -----------------------------PhysicalOlapScan[orders] apply RFs: RF2 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[l_suppkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF3 o_orderkey->[l_orderkey,l_orderkey] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF2 l_suppkey->[s_suppkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[supplier] apply RFs: RF2 RF4 +--------------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] ----------------------------PhysicalProject -------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) +------------------------------filter((l3.l_receiptdate > l3.l_commitdate)) --------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 ---------------------------------PhysicalProject -----------------------------------filter((nation.n_name = 'SAUDI ARABIA')) -------------------------------------PhysicalOlapScan[nation] +----------------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF0 l_orderkey->[l_orderkey] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF3 +------------------------------PhysicalProject +--------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) +----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 +----------------------PhysicalProject +------------------------filter((orders.o_orderstatus = 'F')) +--------------------------PhysicalOlapScan[orders] +------------------PhysicalProject +--------------------filter((nation.n_name = 'SAUDI ARABIA')) +----------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q22.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q22.out index 5f75b319bf08a6..1b86d0f64eaefd 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q22.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q22.out @@ -8,18 +8,18 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(c_acctbal)) +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecGather] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) +----------------------------PhysicalOlapScan[customer] ------------------PhysicalProject ---------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------PhysicalProject ---------------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(c_acctbal)) +--------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[orders] apply RFs: RF0 ----------------------PhysicalProject ------------------------filter(substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) --------------------------PhysicalOlapScan[customer] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) ---------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q3.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q3.out index 3474f8dcf010c3..607e950b788900 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q3.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q3.out @@ -5,17 +5,19 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------filter((lineitem.l_shipdate > '1995-03-15')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ------------------PhysicalProject ---------------------filter((orders.o_orderdate < '1995-03-15')) -----------------------PhysicalOlapScan[orders] apply RFs: RF0 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +----------------------PhysicalProject +------------------------filter((customer.c_mktsegment = 'BUILDING')) +--------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------PhysicalProject +------------------------filter((orders.o_orderdate < '1995-03-15')) +--------------------------PhysicalOlapScan[orders] apply RFs: RF1 ------------------PhysicalProject ---------------------filter((customer.c_mktsegment = 'BUILDING')) -----------------------PhysicalOlapScan[customer] +--------------------filter((lineitem.l_shipdate > '1995-03-15')) +----------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q5.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q5.out index 9d05d167d12ad6..91f94812190ce2 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q5.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q5.out @@ -8,27 +8,27 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((customer.c_custkey = orders.o_custkey) and (customer.c_nationkey = supplier.s_nationkey)) otherCondition=() build RFs:RF4 s_nationkey->[c_nationkey];RF5 o_custkey->[c_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF5 r_regionkey->[n_regionkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 ---------------------------PhysicalProject -----------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) -------------------------------PhysicalOlapScan[orders] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[c_nationkey,s_nationkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = supplier.s_nationkey) and (lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[supplier] apply RFs: RF1 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[nation] apply RFs: RF0 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF4 +----------------------------------PhysicalProject +------------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) +--------------------------------------PhysicalOlapScan[orders] apply RFs: RF1 ------------------------------PhysicalProject ---------------------------------filter((region.r_name = 'ASIA')) -----------------------------------PhysicalOlapScan[region] +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[supplier] apply RFs: RF4 +----------------------PhysicalProject +------------------------PhysicalOlapScan[nation] apply RFs: RF5 +------------------PhysicalProject +--------------------filter((region.r_name = 'ASIA')) +----------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q7.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q7.out index 957b17a7402749..262586bd741361 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q7.out @@ -8,28 +8,27 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=(OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]]) build RFs:RF4 c_custkey->[o_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n2.n_nationkey) and (supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[c_nationkey];RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF3 l_orderkey->[o_orderkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF2 c_custkey->[o_custkey] ----------------------PhysicalProject -------------------------PhysicalOlapScan[orders] apply RFs: RF3 RF4 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] ---------------------------PhysicalProject -----------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) -------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF0 l_suppkey->[s_suppkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 +--------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 RF4 ------------------------------PhysicalProject ---------------------------------filter(n_name IN ('FRANCE', 'GERMANY')) -----------------------------------PhysicalOlapScan[nation] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[c_nationkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) +----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[orders] apply RFs: RF2 ----------------------PhysicalProject -------------------------filter(n_name IN ('FRANCE', 'GERMANY')) ---------------------------PhysicalOlapScan[nation] +------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------NestedLoopJoin[INNER_JOIN]OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]] +--------------------PhysicalProject +----------------------filter(n_name IN ('FRANCE', 'GERMANY')) +------------------------PhysicalOlapScan[nation] +--------------------PhysicalProject +----------------------filter(n_name IN ('FRANCE', 'GERMANY')) +------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q8.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q8.out index 9d85d05421445f..f7b64bd421dcf4 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q8.out @@ -9,36 +9,36 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF6 r_regionkey->[n_regionkey] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF5 l_suppkey->[s_suppkey] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF5 s_nationkey->[n_nationkey] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[supplier] apply RFs: RF5 +--------------------------PhysicalOlapScan[nation] apply RFs: RF5 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF4 o_custkey->[c_custkey] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[c_nationkey] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[c_nationkey] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF3 c_custkey->[o_custkey] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF2 r_regionkey->[n_regionkey] +----------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[nation] apply RFs: RF2 +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF2 +--------------------------------------------PhysicalProject +----------------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) +------------------------------------------------PhysicalOlapScan[part] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[supplier] ------------------------------------PhysicalProject ---------------------------------------filter((region.r_name = 'AMERICA')) -----------------------------------------PhysicalOlapScan[region] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ---------------------------------PhysicalProject -----------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) -------------------------------------PhysicalOlapScan[orders] apply RFs: RF1 +--------------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) +----------------------------------------PhysicalOlapScan[orders] apply RFs: RF3 --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -------------------------------------PhysicalProject ---------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) -----------------------------------------PhysicalOlapScan[part] +----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[nation] apply RFs: RF6 --------------------PhysicalProject -----------------------PhysicalOlapScan[nation] +----------------------filter((region.r_name = 'AMERICA')) +------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q9.out b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q9.out index 21fb9db6430bca..8fe74102c9abfd 100644 --- a/regression-test/data/shape_check/tpch_sf1000/rf_prune/q9.out +++ b/regression-test/data/shape_check/tpch_sf1000/rf_prune/q9.out @@ -8,26 +8,26 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF4 l_orderkey->[o_orderkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 l_orderkey->[o_orderkey] +------------------------PhysicalOlapScan[orders] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 l_suppkey->[ps_suppkey];RF3 l_partkey->[ps_partkey] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[orders] apply RFs: RF2 +----------------------------PhysicalOlapScan[partsupp] apply RFs: RF2 RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF1 l_suppkey->[s_suppkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 ------------------------------PhysicalProject ---------------------------------filter((p_name like '%green%')) -----------------------------------PhysicalOlapScan[part] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[supplier] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[nation] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +----------------------------------PhysicalProject +------------------------------------filter((p_name like '%green%')) +--------------------------------------PhysicalOlapScan[part] ------------------PhysicalProject ---------------------PhysicalOlapScan[partsupp] +--------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/runtime_filter/test_pushdown_setop.out b/regression-test/data/shape_check/tpch_sf1000/runtime_filter/test_pushdown_setop.out index 1cb60a27a39445..e9aeed90bbe25a 100644 --- a/regression-test/data/shape_check/tpch_sf1000/runtime_filter/test_pushdown_setop.out +++ b/regression-test/data/shape_check/tpch_sf1000/runtime_filter/test_pushdown_setop.out @@ -7,15 +7,12 @@ PhysicalResultSink --------PhysicalProject ----------hashJoin[INNER_JOIN broadcast] hashCondition=((T.l_linenumber = expr_cast(r_regionkey as BIGINT))) otherCondition=() build RFs:RF0 expr_cast(r_regionkey as BIGINT)->[cast(l_linenumber as BIGINT),o_orderkey] ------------PhysicalExcept RFV2: RF1[l_linenumber->o_orderkey] ---------------hashAgg[GLOBAL] -----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[LOCAL] ---------------------PhysicalProject -----------------------PhysicalOlapScan[lineitem] apply RFs: RF0 --------------PhysicalDistribute[DistributionSpecHash] -----------------hashAgg[GLOBAL] -------------------PhysicalProject ---------------------PhysicalOlapScan[orders] apply RFs: RF0 RFV2: RF1 +----------------PhysicalProject +------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +--------------PhysicalDistribute[DistributionSpecHash] +----------------PhysicalProject +------------------PhysicalOlapScan[orders] apply RFs: RF0 RFV2: RF1 ------------PhysicalProject --------------PhysicalOlapScan[region] @@ -28,15 +25,12 @@ PhysicalResultSink ----------hashJoin[INNER_JOIN broadcast] hashCondition=((expr_abs(l_linenumber) = expr_cast(r_regionkey as LARGEINT))) otherCondition=() build RFs:RF0 expr_cast(r_regionkey as LARGEINT)->[abs(cast(l_linenumber as BIGINT)),abs(o_orderkey)] ------------PhysicalProject --------------PhysicalExcept RFV2: RF1[l_linenumber->o_orderkey] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 ----------------PhysicalDistribute[DistributionSpecHash] -------------------hashAgg[GLOBAL] ---------------------PhysicalProject -----------------------PhysicalOlapScan[orders] apply RFs: RF0 RFV2: RF1 +------------------PhysicalProject +--------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +----------------PhysicalDistribute[DistributionSpecHash] +------------------PhysicalProject +--------------------PhysicalOlapScan[orders] apply RFs: RF0 RFV2: RF1 ------------PhysicalProject --------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q10.out b/regression-test/data/shape_check/tpch_sf1000/shape/q10.out index 952ec22ca66935..28bbc56dca0a1d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q10.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q10.out @@ -5,20 +5,22 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[c_nationkey] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 o_custkey->[c_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 c_nationkey->[n_nationkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[customer] apply RFs: RF1 RF2 +--------------------PhysicalOlapScan[nation] apply RFs: RF2 ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ----------------------PhysicalProject -------------------------filter((lineitem.l_returnflag = 'R')) ---------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------PhysicalProject +----------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) +------------------------------PhysicalOlapScan[orders] apply RFs: RF1 ----------------------PhysicalProject -------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) ---------------------------PhysicalOlapScan[orders] ---------------PhysicalProject -----------------PhysicalOlapScan[nation] +------------------------filter((lineitem.l_returnflag = 'R')) +--------------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q11.out b/regression-test/data/shape_check/tpch_sf1000/shape/q11.out index 32ac3f813c6280..713ec1bfdcc886 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q11.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q11.out @@ -9,29 +9,29 @@ PhysicalResultSink ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[ps_suppkey] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[s_nationkey] --------------------PhysicalProject -----------------------PhysicalOlapScan[partsupp] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[ps_suppkey] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[supplier] apply RFs: RF2 +--------------------------PhysicalOlapScan[partsupp] apply RFs: RF2 ------------------------PhysicalProject ---------------------------filter((nation.n_name = 'GERMANY')) -----------------------------PhysicalOlapScan[nation] +--------------------------PhysicalOlapScan[supplier] apply RFs: RF3 +--------------------PhysicalProject +----------------------filter((nation.n_name = 'GERMANY')) +------------------------PhysicalOlapScan[nation] ------------PhysicalProject --------------hashAgg[GLOBAL] ----------------PhysicalDistribute[DistributionSpecGather] ------------------hashAgg[LOCAL] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[ps_suppkey] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[partsupp] apply RFs: RF1 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[ps_suppkey] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 +------------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 ----------------------------PhysicalProject -------------------------------filter((nation.n_name = 'GERMANY')) ---------------------------------PhysicalOlapScan[nation] +------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 +------------------------PhysicalProject +--------------------------filter((nation.n_name = 'GERMANY')) +----------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q13.out b/regression-test/data/shape_check/tpch_sf1000/shape/q13.out index ab30427a698a90..30ddf4c78e4a2d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q13.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q13.out @@ -10,10 +10,10 @@ PhysicalResultSink --------------PhysicalProject ----------------hashAgg[GLOBAL] ------------------PhysicalProject ---------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------PhysicalProject -------------------------filter(( not (o_comment like '%special%requests%'))) ---------------------------PhysicalOlapScan[orders] apply RFs: RF0 +--------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] +----------------------PhysicalProject +------------------------filter(( not (o_comment like '%special%requests%'))) +--------------------------PhysicalOlapScan[orders] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q14.out b/regression-test/data/shape_check/tpch_sf1000/shape/q14.out index 6df1a05fa3b57f..7e7cbfa1b90e37 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q14.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q14.out @@ -6,7 +6,7 @@ PhysicalResultSink ------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey] --------------PhysicalProject ----------------PhysicalOlapScan[part] apply RFs: RF0 --------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q15.out b/regression-test/data/shape_check/tpch_sf1000/shape/q15.out index e9b45b5888ce54..9dfc1cbacba29a 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q15.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q15.out @@ -2,29 +2,28 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute[DistributionSpecGather] -------PhysicalQuickSort[LOCAL_SORT] ---------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() -------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 s_suppkey->[l_suppkey] +----PhysicalQuickSort[LOCAL_SORT] +------PhysicalProject +--------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecGather] +--------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) -----------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -----------------PhysicalProject -------------------PhysicalOlapScan[supplier] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) -------------------------------PhysicalOlapScan[lineitem] +----------------------------PhysicalOlapScan[lineitem] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 supplier_no->[s_suppkey] +--------------PhysicalProject +----------------PhysicalOlapScan[supplier] apply RFs: RF0 +--------------PhysicalProject +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) +--------------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q16.out b/regression-test/data/shape_check/tpch_sf1000/shape/q16.out index 5fe9babe975e0c..7b04caaf3e087a 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q16.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q16.out @@ -5,18 +5,17 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------hashAgg[GLOBAL] -----------hashAgg[GLOBAL] -------------PhysicalDistribute[DistributionSpecHash] ---------------hashAgg[LOCAL] -----------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] +--------------PhysicalProject +----------------hashJoin[INNER_JOIN colocated] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +------------------hashJoin[LEFT_ANTI_JOIN broadcast] hashCondition=((partsupp.ps_suppkey = supplier.s_suppkey)) otherCondition=() +--------------------PhysicalProject +----------------------PhysicalOlapScan[partsupp] apply RFs: RF0 +--------------------PhysicalProject +----------------------filter((s_comment like '%Customer%Complaints%')) +------------------------PhysicalOlapScan[supplier] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN colocated] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 -----------------------PhysicalProject -------------------------filter(( not (p_brand = 'Brand#45')) and ( not (p_type like 'MEDIUM POLISHED%')) and p_size IN (14, 19, 23, 3, 36, 45, 49, 9)) ---------------------------PhysicalOlapScan[part] -------------------PhysicalProject ---------------------filter((s_comment like '%Customer%Complaints%')) -----------------------PhysicalOlapScan[supplier] +--------------------filter(( not (p_brand = 'Brand#45')) and ( not (p_type like 'MEDIUM POLISHED%')) and p_size IN (14, 19, 23, 3, 36, 45, 49, 9)) +----------------------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q18.out b/regression-test/data/shape_check/tpch_sf1000/shape/q18.out index 44d1cdb0bbb8a2..acdcd91caa9409 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q18.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q18.out @@ -6,19 +6,19 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------PhysicalProject ----------------PhysicalOlapScan[lineitem] apply RFs: RF2 --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 c_custkey->[o_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 o_custkey->[c_custkey] +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] apply RFs: RF1 ------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] --------------------PhysicalProject -----------------------PhysicalOlapScan[orders] apply RFs: RF0 RF1 +----------------------PhysicalOlapScan[orders] apply RFs: RF0 --------------------PhysicalProject ----------------------filter((sum(l_quantity) > 300.00)) ------------------------hashAgg[GLOBAL] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineitem] -------------------PhysicalProject ---------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q2.out b/regression-test/data/shape_check/tpch_sf1000/shape/q2.out index 2a4aed95629cb3..f65137169a261c 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q2.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q2.out @@ -10,24 +10,23 @@ PhysicalResultSink --------------filter((partsupp.ps_supplycost = min(ps_supplycost) OVER(PARTITION BY p_partkey))) ----------------PhysicalWindow ------------------PhysicalQuickSort[LOCAL_SORT] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 ps_suppkey->[s_suppkey] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] -------------------------------PhysicalLazyMaterializeOlapScan[supplier lazySlots:(supplier.s_address,supplier.s_phone,supplier.s_comment)] apply RFs: RF2 RF3 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF1 r_regionkey->[n_regionkey] -----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[nation] apply RFs: RF1 -----------------------------------PhysicalProject -------------------------------------filter((region.r_name = 'EUROPE')) ---------------------------------------PhysicalOlapScan[region] ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] -------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 -------------------------------PhysicalProject ---------------------------------filter((p_type like '%BRASS') and (part.p_size = 15)) -----------------------------------PhysicalLazyMaterializeOlapScan[part lazySlots:(part.p_mfgr)] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF3 r_regionkey->[n_regionkey] +------------------------PhysicalProject +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[s_nationkey] +----------------------------PhysicalProject +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[ps_suppkey] +--------------------------------PhysicalProject +----------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((part.p_partkey = partsupp.ps_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +------------------------------------PhysicalProject +--------------------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 +------------------------------------PhysicalProject +--------------------------------------filter((p_type like '%BRASS') and (part.p_size = 15)) +----------------------------------------PhysicalLazyMaterializeOlapScan[part lazySlots:(part.p_mfgr)] +--------------------------------PhysicalLazyMaterializeOlapScan[supplier lazySlots:(supplier.s_address,supplier.s_phone,supplier.s_comment)] apply RFs: RF2 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[nation] apply RFs: RF3 +------------------------PhysicalProject +--------------------------filter((region.r_name = 'EUROPE')) +----------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q20-rewrite.out b/regression-test/data/shape_check/tpch_sf1000/shape/q20-rewrite.out index ef604a2ae5259a..a45b337c1e90af 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q20-rewrite.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q20-rewrite.out @@ -5,27 +5,27 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF4 s_suppkey->[l_suppkey,ps_suppkey] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF2 ps_partkey->[l_partkey];RF3 ps_suppkey->[l_suppkey] +--------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey,ps_suppkey] ----------------PhysicalProject -------------------hashAgg[GLOBAL] ---------------------PhysicalDistribute[DistributionSpecHash] -----------------------hashAgg[LOCAL] -------------------------PhysicalProject ---------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) -----------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 RF4 -----------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[ps_partkey] -------------------PhysicalProject ---------------------PhysicalOlapScan[partsupp] apply RFs: RF1 RF4 -------------------PhysicalProject ---------------------filter((p_name like 'forest%')) -----------------------PhysicalOlapScan[part] -------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] -----------------PhysicalProject -------------------PhysicalOlapScan[supplier] apply RFs: RF0 +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF1 l_partkey->[p_partkey,ps_partkey];RF2 l_suppkey->[ps_suppkey] +--------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 RF2 RF3 +----------------------PhysicalProject +------------------------filter((p_name like 'forest%')) +--------------------------PhysicalOlapScan[part] apply RFs: RF1 +--------------------PhysicalProject +----------------------hashAgg[GLOBAL] +------------------------PhysicalDistribute[DistributionSpecHash] +--------------------------hashAgg[LOCAL] +----------------------------PhysicalProject +------------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 ----------------PhysicalProject -------------------filter((nation.n_name = 'CANADA')) ---------------------PhysicalOlapScan[nation] +------------------PhysicalOlapScan[supplier] apply RFs: RF4 +------------PhysicalProject +--------------filter((nation.n_name = 'CANADA')) +----------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q20.out b/regression-test/data/shape_check/tpch_sf1000/shape/q20.out index 9294ea8fbc57d6..fc9f06234417ab 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q20.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q20.out @@ -5,26 +5,26 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalQuickSort[LOCAL_SORT] --------PhysicalProject -----------hashJoin[RIGHT_SEMI_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF4 s_suppkey->[l_suppkey,ps_suppkey] +----------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF2 ps_partkey->[l_partkey];RF3 ps_suppkey->[l_suppkey] -----------------hashAgg[GLOBAL] -------------------PhysicalDistribute[DistributionSpecHash] ---------------------hashAgg[LOCAL] -----------------------PhysicalProject -------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ---------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 RF4 -----------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF1 p_partkey->[ps_partkey] -------------------PhysicalProject ---------------------PhysicalOlapScan[partsupp] apply RFs: RF1 RF4 -------------------PhysicalProject ---------------------filter((p_name like 'forest%')) -----------------------PhysicalOlapScan[part] -------------PhysicalProject ---------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] +--------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 ps_suppkey->[s_suppkey] ----------------PhysicalProject -------------------PhysicalOlapScan[supplier] apply RFs: RF0 +------------------PhysicalOlapScan[supplier] apply RFs: RF3 RF4 ----------------PhysicalProject -------------------filter((nation.n_name = 'CANADA')) ---------------------PhysicalOlapScan[nation] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF1 l_partkey->[p_partkey,ps_partkey];RF2 l_suppkey->[ps_suppkey] +--------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 RF2 +----------------------PhysicalProject +------------------------filter((p_name like 'forest%')) +--------------------------PhysicalOlapScan[part] apply RFs: RF1 +--------------------hashAgg[GLOBAL] +----------------------PhysicalDistribute[DistributionSpecHash] +------------------------hashAgg[LOCAL] +--------------------------PhysicalProject +----------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) +------------------------------PhysicalOlapScan[lineitem] +------------PhysicalProject +--------------filter((nation.n_name = 'CANADA')) +----------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q21.out b/regression-test/data/shape_check/tpch_sf1000/shape/q21.out index 0436a7b245b174..5092a9143bb3b7 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q21.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q21.out @@ -8,28 +8,27 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF4 l_orderkey->[l_orderkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[lineitem] apply RFs: RF4 -------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF3 l_orderkey->[l_orderkey] ---------------------PhysicalProject -----------------------filter((l3.l_receiptdate > l3.l_commitdate)) -------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 ---------------------PhysicalProject -----------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF2 l_orderkey->[o_orderkey] -------------------------PhysicalProject ---------------------------filter((orders.o_orderstatus = 'F')) -----------------------------PhysicalOlapScan[orders] apply RFs: RF2 -------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[l_suppkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF3 o_orderkey->[l_orderkey,l_orderkey] +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF2 l_suppkey->[s_suppkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[supplier] apply RFs: RF2 RF4 +--------------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] ----------------------------PhysicalProject -------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) +------------------------------filter((l3.l_receiptdate > l3.l_commitdate)) --------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ---------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 ---------------------------------PhysicalProject -----------------------------------filter((nation.n_name = 'SAUDI ARABIA')) -------------------------------------PhysicalOlapScan[nation] +----------------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF0 l_orderkey->[l_orderkey] +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF3 +------------------------------PhysicalProject +--------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) +----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 +----------------------PhysicalProject +------------------------filter((orders.o_orderstatus = 'F')) +--------------------------PhysicalOlapScan[orders] +------------------PhysicalProject +--------------------filter((nation.n_name = 'SAUDI ARABIA')) +----------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q22.out b/regression-test/data/shape_check/tpch_sf1000/shape/q22.out index 5f75b319bf08a6..1b86d0f64eaefd 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q22.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q22.out @@ -8,18 +8,18 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(c_acctbal)) +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecGather] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) +----------------------------PhysicalOlapScan[customer] ------------------PhysicalProject ---------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------PhysicalProject ---------------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(c_acctbal)) +--------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[orders] apply RFs: RF0 ----------------------PhysicalProject ------------------------filter(substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) --------------------------PhysicalOlapScan[customer] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) ---------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q3.out b/regression-test/data/shape_check/tpch_sf1000/shape/q3.out index 3474f8dcf010c3..607e950b788900 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q3.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q3.out @@ -5,17 +5,19 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------filter((lineitem.l_shipdate > '1995-03-15')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ------------------PhysicalProject ---------------------filter((orders.o_orderdate < '1995-03-15')) -----------------------PhysicalOlapScan[orders] apply RFs: RF0 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +----------------------PhysicalProject +------------------------filter((customer.c_mktsegment = 'BUILDING')) +--------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------PhysicalProject +------------------------filter((orders.o_orderdate < '1995-03-15')) +--------------------------PhysicalOlapScan[orders] apply RFs: RF1 ------------------PhysicalProject ---------------------filter((customer.c_mktsegment = 'BUILDING')) -----------------------PhysicalOlapScan[customer] +--------------------filter((lineitem.l_shipdate > '1995-03-15')) +----------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q5.out b/regression-test/data/shape_check/tpch_sf1000/shape/q5.out index 9d05d167d12ad6..d725b78ed62094 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q5.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q5.out @@ -8,27 +8,27 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((customer.c_custkey = orders.o_custkey) and (customer.c_nationkey = supplier.s_nationkey)) otherCondition=() build RFs:RF4 s_nationkey->[c_nationkey];RF5 o_custkey->[c_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF5 r_regionkey->[n_regionkey] ------------------PhysicalProject ---------------------PhysicalOlapScan[customer] apply RFs: RF4 RF5 -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 ---------------------------PhysicalProject -----------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) -------------------------------PhysicalOlapScan[orders] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[c_nationkey,s_nationkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = supplier.s_nationkey) and (lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey];RF3 s_nationkey->[c_nationkey] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[supplier] apply RFs: RF1 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((nation.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF0 r_regionkey->[n_regionkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[nation] apply RFs: RF0 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF3 RF4 +----------------------------------PhysicalProject +------------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) +--------------------------------------PhysicalOlapScan[orders] apply RFs: RF1 ------------------------------PhysicalProject ---------------------------------filter((region.r_name = 'ASIA')) -----------------------------------PhysicalOlapScan[region] +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[supplier] apply RFs: RF4 +----------------------PhysicalProject +------------------------PhysicalOlapScan[nation] apply RFs: RF5 +------------------PhysicalProject +--------------------filter((region.r_name = 'ASIA')) +----------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q7.out b/regression-test/data/shape_check/tpch_sf1000/shape/q7.out index 957b17a7402749..262586bd741361 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q7.out @@ -8,28 +8,27 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=(OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]]) build RFs:RF4 c_custkey->[o_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n2.n_nationkey) and (supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[c_nationkey];RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF3 l_orderkey->[o_orderkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF2 c_custkey->[o_custkey] ----------------------PhysicalProject -------------------------PhysicalOlapScan[orders] apply RFs: RF3 RF4 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] ---------------------------PhysicalProject -----------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) -------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF1 n_nationkey->[s_nationkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF0 l_suppkey->[s_suppkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 +--------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 RF4 ------------------------------PhysicalProject ---------------------------------filter(n_name IN ('FRANCE', 'GERMANY')) -----------------------------------PhysicalOlapScan[nation] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[c_nationkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[customer] apply RFs: RF0 +--------------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) +----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[orders] apply RFs: RF2 ----------------------PhysicalProject -------------------------filter(n_name IN ('FRANCE', 'GERMANY')) ---------------------------PhysicalOlapScan[nation] +------------------------PhysicalOlapScan[customer] apply RFs: RF3 +------------------NestedLoopJoin[INNER_JOIN]OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]] +--------------------PhysicalProject +----------------------filter(n_name IN ('FRANCE', 'GERMANY')) +------------------------PhysicalOlapScan[nation] +--------------------PhysicalProject +----------------------filter(n_name IN ('FRANCE', 'GERMANY')) +------------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q8.out b/regression-test/data/shape_check/tpch_sf1000/shape/q8.out index 04c25aa5b1223f..d4777754ffd546 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q8.out @@ -9,36 +9,36 @@ PhysicalResultSink ------------PhysicalDistribute[DistributionSpecHash] --------------hashAgg[LOCAL] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF6 n_nationkey->[s_nationkey] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF6 r_regionkey->[n_regionkey] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN shuffle] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF5 l_suppkey->[s_suppkey] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF5 s_nationkey->[n_nationkey] ------------------------PhysicalProject ---------------------------PhysicalOlapScan[supplier] apply RFs: RF5 RF6 +--------------------------PhysicalOlapScan[nation] apply RFs: RF5 ------------------------PhysicalProject ---------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF4 o_custkey->[c_custkey] +--------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[c_nationkey] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[c_nationkey] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF3 c_custkey->[o_custkey] --------------------------------PhysicalProject -----------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 ---------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF2 r_regionkey->[n_regionkey] +----------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[nation] apply RFs: RF2 +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[l_suppkey] +----------------------------------------PhysicalProject +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +--------------------------------------------PhysicalProject +----------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF1 RF2 +--------------------------------------------PhysicalProject +----------------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) +------------------------------------------------PhysicalOlapScan[part] +----------------------------------------PhysicalProject +------------------------------------------PhysicalOlapScan[supplier] ------------------------------------PhysicalProject ---------------------------------------filter((region.r_name = 'AMERICA')) -----------------------------------------PhysicalOlapScan[region] -----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ---------------------------------PhysicalProject -----------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) -------------------------------------PhysicalOlapScan[orders] apply RFs: RF1 +--------------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) +----------------------------------------PhysicalOlapScan[orders] apply RFs: RF3 --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] -------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -------------------------------------PhysicalProject ---------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) -----------------------------------------PhysicalOlapScan[part] +----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 +----------------------------PhysicalProject +------------------------------PhysicalOlapScan[nation] apply RFs: RF6 --------------------PhysicalProject -----------------------PhysicalOlapScan[nation] +----------------------filter((region.r_name = 'AMERICA')) +------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape/q9.out b/regression-test/data/shape_check/tpch_sf1000/shape/q9.out index bee3d7f4b52394..45b21a6c7b3bb0 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape/q9.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape/q9.out @@ -8,26 +8,26 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF4 ps_suppkey->[l_suppkey,s_suppkey];RF5 ps_partkey->[l_partkey,p_partkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF5 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF4 l_orderkey->[o_orderkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 l_orderkey->[o_orderkey] +------------------------PhysicalOlapScan[orders] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 l_suppkey->[ps_suppkey];RF3 l_partkey->[ps_partkey] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[orders] apply RFs: RF2 +----------------------------PhysicalOlapScan[partsupp] apply RFs: RF2 RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF1 l_suppkey->[s_suppkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF3 RF4 RF5 +--------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 RF5 ------------------------------PhysicalProject ---------------------------------filter((p_name like '%green%')) -----------------------------------PhysicalOlapScan[part] apply RFs: RF5 -----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[supplier] apply RFs: RF0 RF4 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[nation] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +----------------------------------PhysicalProject +------------------------------------filter((p_name like '%green%')) +--------------------------------------PhysicalOlapScan[part] ------------------PhysicalProject ---------------------PhysicalOlapScan[partsupp] +--------------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q10.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q10.out index b089c525af8864..28bbc56dca0a1d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q10.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q10.out @@ -8,19 +8,19 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 n_nationkey->[c_nationkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF2 c_nationkey->[n_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] -----------------------PhysicalProject -------------------------filter((lineitem.l_returnflag = 'R')) ---------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------PhysicalOlapScan[nation] apply RFs: RF2 +------------------PhysicalProject +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] --------------------------PhysicalProject -----------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) -------------------------------PhysicalOlapScan[orders] apply RFs: RF0 +----------------------------PhysicalOlapScan[customer] apply RFs: RF0 --------------------------PhysicalProject -----------------------------PhysicalOlapScan[customer] apply RFs: RF2 -------------------PhysicalProject ---------------------PhysicalOlapScan[nation] +----------------------------filter((orders.o_orderdate < '1994-01-01') and (orders.o_orderdate >= '1993-10-01')) +------------------------------PhysicalOlapScan[orders] apply RFs: RF1 +----------------------PhysicalProject +------------------------filter((lineitem.l_returnflag = 'R')) +--------------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q13.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q13.out index ab30427a698a90..30ddf4c78e4a2d 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q13.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q13.out @@ -10,10 +10,10 @@ PhysicalResultSink --------------PhysicalProject ----------------hashAgg[GLOBAL] ------------------PhysicalProject ---------------------hashJoin[RIGHT_OUTER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] -----------------------PhysicalProject -------------------------filter(( not (o_comment like '%special%requests%'))) ---------------------------PhysicalOlapScan[orders] apply RFs: RF0 +--------------------hashJoin[LEFT_OUTER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] +----------------------PhysicalProject +------------------------filter(( not (o_comment like '%special%requests%'))) +--------------------------PhysicalOlapScan[orders] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q14.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q14.out index fd7cd9d438a5ed..7e7cbfa1b90e37 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q14.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q14.out @@ -6,10 +6,10 @@ PhysicalResultSink ------PhysicalDistribute[DistributionSpecGather] --------hashAgg[LOCAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN shuffle] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 l_partkey->[p_partkey] --------------PhysicalProject -----------------filter((lineitem.l_shipdate < '1995-10-01') and (lineitem.l_shipdate >= '1995-09-01')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +----------------PhysicalOlapScan[part] apply RFs: RF0 --------------PhysicalProject -----------------PhysicalOlapScan[part] +----------------filter((lineitem.l_shipdate < '1995-10-01') and (lineitem.l_shipdate >= '1995-09-01')) +------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q15.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q15.out index e9b45b5888ce54..9dfc1cbacba29a 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q15.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q15.out @@ -2,29 +2,28 @@ -- !select -- PhysicalResultSink --PhysicalQuickSort[MERGE_SORT] -----PhysicalDistribute[DistributionSpecGather] -------PhysicalQuickSort[LOCAL_SORT] ---------PhysicalProject -----------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() -------------PhysicalProject ---------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 s_suppkey->[l_suppkey] +----PhysicalQuickSort[LOCAL_SORT] +------PhysicalProject +--------hashJoin[INNER_JOIN broadcast] hashCondition=((revenue0.total_revenue = max(total_revenue))) otherCondition=() +----------hashAgg[GLOBAL] +------------PhysicalDistribute[DistributionSpecGather] +--------------hashAgg[LOCAL] ----------------PhysicalProject ------------------hashAgg[GLOBAL] --------------------PhysicalDistribute[DistributionSpecHash] ----------------------hashAgg[LOCAL] ------------------------PhysicalProject --------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) -----------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -----------------PhysicalProject -------------------PhysicalOlapScan[supplier] -------------hashAgg[GLOBAL] ---------------PhysicalDistribute[DistributionSpecGather] -----------------hashAgg[LOCAL] -------------------PhysicalProject ---------------------hashAgg[GLOBAL] -----------------------PhysicalDistribute[DistributionSpecHash] -------------------------hashAgg[LOCAL] ---------------------------PhysicalProject -----------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) -------------------------------PhysicalOlapScan[lineitem] +----------------------------PhysicalOlapScan[lineitem] +----------PhysicalProject +------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = revenue0.supplier_no)) otherCondition=() build RFs:RF0 supplier_no->[s_suppkey] +--------------PhysicalProject +----------------PhysicalOlapScan[supplier] apply RFs: RF0 +--------------PhysicalProject +----------------hashAgg[GLOBAL] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------hashAgg[LOCAL] +----------------------PhysicalProject +------------------------filter((lineitem.l_shipdate < '1996-04-01') and (lineitem.l_shipdate >= '1996-01-01')) +--------------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q17.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q17.out index 5574a3599beb7c..850c567ab4aa39 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q17.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q17.out @@ -9,11 +9,12 @@ PhysicalResultSink ------------filter((cast(l_quantity as DECIMALV3(38, 5)) < (0.2 * avg(cast(l_quantity as DECIMALV3(17, 4))) OVER(PARTITION BY p_partkey)))) --------------PhysicalWindow ----------------PhysicalQuickSort[LOCAL_SORT] -------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 -----------------------PhysicalProject -------------------------filter((part.p_brand = 'Brand#23') and (part.p_container = 'MED BOX')) ---------------------------PhysicalOlapScan[part] +------------------PhysicalDistribute[DistributionSpecHash] +--------------------PhysicalProject +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +------------------------PhysicalProject +--------------------------filter((part.p_brand = 'Brand#23') and (part.p_container = 'MED BOX')) +----------------------------PhysicalOlapScan[part] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q18.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q18.out index 44d1cdb0bbb8a2..acdcd91caa9409 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q18.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q18.out @@ -6,19 +6,19 @@ PhysicalResultSink ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] ----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] +------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] --------------PhysicalProject ----------------PhysicalOlapScan[lineitem] apply RFs: RF2 --------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 c_custkey->[o_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF1 o_custkey->[c_custkey] +------------------PhysicalProject +--------------------PhysicalOlapScan[customer] apply RFs: RF1 ------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF0 l_orderkey->[o_orderkey] --------------------PhysicalProject -----------------------PhysicalOlapScan[orders] apply RFs: RF0 RF1 +----------------------PhysicalOlapScan[orders] apply RFs: RF0 --------------------PhysicalProject ----------------------filter((sum(l_quantity) > 300.00)) ------------------------hashAgg[GLOBAL] --------------------------PhysicalProject ----------------------------PhysicalOlapScan[lineitem] -------------------PhysicalProject ---------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q20-rewrite.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q20-rewrite.out index 91208a71c2c13d..a45b337c1e90af 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q20-rewrite.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q20-rewrite.out @@ -9,20 +9,20 @@ PhysicalResultSink ------------PhysicalProject --------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((supplier.s_suppkey = t3.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey,ps_suppkey] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF1 ps_partkey->[l_partkey];RF2 ps_suppkey->[l_suppkey] +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((t2.l_partkey = t1.ps_partkey) and (t2.l_suppkey = t1.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > t2.l_q)) build RFs:RF1 l_partkey->[p_partkey,ps_partkey];RF2 l_suppkey->[ps_suppkey] +--------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 RF2 RF3 +----------------------PhysicalProject +------------------------filter((p_name like 'forest%')) +--------------------------PhysicalOlapScan[part] apply RFs: RF1 --------------------PhysicalProject ----------------------hashAgg[GLOBAL] ------------------------PhysicalDistribute[DistributionSpecHash] --------------------------hashAgg[LOCAL] ----------------------------PhysicalProject ------------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 RF3 ---------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF3 -----------------------PhysicalProject -------------------------filter((p_name like 'forest%')) ---------------------------PhysicalOlapScan[part] +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 ----------------PhysicalProject ------------------PhysicalOlapScan[supplier] apply RFs: RF4 ------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q20.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q20.out index e5d22d11cfa918..fc9f06234417ab 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q20.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q20.out @@ -7,23 +7,23 @@ PhysicalResultSink --------PhysicalProject ----------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------PhysicalProject ---------------hashJoin[RIGHT_SEMI_JOIN shuffle] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 s_suppkey->[l_suppkey,ps_suppkey] +--------------hashJoin[LEFT_SEMI_JOIN broadcast] hashCondition=((supplier.s_suppkey = partsupp.ps_suppkey)) otherCondition=() build RFs:RF3 ps_suppkey->[s_suppkey] ----------------PhysicalProject -------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF1 ps_partkey->[l_partkey];RF2 ps_suppkey->[l_suppkey] +------------------PhysicalOlapScan[supplier] apply RFs: RF3 RF4 +----------------PhysicalProject +------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_partkey = partsupp.ps_partkey) and (lineitem.l_suppkey = partsupp.ps_suppkey)) otherCondition=((cast(ps_availqty as DECIMALV3(38, 3)) > (0.5 * sum(l_quantity)))) build RFs:RF1 l_partkey->[p_partkey,ps_partkey];RF2 l_suppkey->[ps_suppkey] +--------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF1 RF2 +----------------------PhysicalProject +------------------------filter((p_name like 'forest%')) +--------------------------PhysicalOlapScan[part] apply RFs: RF1 --------------------hashAgg[GLOBAL] ----------------------PhysicalDistribute[DistributionSpecHash] ------------------------hashAgg[LOCAL] --------------------------PhysicalProject ----------------------------filter((lineitem.l_shipdate < '1995-01-01') and (lineitem.l_shipdate >= '1994-01-01')) -------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 RF3 ---------------------hashJoin[LEFT_SEMI_JOIN colocated] hashCondition=((partsupp.ps_partkey = part.p_partkey)) otherCondition=() build RFs:RF0 p_partkey->[ps_partkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[partsupp] apply RFs: RF0 RF3 -----------------------PhysicalProject -------------------------filter((p_name like 'forest%')) ---------------------------PhysicalOlapScan[part] -----------------PhysicalProject -------------------PhysicalOlapScan[supplier] apply RFs: RF4 +------------------------------PhysicalOlapScan[lineitem] ------------PhysicalProject --------------filter((nation.n_name = 'CANADA')) ----------------PhysicalOlapScan[nation] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q21.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q21.out index c54a6b502f590d..5092a9143bb3b7 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q21.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q21.out @@ -10,21 +10,21 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF3 o_orderkey->[l_orderkey,l_orderkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = l1.l_orderkey)) otherCondition=() build RFs:RF3 o_orderkey->[l_orderkey,l_orderkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] ---------------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = l1.l_suppkey)) otherCondition=() build RFs:RF2 l_suppkey->[s_suppkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[supplier] apply RFs: RF2 RF4 +--------------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF1 l_orderkey->[l_orderkey] ----------------------------PhysicalProject -------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF3 -----------------------------hashJoin[RIGHT_ANTI_JOIN colocated] hashCondition=((l3.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF0 l_orderkey->[l_orderkey] +------------------------------filter((l3.l_receiptdate > l3.l_commitdate)) +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +----------------------------hashJoin[RIGHT_SEMI_JOIN colocated] hashCondition=((l2.l_orderkey = l1.l_orderkey)) otherCondition=(( not (l_suppkey = l_suppkey))) build RFs:RF0 l_orderkey->[l_orderkey] ------------------------------PhysicalProject ---------------------------------filter((l3.l_receiptdate > l3.l_commitdate)) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF3 ------------------------------PhysicalProject --------------------------------filter((l1.l_receiptdate > l1.l_commitdate)) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 RF3 ---------------------------PhysicalProject -----------------------------PhysicalOlapScan[supplier] apply RFs: RF4 +----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF3 ----------------------PhysicalProject ------------------------filter((orders.o_orderstatus = 'F')) --------------------------PhysicalOlapScan[orders] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q22.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q22.out index 5f75b319bf08a6..1b86d0f64eaefd 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q22.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q22.out @@ -8,18 +8,18 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(c_acctbal)) +------------------hashAgg[GLOBAL] +--------------------PhysicalDistribute[DistributionSpecGather] +----------------------hashAgg[LOCAL] +------------------------PhysicalProject +--------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) +----------------------------PhysicalOlapScan[customer] ------------------PhysicalProject ---------------------PhysicalOlapScan[orders] apply RFs: RF0 -------------------PhysicalProject ---------------------NestedLoopJoin[INNER_JOIN](cast(c_acctbal as DECIMALV3(38, 4)) > avg(c_acctbal)) +--------------------hashJoin[RIGHT_ANTI_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------------PhysicalProject +------------------------PhysicalOlapScan[orders] apply RFs: RF0 ----------------------PhysicalProject ------------------------filter(substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) --------------------------PhysicalOlapScan[customer] -----------------------hashAgg[GLOBAL] -------------------------PhysicalDistribute[DistributionSpecGather] ---------------------------hashAgg[LOCAL] -----------------------------PhysicalProject -------------------------------filter((customer.c_acctbal > 0.00) and substring(c_phone, 1, 2) IN ('13', '17', '18', '23', '29', '30', '31')) ---------------------------------PhysicalOlapScan[customer] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q3.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q3.out index 5e1ce9d65f8b5d..607e950b788900 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q3.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q3.out @@ -5,17 +5,19 @@ PhysicalResultSink ----PhysicalDistribute[DistributionSpecGather] ------PhysicalTopN[LOCAL_SORT] --------hashAgg[GLOBAL] -----------PhysicalProject -------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +----------PhysicalDistribute[DistributionSpecHash] +------------hashAgg[LOCAL] --------------PhysicalProject -----------------filter((lineitem.l_shipdate > '1995-03-15')) -------------------PhysicalOlapScan[lineitem] apply RFs: RF1 ---------------PhysicalProject -----------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ------------------PhysicalProject ---------------------filter((orders.o_orderdate < '1995-03-15')) -----------------------PhysicalOlapScan[orders] apply RFs: RF0 +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] +----------------------PhysicalProject +------------------------filter((customer.c_mktsegment = 'BUILDING')) +--------------------------PhysicalOlapScan[customer] apply RFs: RF0 +----------------------PhysicalProject +------------------------filter((orders.o_orderdate < '1995-03-15')) +--------------------------PhysicalOlapScan[orders] apply RFs: RF1 ------------------PhysicalProject ---------------------filter((customer.c_mktsegment = 'BUILDING')) -----------------------PhysicalOlapScan[customer] +--------------------filter((lineitem.l_shipdate > '1995-03-15')) +----------------------PhysicalOlapScan[lineitem] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q5.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q5.out index 8d817e1c7b7e68..d725b78ed62094 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q5.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q5.out @@ -14,16 +14,16 @@ PhysicalResultSink ----------------------PhysicalProject ------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = supplier.s_nationkey) and (lineitem.l_suppkey = supplier.s_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey];RF3 s_nationkey->[c_nationkey] --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 -------------------------------PhysicalProject ---------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 c_custkey->[o_custkey] +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF0 o_custkey->[c_custkey] ----------------------------------PhysicalProject -------------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) ---------------------------------------PhysicalOlapScan[orders] apply RFs: RF0 +------------------------------------PhysicalOlapScan[customer] apply RFs: RF0 RF3 RF4 ----------------------------------PhysicalProject -------------------------------------PhysicalOlapScan[customer] apply RFs: RF3 RF4 +------------------------------------filter((orders.o_orderdate < '1995-01-01') and (orders.o_orderdate >= '1994-01-01')) +--------------------------------------PhysicalOlapScan[orders] apply RFs: RF1 +------------------------------PhysicalProject +--------------------------------PhysicalOlapScan[lineitem] apply RFs: RF2 --------------------------PhysicalProject ----------------------------PhysicalOlapScan[supplier] apply RFs: RF4 ----------------------PhysicalProject diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q7.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q7.out index e953eb4cbcee33..262586bd741361 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q7.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q7.out @@ -10,18 +10,18 @@ PhysicalResultSink --------------PhysicalProject ----------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n2.n_nationkey) and (supplier.s_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF3 n_nationkey->[c_nationkey];RF4 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN shuffle] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF2 c_custkey->[o_custkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_custkey = orders.o_custkey)) otherCondition=() build RFs:RF2 c_custkey->[o_custkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF1 l_orderkey->[o_orderkey] +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] --------------------------PhysicalProject -----------------------------PhysicalOlapScan[orders] apply RFs: RF1 RF2 ---------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF0 s_suppkey->[l_suppkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF0 l_suppkey->[s_suppkey] ------------------------------PhysicalProject ---------------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) -----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +--------------------------------PhysicalOlapScan[supplier] apply RFs: RF0 RF4 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[supplier] apply RFs: RF4 +--------------------------------filter((lineitem.l_shipdate <= '1996-12-31') and (lineitem.l_shipdate >= '1995-01-01')) +----------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[orders] apply RFs: RF2 ----------------------PhysicalProject ------------------------PhysicalOlapScan[customer] apply RFs: RF3 ------------------NestedLoopJoin[INNER_JOIN]OR[AND[(n1.n_name = 'FRANCE'),(n2.n_name = 'GERMANY')],AND[(n1.n_name = 'GERMANY'),(n2.n_name = 'FRANCE')]] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q8.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q8.out index 7b034a6386f270..d4777754ffd546 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q8.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q8.out @@ -11,33 +11,33 @@ PhysicalResultSink ----------------PhysicalProject ------------------hashJoin[INNER_JOIN broadcast] hashCondition=((n1.n_regionkey = region.r_regionkey)) otherCondition=() build RFs:RF6 r_regionkey->[n_regionkey] --------------------PhysicalProject -----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF5 n_nationkey->[s_nationkey] +----------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = n2.n_nationkey)) otherCondition=() build RFs:RF5 s_nationkey->[n_nationkey] +------------------------PhysicalProject +--------------------------PhysicalOlapScan[nation] apply RFs: RF5 ------------------------PhysicalProject --------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((customer.c_nationkey = n1.n_nationkey)) otherCondition=() build RFs:RF4 n_nationkey->[c_nationkey] ----------------------------PhysicalProject -------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF3 c_custkey->[o_custkey] +------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_custkey = customer.c_custkey)) otherCondition=() build RFs:RF3 c_custkey->[o_custkey] --------------------------------PhysicalProject -----------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 s_suppkey->[l_suppkey] +----------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF2 o_orderkey->[l_orderkey] ------------------------------------PhysicalProject ---------------------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF1 p_partkey->[l_partkey] +--------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF1 s_suppkey->[l_suppkey] ----------------------------------------PhysicalProject -------------------------------------------hashJoin[INNER_JOIN colocated] hashCondition=((lineitem.l_orderkey = orders.o_orderkey)) otherCondition=() build RFs:RF0 o_orderkey->[l_orderkey] +------------------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] --------------------------------------------PhysicalProject ----------------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 RF1 RF2 --------------------------------------------PhysicalProject -----------------------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) -------------------------------------------------PhysicalOlapScan[orders] apply RFs: RF3 +----------------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) +------------------------------------------------PhysicalOlapScan[part] ----------------------------------------PhysicalProject -------------------------------------------filter((part.p_type = 'ECONOMY ANODIZED STEEL')) ---------------------------------------------PhysicalOlapScan[part] +------------------------------------------PhysicalOlapScan[supplier] ------------------------------------PhysicalProject ---------------------------------------PhysicalOlapScan[supplier] apply RFs: RF5 +--------------------------------------filter((orders.o_orderdate <= '1996-12-31') and (orders.o_orderdate >= '1995-01-01')) +----------------------------------------PhysicalOlapScan[orders] apply RFs: RF3 --------------------------------PhysicalProject ----------------------------------PhysicalOlapScan[customer] apply RFs: RF4 ----------------------------PhysicalProject ------------------------------PhysicalOlapScan[nation] apply RFs: RF6 -------------------------PhysicalProject ---------------------------PhysicalOlapScan[nation] --------------------PhysicalProject ----------------------filter((region.r_name = 'AMERICA')) ------------------------PhysicalOlapScan[region] diff --git a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q9.out b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q9.out index ae79c7950f230b..45b21a6c7b3bb0 100644 --- a/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q9.out +++ b/regression-test/data/shape_check/tpch_sf1000/shape_no_stats/q9.out @@ -8,26 +8,26 @@ PhysicalResultSink ----------PhysicalDistribute[DistributionSpecHash] ------------hashAgg[LOCAL] --------------PhysicalProject -----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF5 s_suppkey->[l_suppkey,ps_suppkey] +----------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF5 n_nationkey->[s_nationkey] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN bucketShuffle] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF3 ps_suppkey->[l_suppkey];RF4 ps_partkey->[l_partkey,p_partkey] +--------------------hashJoin[INNER_JOIN broadcast] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF4 l_orderkey->[o_orderkey] ----------------------PhysicalProject -------------------------hashJoin[INNER_JOIN shuffle] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF2 p_partkey->[l_partkey] +------------------------PhysicalOlapScan[orders] apply RFs: RF4 +----------------------PhysicalProject +------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((partsupp.ps_partkey = lineitem.l_partkey) and (partsupp.ps_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF2 l_suppkey->[ps_suppkey];RF3 l_partkey->[ps_partkey] +--------------------------PhysicalProject +----------------------------PhysicalOlapScan[partsupp] apply RFs: RF2 RF3 --------------------------PhysicalProject -----------------------------hashJoin[INNER_JOIN colocated] hashCondition=((orders.o_orderkey = lineitem.l_orderkey)) otherCondition=() build RFs:RF1 o_orderkey->[l_orderkey] +----------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_suppkey = lineitem.l_suppkey)) otherCondition=() build RFs:RF1 l_suppkey->[s_suppkey] ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[lineitem] apply RFs: RF1 RF2 RF3 RF4 RF5 +--------------------------------PhysicalOlapScan[supplier] apply RFs: RF1 RF5 ------------------------------PhysicalProject ---------------------------------PhysicalOlapScan[orders] ---------------------------PhysicalProject -----------------------------filter((p_name like '%green%')) -------------------------------PhysicalOlapScan[part] apply RFs: RF4 -----------------------PhysicalProject -------------------------PhysicalOlapScan[partsupp] apply RFs: RF5 +--------------------------------hashJoin[INNER_JOIN broadcast] hashCondition=((part.p_partkey = lineitem.l_partkey)) otherCondition=() build RFs:RF0 p_partkey->[l_partkey] +----------------------------------PhysicalProject +------------------------------------PhysicalOlapScan[lineitem] apply RFs: RF0 +----------------------------------PhysicalProject +------------------------------------filter((p_name like '%green%')) +--------------------------------------PhysicalOlapScan[part] ------------------PhysicalProject ---------------------hashJoin[INNER_JOIN broadcast] hashCondition=((supplier.s_nationkey = nation.n_nationkey)) otherCondition=() build RFs:RF0 n_nationkey->[s_nationkey] -----------------------PhysicalProject -------------------------PhysicalOlapScan[supplier] apply RFs: RF0 -----------------------PhysicalProject -------------------------PhysicalOlapScan[nation] +--------------------PhysicalOlapScan[nation] diff --git a/regression-test/suites/nereids_p0/eager_agg/eager_agg.groovy b/regression-test/suites/nereids_p0/eager_agg/eager_agg.groovy new file mode 100644 index 00000000000000..4f9653829b3954 --- /dev/null +++ b/regression-test/suites/nereids_p0/eager_agg/eager_agg.groovy @@ -0,0 +1,414 @@ +// 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. + +suite("eager_agg") { + sql """ + set eager_aggregation_mode=1; + set eager_aggregation_on_join=true; + set runtime_filter_mode=OFF; + set broadcast_row_count_limit=-1; + set disable_nereids_rules="SALT_JOIN"; + set ignore_shape_nodes="PhysicalProject, PhysicalDistribute"; + set multi_distinct_strategy=1; + set enable_bucket_shuffle_join=false; + """ + + // push to ss-join-ws + qt_a """ + explain shape plan + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,sum(ws_list_price) brand + ,sum(ss_sales_price) sum_agg + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + order_qt_a_exe""" + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,sum(ws_list_price) brand + ,sum(ss_sales_price) sum_agg + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + // push to ss-join-ws + qt_a2 """ + explain shape plan + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,sum(ws_list_price + ss_sales_price) brand + + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + order_qt_a2_exe """ + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,sum(ws_list_price + ss_sales_price) brand + + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + // push sum/min/max aggFunc + qt_sum_min_max """ + explain shape plan + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,sum(ws_list_price) brand + ,min(ss_sales_price) min_agg + ,max(ss_sales_price) max_agg + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + order_qt_sum_min_max_exe """ + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,sum(ws_list_price) brand + ,min(ss_sales_price) min_agg + ,max(ss_sales_price) max_agg + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + // do not push avg aggFunc + qt_avg """ + explain shape plan + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,avg(ws_list_price) + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + order_qt_avg_exe """ + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,avg(ws_list_price) + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + // push count(column) - count should be pushed down and converted to sum at top level + qt_count_column """ + explain shape plan + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,count(ws_list_price) cnt + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + order_qt_count_column_exe """ + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,count(ws_list_price) cnt + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + // push count(*) - count(*) should be pushed down and converted to sum at top level + qt_count_star """ + explain shape plan + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,count(*) cnt + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + order_qt_count_star_exe """ + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,count(*) cnt + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + // push count with sum - mixed aggregation + qt_count_sum_mixed """ + explain shape plan + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,count(ws_list_price) cnt + ,sum(ss_sales_price) sum_agg + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + order_qt_count_sum_mixed_exe """ + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,count(ws_list_price) cnt + ,sum(ss_sales_price) sum_agg + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + // push count(*) with sum - both should be pushed down + qt_count_star_sum_mixed """ + explain shape plan + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,count(*) cnt + ,sum(ss_sales_price) sum_agg + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + order_qt_count_star_sum_mixed_exe """ + select /*+leading({ss broadcast ws} broadcast dt)*/ dt.d_year + ,count(*) cnt + ,sum(ss_sales_price) sum_agg + from date_dim dt + ,store_sales ss + ,web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year + """ + + // agg push to ss-d + qt_groupkey_push_SS_JOIN_D """ + explain shape plan + select /*+leading({ss broadcast dt} broadcast ws)*/ dt.d_year + ,sum(ss_wholesale_cost) brand + ,sum(ss_sales_price + d_moy) sum_agg + from store_sales ss + join date_dim dt + join web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year, ss_hdemo_sk + ws_quantity + """ + + order_qt_groupkey_push_SS_JOIN_D_exe """ + select /*+leading({ss broadcast dt} broadcast ws)*/ dt.d_year + ,sum(ss_wholesale_cost) brand + ,sum(ss_sales_price + d_moy) sum_agg + from store_sales ss + join date_dim dt + join web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year, ss_hdemo_sk + ws_quantity + """ + + // group key: ss_hdemo_sk + d_moy => push to ss-d + qt_groupkey_push """ + explain shape plan + select /*+leading({ss broadcast dt} broadcast ws)*/ dt.d_year + ,sum(ss_wholesale_cost) brand + ,sum(ss_sales_price) sum_agg + from store_sales ss + join date_dim dt + join web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year, ss_hdemo_sk + d_moy + """ + + order_qt_groupkey_push_exe """ + select /*+leading({ss broadcast dt} broadcast ws)*/ dt.d_year + ,sum(ss_wholesale_cost) brand + ,sum(ss_sales_price) sum_agg + from store_sales ss + join date_dim dt + join web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by dt.d_year, ss_hdemo_sk + d_moy + """ + + qt_sum_if_push """ + explain shape plan + select /*+leading({web_sales broadcast item} broadcast date_dim)*/ d_week_seq, + sum(case when (d_day_name='Monday') then ws_sales_price else null end) mon_sales, + sum(case when (d_day_name='Tuesday') then ws_sales_price else null end) tue_sales, + sum(case when (d_day_name='Wednesday') then ws_sales_price else null end) wed_sales, + sum(case when (d_day_name='Thursday') then ws_sales_price else null end) thu_sales, + sum(case when (d_day_name='Friday') then ws_sales_price else null end) fri_sales, + sum(case when (d_day_name='Saturday') then ws_sales_price else null end) sat_sales + from web_sales join item on ws_item_sk = i_item_sk + join date_dim on d_date_sk = ws_sold_date_sk + group by d_week_seq, ws_item_sk; + """ + + order_qt_sum_if_push_exe """ + select /*+leading({web_sales broadcast item} broadcast date_dim)*/ d_week_seq, + sum(case when (d_day_name='Monday') then ws_sales_price else null end) mon_sales, + sum(case when (d_day_name='Tuesday') then ws_sales_price else null end) tue_sales, + sum(case when (d_day_name='Wednesday') then ws_sales_price else null end) wed_sales, + sum(case when (d_day_name='Thursday') then ws_sales_price else null end) thu_sales, + sum(case when (d_day_name='Friday') then ws_sales_price else null end) fri_sales, + sum(case when (d_day_name='Saturday') then ws_sales_price else null end) sat_sales + from web_sales join item on ws_item_sk = i_item_sk + join date_dim on d_date_sk = ws_sold_date_sk + group by d_week_seq, ws_item_sk; + """ + + qt_check_case_when_outer_join_not_push """ + explain shape plan + select /*+SET_VAR(eager_aggregation_mode=1, disable_join_reorder = true)*/ a + ss_sales_price + from ( + select sum(case when ss_item_sk =1 then 1 else 0 end) a, ss_sales_price + from store_sales + right join date_dim on d_date_sk = ss_sold_date_sk + group by ss_sales_price + )t; + """ + + qt_check_no_case_when_outer_join_push """ + explain shape plan + select /*+SET_VAR(eager_aggregation_mode=1, disable_join_reorder = true)*/ a + ss_sales_price + from ( + select sum(ss_item_sk =1) a, ss_sales_price + from store_sales + right join date_dim on d_date_sk = ss_sold_date_sk + group by ss_sales_price + )t; + """ + + qt_check_no_push_value_slots_contains_if_slots """ + explain shape plan + select /*+SET_VAR(eager_aggregation_mode=1, disable_join_reorder = false)*/ + sum(case when ss_item_sk =1 then ss_item_sk else 0 end) a + from store_sales + join date_dim on d_date_sk = ss_sold_date_sk + group by d_year; + """ + + + qt_min_sum_same_slot """ + explain shape plan + select /*+leading({ss broadcast dt} broadcast ws)*/ dt.d_moy + ,min(d_year) brand + ,sum(d_year) sum_agg + from store_sales ss + join date_dim dt + join web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by d_moy + having brand is null; + """ + + order_qt_min_sum_same_slot_exe """ + select /*+leading({ss broadcast dt} broadcast ws)*/ dt.d_moy + ,min(d_year) brand + ,sum(d_year) sum_agg + from store_sales ss + join date_dim dt + join web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by d_moy + having brand is null; + """ + + order_qt_sum_min_same_slot_exe """ + select /*+leading({ss broadcast dt} broadcast ws)*/ dt.d_moy + ,sum(d_year) sum_agg + ,min(d_year) brand + from store_sales ss + join date_dim dt + join web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by d_moy + having brand is null; + """ + + qt_no_push_aggkey_groupKey_overlap """ + explain shape plan + select /*+leading({ss broadcast dt} broadcast ws)*/ dt.d_year + ,min(d_year) brand + ,sum(d_year) sum_agg + from store_sales ss + join date_dim dt + join web_sales ws + where dt.d_date_sk = ss_sold_date_sk + and ss_item_sk = ws_item_sk + group by d_year + """ + + // if any union child can not push, do not push for all union children + qt_no_push_not_all_union_children_push """ + explain shape plan + select d_year + ,min(d_moy) + ,sum(d_moy) + from ( + select /*+leading({ss broadcast dt} broadcast ws)*/ d_year, d_moy + from store_sales ss + join date_dim dt on dt.d_date_sk = ss_sold_date_sk + union all + select d_year, d_moy + from date_dim + ) t + group by d_year; + """ +} diff --git a/regression-test/suites/nereids_p0/eager_agg/load.groovy b/regression-test/suites/nereids_p0/eager_agg/load.groovy new file mode 100644 index 00000000000000..a43d7f18d2487a --- /dev/null +++ b/regression-test/suites/nereids_p0/eager_agg/load.groovy @@ -0,0 +1,299 @@ + +// 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. + +suite("load") { + sql """ + drop table if exists store_sales; + drop table if exists date_dim; + drop table if exists web_sales; + + CREATE TABLE `store_sales` ( + `ss_sold_date_sk` bigint NULL, + `ss_sold_time_sk` bigint NULL, + `ss_item_sk` bigint NULL, + `ss_customer_sk` bigint NULL, + `ss_cdemo_sk` bigint NULL, + `ss_hdemo_sk` bigint NULL, + `ss_addr_sk` bigint NULL, + `ss_store_sk` bigint NULL, + `ss_promo_sk` bigint NULL, + `ss_ticket_number` bigint NULL, + `ss_quantity` int NULL, + `ss_wholesale_cost` decimal(7,2) NULL, + `ss_list_price` decimal(7,2) NULL, + `ss_sales_price` decimal(7,2) NULL, + `ss_ext_discount_amt` decimal(7,2) NULL, + `ss_ext_sales_price` decimal(7,2) NULL, + `ss_ext_wholesale_cost` decimal(7,2) NULL, + `ss_ext_list_price` decimal(7,2) NULL, + `ss_ext_tax` decimal(7,2) NULL, + `ss_coupon_amt` decimal(7,2) NULL, + `ss_net_paid` decimal(7,2) NULL, + `ss_net_paid_inc_tax` decimal(7,2) NULL, + `ss_net_profit` decimal(7,2) NULL +) ENGINE=OLAP +DUPLICATE KEY(`ss_sold_date_sk`, `ss_sold_time_sk`, `ss_item_sk`, `ss_customer_sk`) +DISTRIBUTED BY RANDOM BUCKETS 7 +PROPERTIES ( +"replication_allocation" = "tag.location.default: 1", +"min_load_replica_num" = "-1", +"is_being_synced" = "false", +"storage_medium" = "hdd", +"storage_format" = "V2", +"inverted_index_storage_format" = "V3", +"light_schema_change" = "true", +"disable_auto_compaction" = "false", +"enable_single_replica_compaction" = "false", +"group_commit_interval_ms" = "10000", +"group_commit_data_bytes" = "134217728" +); + +CREATE TABLE `date_dim` ( + `d_date_sk` bigint NULL, + `d_date_id` char(16) NULL, + `d_date` date NULL, + `d_month_seq` int NULL, + `d_week_seq` int NULL, + `d_quarter_seq` int NULL, + `d_year` int NULL, + `d_dow` int NULL, + `d_moy` int NULL, + `d_dom` int NULL, + `d_qoy` int NULL, + `d_fy_year` int NULL, + `d_fy_quarter_seq` int NULL, + `d_fy_week_seq` int NULL, + `d_day_name` char(9) NULL, + `d_quarter_name` char(6) NULL, + `d_holiday` char(1) NULL, + `d_weekend` char(1) NULL, + `d_following_holiday` char(1) NULL, + `d_first_dom` int NULL, + `d_last_dom` int NULL, + `d_same_day_ly` int NULL, + `d_same_day_lq` int NULL, + `d_current_day` char(1) NULL, + `d_current_week` char(1) NULL, + `d_current_month` char(1) NULL, + `d_current_quarter` char(1) NULL, + `d_current_year` char(1) NULL +) ENGINE=OLAP +DUPLICATE KEY(`d_date_sk`, `d_date_id`) +DISTRIBUTED BY RANDOM BUCKETS 5 +PROPERTIES ( +"replication_allocation" = "tag.location.default: 1" +); + +CREATE TABLE `web_sales` ( + `ws_sold_date_sk` bigint NULL, + `ws_sold_time_sk` bigint NULL, + `ws_ship_date_sk` bigint NULL, + `ws_item_sk` bigint NULL, + `ws_bill_customer_sk` bigint NULL, + `ws_bill_cdemo_sk` bigint NULL, + `ws_bill_hdemo_sk` bigint NULL, + `ws_bill_addr_sk` bigint NULL, + `ws_ship_customer_sk` bigint NULL, + `ws_ship_cdemo_sk` bigint NULL, + `ws_ship_hdemo_sk` bigint NULL, + `ws_ship_addr_sk` bigint NULL, + `ws_web_page_sk` bigint NULL, + `ws_web_site_sk` bigint NULL, + `ws_ship_mode_sk` bigint NULL, + `ws_warehouse_sk` bigint NULL, + `ws_promo_sk` bigint NULL, + `ws_order_number` bigint NULL, + `ws_quantity` int NULL, + `ws_wholesale_cost` decimal(7,2) NULL, + `ws_list_price` decimal(7,2) NULL, + `ws_sales_price` decimal(7,2) NULL, + `ws_ext_discount_amt` decimal(7,2) NULL, + `ws_ext_sales_price` decimal(7,2) NULL, + `ws_ext_wholesale_cost` decimal(7,2) NULL, + `ws_ext_list_price` decimal(7,2) NULL, + `ws_ext_tax` decimal(7,2) NULL, + `ws_coupon_amt` decimal(7,2) NULL, + `ws_ext_ship_cost` decimal(7,2) NULL, + `ws_net_paid` decimal(7,2) NULL, + `ws_net_paid_inc_tax` decimal(7,2) NULL, + `ws_net_paid_inc_ship` decimal(7,2) NULL, + `ws_net_paid_inc_ship_tax` decimal(7,2) NULL, + `ws_net_profit` decimal(7,2) NULL +) ENGINE=OLAP +DUPLICATE KEY(`ws_sold_date_sk`, `ws_sold_time_sk`, `ws_ship_date_sk`, `ws_item_sk`) +DISTRIBUTED BY RANDOM BUCKETS 4 +PROPERTIES ( +"replication_allocation" = "tag.location.default: 1" +); + +drop table if exists item; +CREATE TABLE `item` ( + `i_item_sk` bigint NULL, + `i_item_id` char(16) NULL, + `i_rec_start_date` date NULL, + `i_rec_end_date` date NULL, + `i_item_desc` varchar(200) NULL, + `i_current_price` decimal(7,2) NULL, + `i_wholesale_cost` decimal(7,2) NULL, + `i_brand_id` int NULL, + `i_brand` char(50) NULL, + `i_class_id` int NULL, + `i_class` char(50) NULL, + `i_category_id` int NULL, + `i_category` char(50) NULL, + `i_manufact_id` int NULL, + `i_manufact` char(50) NULL, + `i_size` char(20) NULL, + `i_formulation` char(20) NULL, + `i_color` char(20) NULL, + `i_units` char(10) NULL, + `i_container` char(10) NULL, + `i_manager_id` int NULL, + `i_product_name` char(50) NULL +) ENGINE=OLAP +DUPLICATE KEY(`i_item_sk`, `i_item_id`) +DISTRIBUTED BY RANDOM BUCKETS 3 +PROPERTIES ( +"replication_allocation" = "tag.location.default: 1" +); + +-- Insert store_sales data +-- Join conditions: dt.d_date_sk = ss_sold_date_sk AND ss_item_sk = ws_item_sk +INSERT INTO store_sales ( + ss_sold_date_sk, ss_sold_time_sk, ss_item_sk, ss_customer_sk, ss_cdemo_sk, ss_hdemo_sk, + ss_addr_sk, ss_store_sk, ss_promo_sk, ss_ticket_number, ss_quantity, + ss_wholesale_cost, ss_list_price, ss_sales_price, ss_ext_discount_amt, + ss_ext_sales_price, ss_ext_wholesale_cost, ss_ext_list_price, ss_ext_tax, + ss_coupon_amt, ss_net_paid, ss_net_paid_inc_tax, ss_net_profit +) VALUES + -- Row 1: d_year=2024, item_sk=1001 + (1, 36000, 1001, 501, 601, 701, + 801, 901, 10001, 55500001, 2, + 10.00, 12.00, 11.00, 2.00, + 22.00, 20.00, 24.00, 1.54, + 0.00, 22.00, 23.54, 3.54), + -- Row 2: d_year=2024, item_sk=1001 + (1, 36001, 1001, 502, 602, 702, + 802, 902, 10002, 55500002, 3, + 15.00, 18.00, 16.00, 3.00, + 48.00, 45.00, 54.00, 3.36, + 0.00, 48.00, 51.36, 6.36), + -- Row 3: d_year=2025, item_sk=1002 + (2, 36002, 1002, 503, 603, 703, + 803, 903, 10003, 55500003, 5, + 20.00, 25.00, 22.00, 5.00, + 110.00, 100.00, 125.00, 7.70, + 0.00, 110.00, 117.70, 17.70), + -- Row 4: d_year=2025, item_sk=1002 + (2, 36003, 1002, 504, 604, 704, + 804, 904, 10004, 55500004, 4, + 18.00, 22.00, 20.00, 4.00, + 80.00, 72.00, 88.00, 5.60, + 0.00, 80.00, 85.60, 13.60); + +-- Insert date_dim data with different d_year and d_day_name values +INSERT INTO date_dim ( + d_date_sk, d_date_id, d_date, d_month_seq, d_week_seq, d_quarter_seq, d_year, + d_dow, d_moy, d_dom, d_qoy, d_fy_year, d_fy_quarter_seq, d_fy_week_seq, + d_day_name, d_quarter_name, d_holiday, d_weekend, d_following_holiday, + d_first_dom, d_last_dom, d_same_day_ly, d_same_day_lq, + d_current_day, d_current_week, d_current_month, d_current_quarter, d_current_year +) VALUES + -- d_date_sk=1, d_year=2024, Monday + (1, '2024-01-01', '2024-01-01', 1, 1, 1, 2024, + 1, 1, 1, 1, 2024, 1, 1, + 'Monday', 'Q1', 'N', 'N', 'N', + 1, 31, 20230101, 20231001, + 'Y', 'Y', 'Y', 'Y', 'Y'), + -- d_date_sk=2, d_year=2025, Tuesday + (2, '2025-01-07', '2025-01-07', 13, 2, 5, 2025, + 2, 1, 7, 1, 2025, 5, 2, + 'Tuesday', 'Q1', 'N', 'N', 'N', + 1, 31, 20240107, 20241007, + 'Y', 'Y', 'Y', 'Y', 'Y'), + -- d_date_sk=3, d_year=2024, Wednesday + (3, '2024-01-03', '2024-01-03', 1, 1, 1, 2024, + 3, 1, 3, 1, 2024, 1, 1, + 'Wednesday', 'Q1', 'N', 'N', 'N', + 1, 31, 20230103, 20231003, + 'Y', 'Y', 'Y', 'Y', 'Y'); + +-- Insert web_sales data +-- Join conditions: ss_item_sk = ws_item_sk AND d_date_sk = ws_sold_date_sk +INSERT INTO web_sales ( + ws_sold_date_sk, ws_sold_time_sk, ws_ship_date_sk, ws_item_sk, + ws_bill_customer_sk, ws_bill_cdemo_sk, ws_bill_hdemo_sk, ws_bill_addr_sk, + ws_ship_customer_sk, ws_ship_cdemo_sk, ws_ship_hdemo_sk, ws_ship_addr_sk, + ws_web_page_sk, ws_web_site_sk, ws_ship_mode_sk, ws_warehouse_sk, ws_promo_sk, + ws_order_number, ws_quantity, ws_wholesale_cost, ws_list_price, ws_sales_price, + ws_ext_discount_amt, ws_ext_sales_price, ws_ext_wholesale_cost, ws_ext_list_price, + ws_ext_tax, ws_coupon_amt, ws_ext_ship_cost, ws_net_paid, ws_net_paid_inc_tax, + ws_net_paid_inc_ship, ws_net_paid_inc_ship_tax, ws_net_profit +) VALUES + -- Row 1: item_sk=1001 (matches store_sales), sold_date_sk=1 + (1, 43200, 3, 1001, + 601, 701, 801, 901, + 602, 702, 802, 902, + 3001, 4001, 5001, 6001, 7001, + 8800001, 3, 15.00, 18.00, 16.50, + 4.50, 49.50, 45.00, 54.00, + 3.47, 0.00, 5.00, 49.50, 52.97, + 54.50, 58.00, 7.97), + -- Row 2: item_sk=1001 (matches store_sales), sold_date_sk=1 + (1, 43201, 3, 1001, + 602, 702, 802, 902, + 603, 703, 803, 903, + 3002, 4002, 5002, 6002, 7002, + 8800002, 2, 12.00, 15.00, 14.00, + 2.00, 28.00, 24.00, 30.00, + 1.96, 0.00, 3.00, 28.00, 29.96, + 31.00, 33.00, 5.96), + -- Row 3: item_sk=1002 (matches store_sales row 3,4), sold_date_sk=2 + (2, 43202, 4, 1002, + 603, 703, 803, 903, + 604, 704, 804, 904, + 3003, 4003, 5003, 6003, 7003, + 8800003, 4, 20.00, 25.00, 22.00, + 6.00, 88.00, 80.00, 100.00, + 6.16, 0.00, 8.00, 88.00, 94.16, + 96.00, 102.00, 14.16); + +-- Insert item data +INSERT INTO item ( + i_item_sk, i_item_id, i_rec_start_date, i_rec_end_date, + i_item_desc, i_current_price, i_wholesale_cost, + i_brand_id, i_brand, i_class_id, i_class, + i_category_id, i_category, i_manufact_id, i_manufact, + i_size, i_formulation, i_color, i_units, i_container, + i_manager_id, i_product_name +) VALUES + (1001, 'ITEM-0001001', '2024-01-01', NULL, + 'Sample item 1001', 12.00, 10.00, + 10, 'BrandA', 101, 'ClassA', + 201, 'CategoryA', 301, 'ManufactA', + 'M', 'Std', 'Red', 'EA', 'BOX', + 1, 'Product 1001'), + (1002, 'ITEM-0001002', '2024-01-01', NULL, + 'Sample item 1002', 25.00, 20.00, + 10, 'BrandA', 101, 'ClassA', + 201, 'CategoryA', 301, 'ManufactA', + 'L', 'Std', 'Green', 'EA', 'BOX', + 1, 'Product 1002'); +""" +} + diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/basic.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/basic.groovy deleted file mode 100644 index e37e9a65da11cb..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/basic.groovy +++ /dev/null @@ -1,203 +0,0 @@ -// 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. - -suite("basic") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" - - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - sql "set disable_join_reorder=true;" - sql """ - DROP TABLE IF EXISTS shunt_log_com_dd_library; - """ - sql """ - DROP TABLE IF EXISTS com_dd_library; - """ - - sql""" - CREATE TABLE `shunt_log_com_dd_library` ( - `device_id` varchar(255) NOT NULL, - `experiment_id` varchar(255) NOT NULL, - `group_id` varchar(255) NOT NULL - ) ENGINE=OLAP - DUPLICATE KEY(`device_id`) - DISTRIBUTED BY HASH(`device_id`) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - sql""" - CREATE TABLE `com_dd_library` ( - `event_id` varchar(255) NULL, - `device_id` varchar(255) NULL DEFAULT "", - `time_stamp` datetime NULL - ) ENGINE=OLAP - DUPLICATE KEY(`event_id`) - DISTRIBUTED BY HASH(`device_id`) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - qt_1 """ - explain shape plan - select - b.group_id, - COUNT(a.event_id) - from - com_dd_library a - join shunt_log_com_dd_library b on - a.device_id = b.device_id - where - a.event_id = "ad_click" - and b.experiment_id = 37 - group by - b.group_id; - """ - - qt_2 """ - explain shape plan - select - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id) - from - com_dd_library a - join shunt_log_com_dd_library b on - a.device_id = b.device_id - where - b.experiment_id = 73 - group by - b.group_id, - b.experiment_id, - a.event_id; - """ - - qt_3 """ - explain shape plan - select - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id), - date_format(a.time_stamp, '%Y-%m-%d') as dayF - from - com_dd_library a - join shunt_log_com_dd_library b on - a.device_id = b.device_id - where - b.experiment_id = 73 - group by - b.group_id, - b.experiment_id, - a.event_id, - dayF; - """ - - qt_4 """ - explain shape plan - select - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id) - from - com_dd_library a - join shunt_log_com_dd_library b on - a.device_id = b.device_id - group by - b.group_id, - b.experiment_id, - a.event_id; - """ - - qt_with_hint_1 """ - explain shape plan - select /*+ USE_CBO_RULE(push_down_agg_through_join, push_down_agg_through_join_one_side) */ - b.group_id, - COUNT(a.event_id) - from - com_dd_library a - join shunt_log_com_dd_library b on - a.device_id = b.device_id - where - a.event_id = "ad_click" - and b.experiment_id = 37 - group by - b.group_id; - """ - - qt_with_hint_2 """ - explain shape plan - select /*+ USE_CBO_RULE(push_down_agg_through_join, push_down_agg_through_join_one_side) */ - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id) - from - com_dd_library a - join shunt_log_com_dd_library b on - a.device_id = b.device_id - where - b.experiment_id = 73 - group by - b.group_id, - b.experiment_id, - a.event_id; - """ - - qt_with_hint_3 """ - explain shape plan - select /*+ USE_CBO_RULE(push_down_agg_through_join, push_down_agg_through_join_one_side) */ - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id), - date_format(a.time_stamp, '%Y-%m-%d') as dayF - from - com_dd_library a - join shunt_log_com_dd_library b on - a.device_id = b.device_id - where - b.experiment_id = 73 - group by - b.group_id, - b.experiment_id, - a.event_id, - dayF; - """ - - qt_with_hint_4 """ - explain shape plan - select /*+ USE_CBO_RULE(push_down_agg_through_join, push_down_agg_through_join_one_side) */ - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id) - from - com_dd_library a - join shunt_log_com_dd_library b on - a.device_id = b.device_id - group by - b.group_id, - b.experiment_id, - a.event_id; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/basic_one_side.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/basic_one_side.groovy deleted file mode 100644 index 78503039d224be..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/basic_one_side.groovy +++ /dev/null @@ -1,204 +0,0 @@ -// 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. - -suite("basic_one_side") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" - - sql "set disable_nereids_rules=PRUNE_EMPTY_PARTITION" - sql "set disable_join_reorder=true" - - sql """ - DROP TABLE IF EXISTS shunt_log_com_dd_library_one_side; - """ - sql """ - DROP TABLE IF EXISTS com_dd_library_one_side; - """ - - sql""" - CREATE TABLE `shunt_log_com_dd_library_one_side` ( - `device_id` varchar(255) NOT NULL, - `experiment_id` varchar(255) NOT NULL, - `group_id` varchar(255) NOT NULL - ) ENGINE=OLAP - DUPLICATE KEY(`device_id`) - DISTRIBUTED BY HASH(`device_id`) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - sql""" - CREATE TABLE `com_dd_library_one_side` ( - `event_id` varchar(255) NULL, - `device_id` varchar(255) NULL DEFAULT "", - `time_stamp` datetime NULL - ) ENGINE=OLAP - DUPLICATE KEY(`event_id`) - DISTRIBUTED BY HASH(`device_id`) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - qt_1 """ - explain shape plan - select - b.group_id, - COUNT(a.event_id) - from - com_dd_library_one_side a - join shunt_log_com_dd_library_one_side b on - a.device_id = b.device_id - where - a.event_id = "ad_click" - and b.experiment_id = 37 - group by - b.group_id; - """ - - qt_2 """ - explain shape plan - select - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id) - from - com_dd_library_one_side a - join shunt_log_com_dd_library_one_side b on - a.device_id = b.device_id - where - b.experiment_id = 73 - group by - b.group_id, - b.experiment_id, - a.event_id; - """ - - qt_3 """ - explain shape plan - select - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id), - date_format(a.time_stamp, '%Y-%m-%d') as dayF - from - com_dd_library_one_side a - join shunt_log_com_dd_library_one_side b on - a.device_id = b.device_id - where - b.experiment_id = 73 - group by - b.group_id, - b.experiment_id, - a.event_id, - dayF; - """ - - qt_4 """ - explain shape plan - select - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id) - from - com_dd_library_one_side a - join shunt_log_com_dd_library_one_side b on - a.device_id = b.device_id - group by - b.group_id, - b.experiment_id, - a.event_id; - """ - - qt_with_hint_1 """ - explain shape plan - select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ - b.group_id, - COUNT(a.event_id) - from - com_dd_library_one_side a - join shunt_log_com_dd_library_one_side b on - a.device_id = b.device_id - where - a.event_id = "ad_click" - and b.experiment_id = 37 - group by - b.group_id; - """ - - qt_with_hint_2 """ - explain shape plan - select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id) - from - com_dd_library_one_side a - join shunt_log_com_dd_library_one_side b on - a.device_id = b.device_id - where - b.experiment_id = 73 - group by - b.group_id, - b.experiment_id, - a.event_id; - """ - - qt_with_hint_3 """ - explain shape plan - select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id), - date_format(a.time_stamp, '%Y-%m-%d') as dayF - from - com_dd_library_one_side a - join shunt_log_com_dd_library_one_side b on - a.device_id = b.device_id - where - b.experiment_id = 73 - group by - b.group_id, - b.experiment_id, - a.event_id, - dayF; - """ - - qt_with_hint_4 """ - explain shape plan - select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ - a.event_id, - b.experiment_id, - b.group_id, - COUNT(a.event_id) - from - com_dd_library_one_side a - join shunt_log_com_dd_library_one_side b on - a.device_id = b.device_id - group by - b.group_id, - b.experiment_id, - a.event_id; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_aggr_distinct_through_join_one_side_cust.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_aggr_distinct_through_join_one_side_cust.groovy deleted file mode 100644 index 0dad9209972554..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_aggr_distinct_through_join_one_side_cust.groovy +++ /dev/null @@ -1,130 +0,0 @@ -// 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. - -suite("push_down_aggr_distinct_through_join_one_side_cust") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "set be_number_for_test=1" - sql "set DISABLE_NEREIDS_RULES='PRUNE_EMPTY_PARTITION, ELIMINATE_GROUP_BY_KEY_BY_UNIFORM,CONSTANT_PROPAGATION'" - - sql """ - DROP TABLE IF EXISTS dwd_com_abtest_result_inc_ymds; - DROP TABLE IF EXISTS dwd_tracking_sensor_init_tmp_ymds; - """ - - sql """ - CREATE TABLE `dwd_com_abtest_result_inc_ymds` ( - `app_name` varchar(255) NULL, - `user_key` text NULL, - `group_name` text NULL, - `dt` date NOT NULL, - ) ENGINE=OLAP - DUPLICATE KEY(`app_name`) - AUTO PARTITION BY RANGE (date_trunc(`dt`, 'day')) - (PARTITION p20240813000000 VALUES [('2024-08-13'), ('2024-08-14')), - PARTITION p20240814000000 VALUES [('2024-08-14'), ('2024-08-15')), - PARTITION p20240815000000 VALUES [('2024-08-15'), ('2024-08-16')), - PARTITION p20240816000000 VALUES [('2024-08-16'), ('2024-08-17')), - PARTITION p20240817000000 VALUES [('2024-08-17'), ('2024-08-18')), - PARTITION p20240818000000 VALUES [('2024-08-18'), ('2024-08-19')), - PARTITION p20240819000000 VALUES [('2024-08-19'), ('2024-08-20'))) - DISTRIBUTED BY HASH(`app_name`) BUCKETS 1 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1", - "min_load_replica_num" = "-1", - "is_being_synced" = "false", - "storage_medium" = "hdd", - "storage_format" = "V2", - "inverted_index_storage_format" = "V2", - "light_schema_change" = "true", - "disable_auto_compaction" = "false", - "enable_single_replica_compaction" = "false", - "group_commit_interval_ms" = "10000", - "group_commit_data_bytes" = "134217728" - ); - - CREATE TABLE `dwd_tracking_sensor_init_tmp_ymds` ( - `ip` varchar(20) NULL, - `gz_user_id` text NULL, - `dt` date NOT NULL - ) ENGINE=OLAP - DUPLICATE KEY(`ip`) - AUTO PARTITION BY RANGE (date_trunc(`dt`, 'day')) - (PARTITION p20240813000000 VALUES [('2024-08-13'), ('2024-08-14')), - PARTITION p20240814000000 VALUES [('2024-08-14'), ('2024-08-15')), - PARTITION p20240815000000 VALUES [('2024-08-15'), ('2024-08-16')), - PARTITION p20240816000000 VALUES [('2024-08-16'), ('2024-08-17')), - PARTITION p20240817000000 VALUES [('2024-08-17'), ('2024-08-18')), - PARTITION p20240818000000 VALUES [('2024-08-18'), ('2024-08-19')), - PARTITION p20240819000000 VALUES [('2024-08-19'), ('2024-08-20'))) - DISTRIBUTED BY HASH(`ip`) BUCKETS 10 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1", - "min_load_replica_num" = "-1", - "is_being_synced" = "false", - "storage_medium" = "hdd", - "storage_format" = "V2", - "inverted_index_storage_format" = "V2", - "light_schema_change" = "true", - "disable_auto_compaction" = "false", - "enable_single_replica_compaction" = "false", - "group_commit_interval_ms" = "10000", - "group_commit_data_bytes" = "134217728" - ); - """ - - sql """ - set topn_opt_limit_threshold=1024; - """ - - explain { - sql("""physical PLAN SELECT /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ - COUNT(DISTINCT dwd_tracking_sensor_init_tmp_ymds.gz_user_id) AS a2c1a830_1, - dwd_com_abtest_result_inc_ymds.group_name AS ab1011d6, - dwd_tracking_sensor_init_tmp_ymds.dt AS ad466123 - FROM dwd_tracking_sensor_init_tmp_ymds - LEFT JOIN dwd_com_abtest_result_inc_ymds - ON dwd_tracking_sensor_init_tmp_ymds.gz_user_id = dwd_com_abtest_result_inc_ymds.user_key - AND dwd_tracking_sensor_init_tmp_ymds.dt = dwd_com_abtest_result_inc_ymds.dt - WHERE dwd_tracking_sensor_init_tmp_ymds.dt BETWEEN '2024-08-15' AND '2024-08-15' - AND dwd_com_abtest_result_inc_ymds.dt BETWEEN '2024-08-15' AND '2024-08-15' - GROUP BY 2, 3 ORDER BY 3 asc limit 10000;"""); - contains"groupByExpr=[gz_user_id#1, dt#2]" - contains"groupByExpr=[gz_user_id#1, dt#2, group_name#5], outputExpr=[gz_user_id#1, dt#2, group_name#5]" - contains"[group_name#5, dt#2]" - contains"groupByExpr=[group_name#5, dt#2], outputExpr=[group_name#5, dt#2, count(partial_count(gz_user_id)#12) AS `a2c1a830_1`#7]" - } - - explain { - sql("""physical PLAN SELECT /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ - COUNT(DISTINCT dwd_tracking_sensor_init_tmp_ymds.ip) AS a2c1a830_1, - dwd_com_abtest_result_inc_ymds.group_name AS ab1011d6, - dwd_tracking_sensor_init_tmp_ymds.dt AS ad466123 - FROM dwd_tracking_sensor_init_tmp_ymds - LEFT JOIN dwd_com_abtest_result_inc_ymds - ON dwd_tracking_sensor_init_tmp_ymds.gz_user_id = dwd_com_abtest_result_inc_ymds.user_key - AND dwd_tracking_sensor_init_tmp_ymds.dt = dwd_com_abtest_result_inc_ymds.dt - WHERE dwd_tracking_sensor_init_tmp_ymds.dt BETWEEN '2024-08-15' AND '2024-08-15' - AND dwd_com_abtest_result_inc_ymds.dt BETWEEN '2024-08-15' AND '2024-08-15' - GROUP BY 2, 3 ORDER BY 3 asc limit 10000;"""); - contains"groupByExpr=[ip#0, gz_user_id#1, dt#2], outputExpr=[ip#0, gz_user_id#1, dt#2]" - contains"groupByExpr=[ip#0, dt#2, group_name#5], outputExpr=[ip#0, dt#2, group_name#5]" - contains"groupByExpr=[group_name#5, dt#2], outputExpr=[group_name#5, dt#2, partial_count(ip#0) AS `partial_count(ip)`#12]" - contains"groupByExpr=[group_name#5, dt#2], outputExpr=[group_name#5, dt#2, count(partial_count(ip)#12) AS `a2c1a830_1`#7]" - } -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_distinct_through_join_one_side.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_distinct_through_join_one_side.groovy deleted file mode 100644 index 26d8a78512ff02..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_distinct_through_join_one_side.groovy +++ /dev/null @@ -1,259 +0,0 @@ -// 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. - -suite("push_down_count_distinct_through_join_one_side") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "set be_number_for_test=1" - - sql """ - DROP TABLE IF EXISTS count_with_distinct_t; - """ - - sql """ - CREATE TABLE IF NOT EXISTS count_with_distinct_t( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into count_with_distinct_t values (1, 1, 'a')" - sql "insert into count_with_distinct_t values (2, null, 'a')" - sql "insert into count_with_distinct_t values (3, 1, null)" - sql "insert into count_with_distinct_t values (4, 2, 'b')" - sql "insert into count_with_distinct_t values (5, null, 'b')" - sql "insert into count_with_distinct_t values (6, 2, null)" - sql "insert into count_with_distinct_t values (7, 3, 'c')" - sql "insert into count_with_distinct_t values (8, null, 'c')" - sql "insert into count_with_distinct_t values (9, 3, null)" - sql "insert into count_with_distinct_t values (10, null, null)" - sql "analyze table count_with_distinct_t with full with sync;" - - order_qt_groupby_pushdown_basic """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 left join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_right_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 right join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_full_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 full join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_semi_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 inner join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_anti_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 left anti join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_complex_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score), avg(t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_subquery """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from count_with_distinct_t where score > 10) t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_outer_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 left join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_deep_subquery """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from count_with_distinct_t) count_with_distinct_t where score > 10) t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_having """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name having count(distinct t1.score) > 100; - """ - - order_qt_groupby_pushdown_mixed_aggregates """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score), sum(distinct t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_multi_table_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id join count_with_distinct_t t3 on t1.name = t3.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_order_by """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - order_qt_groupby_pushdown_multiple_equal_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ sum(distinct t1.score), count(distinct t2.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_non_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ t1.name, count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ t1.name, count(distinct t1.score), count(distinct t2.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_where_clause """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - order_qt_groupby_pushdown_varied_aggregates """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score), avg(t1.id), count(distinct t2.name) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_with_order_by_limit """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name order by count(distinct t1.score) limit 10; - """ - - order_qt_groupby_pushdown_alias_multiple_equal_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1_alias.score) from count_with_distinct_t t1_alias join count_with_distinct_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - order_qt_groupby_pushdown_complex_join_condition """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_function_processed_columns """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct LENGTH(t1.name)) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_nested_queries """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from count_with_distinct_t where score > 20) t1 join (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from count_with_distinct_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_basic """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 left join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_right_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 right join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_full_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 full join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_semi_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 inner join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_anti_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 left anti join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_complex_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score), avg(t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_subquery """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from count_with_distinct_t where score > 10) t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_outer_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 left join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_deep_subquery """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from count_with_distinct_t) count_with_distinct_t where score > 10) t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_having """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name having count(distinct t1.score) > 100; - """ - - order_qt_with_hint_groupby_pushdown_mixed_aggregates """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score), sum(distinct t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_multi_table_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id join count_with_distinct_t t3 on t1.name = t3.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_order_by """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ sum(distinct t1.score), count(distinct t2.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ t1.name, count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ t1.name, count(distinct t1.score), count(distinct t2.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_where_clause """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_varied_aggregates """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score), avg(t1.id), count(distinct t2.name) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_order_by_limit """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name order by count(distinct t1.score) limit 10; - """ - - order_qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1_alias.score) from count_with_distinct_t t1_alias join count_with_distinct_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - order_qt_with_hint_groupby_pushdown_complex_join_condition """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from count_with_distinct_t t1 join count_with_distinct_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_function_processed_columns """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct LENGTH(t1.name)) from count_with_distinct_t t1, count_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_nested_queries """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ count(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from count_with_distinct_t where score > 20) t1 join (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from count_with_distinct_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_through_join.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_through_join.groovy deleted file mode 100644 index 742d3e1026fa98..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_through_join.groovy +++ /dev/null @@ -1,429 +0,0 @@ -// 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. - -suite("push_down_count_through_join") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" - sql "set be_number_for_test=1" - - sql """ - DROP TABLE IF EXISTS count_t; - """ - - sql """ - CREATE TABLE IF NOT EXISTS count_t( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into count_t values (1, 1, 'a')" - sql "insert into count_t values (2, null, 'a')" - sql "insert into count_t values (3, 1, null)" - sql "insert into count_t values (4, 2, 'b')" - sql "insert into count_t values (5, null, 'b')" - sql "insert into count_t values (6, 2, null)" - sql "insert into count_t values (7, 3, 'c')" - sql "insert into count_t values (8, null, 'c')" - sql "insert into count_t values (9, 3, null)" - sql "insert into count_t values (10, null, null)" - sql "analyze table count_t with sync;" - qt_groupby_pushdown_basic """ - explain shape plan select count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_join """ - explain shape plan select count(t1.score) from count_t t1 left join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_right_join """ - explain shape plan select count(t1.score) from count_t t1 right join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_full_join """ - explain shape plan select count(t1.score) from count_t t1 full join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_semi_join """ - explain shape plan select count(t1.score) from count_t t1 inner join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_anti_join """ - explain shape plan select count(t1.score) from count_t t1 left anti join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_complex_conditions """ - explain shape plan select count(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_aggregate """ - explain shape plan select count(t1.score), avg(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_subquery """ - explain shape plan select count(t1.score) from (select * from count_t where score > 10) t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_outer_join """ - explain shape plan select count(t1.score) from count_t t1 left join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_deep_subquery """ - explain shape plan select count(t1.score) from (select * from (select * from count_t) count_t where score > 10) t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_having """ - explain shape plan select count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name having count(t1.score) > 100; - """ - - qt_groupby_pushdown_mixed_aggregates """ - explain shape plan select count(t1.score), count(*), max(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_multi_table_join_1 """ - explain shape plan select count(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id join count_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_groupby_pushdown_with_order_by """ - explain shape plan select count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select max(t1.score), count(t2.score) from count_t t1 join count_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select t1.name, count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select t1.name, count(t1.score), count(t2.score) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_where_clause """ - explain shape plan select count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_groupby_pushdown_varied_aggregates """ - explain shape plan select count(t1.score), avg(t1.id), count(t2.name) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_with_order_by_limit """ - explain shape plan select count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name order by count(t1.score) limit 10; - """ - - qt_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select count(t1_alias.score) from count_t t1_alias join count_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_groupby_pushdown_complex_join_condition """ - explain shape plan select count(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_groupby_pushdown_function_processed_columns """ - explain shape plan select count(LENGTH(t1.name)) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_nested_queries """ - explain shape plan select count(t1.score) from (select * from count_t where score > 20) t1 join (select * from count_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - /* COUNT(*) */ - qt_groupby_pushdown_basic """ - explain shape plan select count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_join """ - explain shape plan select count(*) from count_t t1 left join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_right_join """ - explain shape plan select count(*) from count_t t1 right join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_full_join """ - explain shape plan select count(*) from count_t t1 full join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_semi_join """ - explain shape plan select count(*) from count_t t1 inner join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_anti_join """ - explain shape plan select count(*) from count_t t1 left anti join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_complex_conditions """ - explain shape plan select count(*) from count_t t1 join count_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_aggregate """ - explain shape plan select count(*) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_subquery """ - explain shape plan select count(*) from (select * from count_t where score > 10) t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_outer_join """ - explain shape plan select count(*) from count_t t1 left join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_deep_subquery """ - explain shape plan select count(*) from (select * from (select * from count_t) count_t where score > 10) t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_having """ - explain shape plan select count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name having count(*) > 100; - """ - - qt_groupby_pushdown_multi_table_join_2 """ - explain shape plan select count(*) from count_t t1 join count_t t2 on t1.id = t2.id join count_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_groupby_pushdown_with_order_by """ - explain shape plan select count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select count(*) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select t1.name, count(*) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_where_clause """ - explain shape plan select count(*) from count_t t1, count_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_groupby_pushdown_varied_aggregates """ - explain shape plan select count(*), avg(t1.id), count(t2.name) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_with_order_by_limit """ - explain shape plan select count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name order by count(*) limit 10; - """ - - qt_groupby_pushdown_complex_join_condition """ - explain shape plan select count(*) from count_t t1 join count_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_groupby_pushdown_nested_queries """ - explain shape plan select count(*) from (select * from count_t where score > 20) t1 join (select * from count_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_basic """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 left join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_right_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 right join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_full_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 full join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_semi_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 inner join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_anti_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 left anti join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_complex_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score), avg(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from (select * from count_t where score > 10) t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_outer_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 left join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_deep_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from (select * from (select * from count_t) count_t where score > 10) t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_having """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name having count(t1.score) > 100; - """ - - qt_with_hint_groupby_pushdown_mixed_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score), count(*), max(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_multi_table_join_1 """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id join count_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ max(t1.score), count(t2.score) from count_t t1 join count_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ t1.name, count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ t1.name, count(t1.score), count(t2.score) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_where_clause """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_varied_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score), avg(t1.id), count(t2.name) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by_limit """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name order by count(t1.score) limit 10; - """ - - qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1_alias.score) from count_t t1_alias join count_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_with_hint_groupby_pushdown_complex_join_condition """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from count_t t1 join count_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_function_processed_columns """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(LENGTH(t1.name)) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_nested_queries """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(t1.score) from (select * from count_t where score > 20) t1 join (select * from count_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - /* COUNT(*) */ - qt_with_hint_groupby_pushdown_basic """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 left join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_right_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 right join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_full_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 full join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_semi_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 inner join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_anti_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 left anti join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_complex_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 join count_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from (select * from count_t where score > 10) t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_outer_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 left join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_deep_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from (select * from (select * from count_t) count_t where score > 10) t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_having """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name having count(*) > 100; - """ - - qt_with_hint_groupby_pushdown_multi_table_join_2 """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 join count_t t2 on t1.id = t2.id join count_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ t1.name, count(*) from count_t t1, count_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_where_clause """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1, count_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_varied_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*), avg(t1.id), count(t2.name) from count_t t1 join count_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by_limit """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1, count_t t2 where t1.id = t2.id group by t1.name order by count(*) limit 10; - """ - - qt_with_hint_groupby_pushdown_complex_join_condition """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from count_t t1 join count_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_nested_queries """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ count(*) from (select * from count_t where score > 20) t1 join (select * from count_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.groovy deleted file mode 100644 index 79a9ae76e0d757..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_count_through_join_one_side.groovy +++ /dev/null @@ -1,524 +0,0 @@ -// 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. - -suite("push_down_count_through_join_one_side") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql 'set be_number_for_test=3' - sql "SET enable_fallback_to_original_planner=false" - sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" - sql "set be_number_for_test=1" - sql "set topn_opt_limit_threshold=1024" - sql """ - DROP TABLE IF EXISTS count_t_one_side; - """ - - sql """ - CREATE TABLE IF NOT EXISTS count_t_one_side( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into count_t_one_side values (1, 1, 'a')" - sql "insert into count_t_one_side values (2, null, 'a')" - sql "insert into count_t_one_side values (3, 1, null)" - sql "insert into count_t_one_side values (4, 2, 'b')" - sql "insert into count_t_one_side values (5, null, 'b')" - sql "insert into count_t_one_side values (6, 2, null)" - sql "insert into count_t_one_side values (7, 3, 'c')" - sql "insert into count_t_one_side values (8, null, 'c')" - sql "insert into count_t_one_side values (9, 3, null)" - sql "insert into count_t_one_side values (10, null, null)" - sql "analyze table count_t_one_side with sync;" - qt_groupby_pushdown_basic """ - explain shape plan select count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_join """ - explain shape plan select count(t1.score) from count_t_one_side t1 left join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_right_join """ - explain shape plan select count(t1.score) from count_t_one_side t1 right join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_full_join """ - explain shape plan select count(t1.score) from count_t_one_side t1 full join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_semi_join """ - explain shape plan select count(t1.score) from count_t_one_side t1 inner join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_anti_join """ - explain shape plan select count(t1.score) from count_t_one_side t1 left anti join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_complex_conditions """ - explain shape plan select count(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_aggregate """ - explain shape plan select count(t1.score), avg(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_subquery """ - explain shape plan select count(t1.score) from (select * from count_t_one_side where score > 10) t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_outer_join """ - explain shape plan select count(t1.score) from count_t_one_side t1 left join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_deep_subquery """ - explain shape plan select count(t1.score) from (select * from (select * from count_t_one_side) count_t_one_side where score > 10) t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_having """ - explain shape plan select count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name having count(t1.score) > 100; - """ - - qt_groupby_pushdown_mixed_aggregates """ - explain shape plan select count(t1.score), count(*), max(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_multi_table_join """ - explain shape plan select count(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id join count_t_one_side t3 on t1.name = t3.name group by t1.name; - """ - - qt_groupby_pushdown_with_order_by """ - explain shape plan select count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select max(t1.score), count(t2.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select t1.name, count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select t1.name, count(t1.score), count(t2.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_where_clause """ - explain shape plan select count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_groupby_pushdown_varied_aggregates """ - explain shape plan select count(t1.score), avg(t1.id), count(t2.name) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_with_order_by_limit """ - explain shape plan select count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name order by count(t1.score) limit 10; - """ - - qt_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select count(t1_alias.score) from count_t_one_side t1_alias join count_t_one_side t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_groupby_pushdown_complex_join_condition """ - explain shape plan select count(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_groupby_pushdown_function_processed_columns """ - explain shape plan select count(LENGTH(t1.name)) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_nested_queries """ - explain shape plan select count(t1.score) from (select * from count_t_one_side where score > 20) t1 join (select * from count_t_one_side where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - /* COUNT(*) */ - qt_groupby_pushdown_basic """ - explain shape plan select count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_join """ - explain shape plan select count(*) from count_t_one_side t1 left join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_right_join """ - explain shape plan select count(*) from count_t_one_side t1 right join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_full_join """ - explain shape plan select count(*) from count_t_one_side t1 full join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_semi_join """ - explain shape plan select count(*) from count_t_one_side t1 inner join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_anti_join """ - explain shape plan select count(*) from count_t_one_side t1 left anti join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_complex_conditions """ - explain shape plan select count(*) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_aggregate """ - explain shape plan select count(*) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_subquery """ - explain shape plan select count(*) from (select * from count_t_one_side where score > 10) t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_outer_join """ - explain shape plan select count(*) from count_t_one_side t1 left join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_deep_subquery """ - explain shape plan select count(*) from (select * from (select * from count_t_one_side) count_t_one_side where score > 10) t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_having """ - explain shape plan select count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name having count(*) > 100; - """ - - qt_groupby_pushdown_multi_table_join """ - explain shape plan select count(*) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id join count_t_one_side t3 on t1.name = t3.name group by t1.name; - """ - - qt_groupby_pushdown_with_order_by """ - explain shape plan select count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select t1.name, count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_where_clause """ - explain shape plan select count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_groupby_pushdown_varied_aggregates """ - explain shape plan select count(*), avg(t1.id), count(t2.name) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_with_order_by_limit """ - explain shape plan select count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name order by count(*) limit 10; - """ - - qt_groupby_pushdown_complex_join_condition """ - explain shape plan select count(*) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_groupby_pushdown_nested_queries """ - explain shape plan select count(*) from (select * from count_t_one_side where score > 20) t1 join (select * from count_t_one_side where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_basic """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 left join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_right_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 right join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_full_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 full join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_semi_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 inner join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_anti_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 left anti join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_complex_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score), avg(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from (select * from count_t_one_side where score > 10) t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_outer_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 left join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_deep_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from (select * from (select * from count_t_one_side) count_t_one_side where score > 10) t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_having """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name having count(t1.score) > 100; - """ - - qt_with_hint_groupby_pushdown_mixed_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score), count(*), max(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_multi_table_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id join count_t_one_side t3 on t1.name = t3.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score), count(t2.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, count(t1.score), count(t2.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_where_clause """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_varied_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score), avg(t1.id), count(t2.name) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by_limit """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name order by count(t1.score) limit 10; - """ - - qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1_alias.score) from count_t_one_side t1_alias join count_t_one_side t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_with_hint_groupby_pushdown_complex_join_condition """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_function_processed_columns """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(LENGTH(t1.name)) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_nested_queries """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(t1.score) from (select * from count_t_one_side where score > 20) t1 join (select * from count_t_one_side where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - /* COUNT(*) */ - qt_with_hint_groupby_pushdown_basic """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 left join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_right_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 right join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_full_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 full join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_semi_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 inner join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_anti_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 left anti join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_complex_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from (select * from count_t_one_side where score > 10) t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_outer_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 left join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_deep_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from (select * from (select * from count_t_one_side) count_t_one_side where score > 10) t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_having """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name having count(*) > 100; - """ - - qt_with_hint_groupby_pushdown_multi_table_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id join count_t_one_side t3 on t1.name = t3.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_where_clause """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_varied_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*), avg(t1.id), count(t2.name) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by_limit """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1, count_t_one_side t2 where t1.id = t2.id group by t1.name order by count(*) limit 10; - """ - - qt_with_hint_groupby_pushdown_complex_join_condition """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from count_t_one_side t1 join count_t_one_side t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_nested_queries """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ count(*) from (select * from count_t_one_side where score > 20) t1 join (select * from count_t_one_side where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - sql """ - drop table if exists dw_user_b2c_tracking_info_tmp_ymd; - create table dw_user_b2c_tracking_info_tmp_ymd ( - guid int, - dt varchar, - first_visit_time varchar - )Engine=Olap - DUPLICATE KEY(guid) - distributed by hash(dt) buckets 3 - properties('replication_num' = '1'); - - insert into dw_user_b2c_tracking_info_tmp_ymd values (1, '2024-08-19', '2024-08-19'); - - drop table if exists dwd_tracking_sensor_init_tmp_ymd; - create table dwd_tracking_sensor_init_tmp_ymd ( - guid int, - dt varchar, - tracking_type varchar - )Engine=Olap - DUPLICATE KEY(guid) - distributed by hash(dt) buckets 3 - properties('replication_num' = '1'); - - insert into dwd_tracking_sensor_init_tmp_ymd values(1, '2024-08-19', 'click'), (1, '2024-08-19', 'click'); - """ - sql """ - set disable_join_reorder=true; - """ - - qt_shape """ - explain shape plan - SELECT /*+use_cbo_rule(PUSH_DOWN_AGG_THROUGH_JOIN_ONE_SIDE)*/ - Count(*) AS accee593, - CASE - WHEN dwd_tracking_sensor_init_tmp_ymd.dt = - Substring(dw_user_b2c_tracking_info_tmp_ymd.first_visit_time, 1, - 10) THEN - '是' - WHEN dwd_tracking_sensor_init_tmp_ymd.dt > - Substring(dw_user_b2c_tracking_info_tmp_ymd.first_visit_time, 1, - 10) THEN - '否' - ELSE '-1' - end AS a1302fb2, - dwd_tracking_sensor_init_tmp_ymd.dt AS ad466123 - FROM dwd_tracking_sensor_init_tmp_ymd - LEFT JOIN dw_user_b2c_tracking_info_tmp_ymd - ON dwd_tracking_sensor_init_tmp_ymd.guid = - dw_user_b2c_tracking_info_tmp_ymd.guid - AND dwd_tracking_sensor_init_tmp_ymd.dt = - dw_user_b2c_tracking_info_tmp_ymd.dt - WHERE dwd_tracking_sensor_init_tmp_ymd.dt = '2024-08-19' - AND dw_user_b2c_tracking_info_tmp_ymd.dt = '2024-08-19' - AND dwd_tracking_sensor_init_tmp_ymd.dt >= - Substring(dw_user_b2c_tracking_info_tmp_ymd.first_visit_time, 1, 10) - AND dwd_tracking_sensor_init_tmp_ymd.tracking_type = 'click' - GROUP BY 2, - 3 - ORDER BY 3 ASC - LIMIT 10000; - """ - - qt_agg_pushed """ - SELECT /*+use_cbo_rule(PUSH_DOWN_AGG_THROUGH_JOIN_ONE_SIDE)*/ - Count(*) AS accee593, - CASE - WHEN dwd_tracking_sensor_init_tmp_ymd.dt = - Substring(dw_user_b2c_tracking_info_tmp_ymd.first_visit_time, 1, - 10) THEN - '是' - WHEN dwd_tracking_sensor_init_tmp_ymd.dt > - Substring(dw_user_b2c_tracking_info_tmp_ymd.first_visit_time, 1, - 10) THEN - '否' - ELSE '-1' - end AS a1302fb2, - dwd_tracking_sensor_init_tmp_ymd.dt AS ad466123 - FROM dwd_tracking_sensor_init_tmp_ymd - LEFT JOIN dw_user_b2c_tracking_info_tmp_ymd - ON dwd_tracking_sensor_init_tmp_ymd.guid = - dw_user_b2c_tracking_info_tmp_ymd.guid - AND dwd_tracking_sensor_init_tmp_ymd.dt = - dw_user_b2c_tracking_info_tmp_ymd.dt - WHERE dwd_tracking_sensor_init_tmp_ymd.dt = '2024-08-19' - AND dw_user_b2c_tracking_info_tmp_ymd.dt = '2024-08-19' - AND dwd_tracking_sensor_init_tmp_ymd.dt >= - Substring(dw_user_b2c_tracking_info_tmp_ymd.first_visit_time, 1, 10) - AND dwd_tracking_sensor_init_tmp_ymd.tracking_type = 'click' - GROUP BY 2, - 3 - ORDER BY 3 ASC - LIMIT 10000; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_max_through_join.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_max_through_join.groovy deleted file mode 100644 index fb2df76cf206b7..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_max_through_join.groovy +++ /dev/null @@ -1,261 +0,0 @@ -// 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. - -suite("push_down_max_through_join") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" - sql "set be_number_for_test=1" - - sql """ - DROP TABLE IF EXISTS max_t; - """ - - sql """ - CREATE TABLE IF NOT EXISTS max_t( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into max_t values (1, 1, 'a')" - sql "insert into max_t values (2, null, 'a')" - sql "insert into max_t values (3, 1, null)" - sql "insert into max_t values (4, 2, 'b')" - sql "insert into max_t values (5, null, 'b')" - sql "insert into max_t values (6, 2, null)" - sql "insert into max_t values (7, 3, 'c')" - sql "insert into max_t values (8, null, 'c')" - sql "insert into max_t values (9, 3, null)" - sql "insert into max_t values (10, null, null)" - sql "analyze table max_t with sync;" - - qt_groupby_pushdown_basic """ - explain shape plan select max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_join """ - explain shape plan select max(t1.score) from max_t t1 left join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_right_join """ - explain shape plan select max(t1.score) from max_t t1 right join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_full_join """ - explain shape plan select max(t1.score) from max_t t1 full join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_semi_join """ - explain shape plan select max(t1.score) from max_t t1 inner join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_anti_join """ - explain shape plan select max(t1.score) from max_t t1 left anti join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_complex_conditions """ - explain shape plan select max(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_aggregate """ - explain shape plan select max(t1.score), avg(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_subquery """ - explain shape plan select max(t1.score) from (select * from max_t where score > 10) t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_outer_join """ - explain shape plan select max(t1.score) from max_t t1 left join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_deep_subquery """ - explain shape plan select max(t1.score) from (select * from (select * from max_t) max_t where score > 10) t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_having """ - explain shape plan select max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name having max(t1.score) > 100; - """ - - qt_groupby_pushdown_mixed_aggregates """ - explain shape plan select max(t1.score), count(*), sum(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_multi_table_join """ - explain shape plan select max(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id join max_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_groupby_pushdown_with_order_by """ - explain shape plan select max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select sum(t1.score), max(t2.score) from max_t t1 join max_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select t1.name, max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select t1.name, max(t1.score), max(t2.score) from max_t t1, max_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_where_clause """ - explain shape plan select max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_groupby_pushdown_varied_aggregates """ - explain shape plan select max(t1.score), avg(t1.id), count(t2.name) from max_t t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_with_order_by_limit """ - explain shape plan select max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name order by max(t1.score) limit 10; - """ - - qt_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select max(t1_alias.score) from max_t t1_alias join max_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_groupby_pushdown_complex_join_condition """ - explain shape plan select max(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_groupby_pushdown_function_processed_columns """ - explain shape plan select max(LENGTH(t1.name)) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_nested_queries """ - explain shape plan select max(t1.score) from (select * from max_t where score > 20) t1 join (select * from max_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_basic """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 left join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_right_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 right join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_full_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 full join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_semi_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 inner join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_anti_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 left anti join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_complex_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score), avg(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from (select * from max_t where score > 10) t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_outer_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 left join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_deep_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from (select * from (select * from max_t) max_t where score > 10) t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_having """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name having max(t1.score) > 100; - """ - - qt_with_hint_groupby_pushdown_mixed_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score), count(*), sum(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_multi_table_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id join max_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score), max(t2.score) from max_t t1 join max_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, max(t1.score), max(t2.score) from max_t t1, max_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_where_clause """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_varied_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score), avg(t1.id), count(t2.name) from max_t t1 join max_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by_limit """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name order by max(t1.score) limit 10; - """ - - qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1_alias.score) from max_t t1_alias join max_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_with_hint_groupby_pushdown_complex_join_condition """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from max_t t1 join max_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_function_processed_columns """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(LENGTH(t1.name)) from max_t t1, max_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_nested_queries """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score) from (select * from max_t where score > 20) t1 join (select * from max_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_min_distinct_through_join_one_side.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_min_distinct_through_join_one_side.groovy deleted file mode 100644 index e88dd8cfe13bb5..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_min_distinct_through_join_one_side.groovy +++ /dev/null @@ -1,257 +0,0 @@ -// 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. - -suite("push_down_min_distinct_through_join_one_side") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "set be_number_for_test=1" - sql """ - DROP TABLE IF EXISTS min_with_distinct_t; - """ - - sql """ - CREATE TABLE IF NOT EXISTS min_with_distinct_t( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into min_with_distinct_t values (1, 1, 'a')" - sql "insert into min_with_distinct_t values (2, null, 'a')" - sql "insert into min_with_distinct_t values (3, 1, null)" - sql "insert into min_with_distinct_t values (4, 2, 'b')" - sql "insert into min_with_distinct_t values (5, null, 'b')" - sql "insert into min_with_distinct_t values (6, 2, null)" - sql "insert into min_with_distinct_t values (7, 3, 'c')" - sql "insert into min_with_distinct_t values (8, null, 'c')" - sql "insert into min_with_distinct_t values (9, 3, null)" - sql "insert into min_with_distinct_t values (10, null, null)" - sql "analyze table min_with_distinct_t with sync;" - order_qt_groupby_pushdown_basic """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 left join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_right_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 right join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_full_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 full join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_semi_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 inner join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_anti_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 left anti join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_complex_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score), avg(t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_subquery """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from min_with_distinct_t where score > 10) t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_outer_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 left join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_deep_subquery """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from min_with_distinct_t) min_with_distinct_t where score > 10) t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_having """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name having min(distinct t1.score) > 100; - """ - - order_qt_groupby_pushdown_mixed_aggregates """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score), sum(distinct t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_multi_table_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id join min_with_distinct_t t3 on t1.name = t3.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_order_by """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - order_qt_groupby_pushdown_multiple_equal_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ sum(distinct t1.score), min(distinct t2.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_non_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ t1.name, min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ t1.name, min(distinct t1.score), min(distinct t2.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_where_clause """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - order_qt_groupby_pushdown_varied_aggregates """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score), avg(t1.id), min(distinct t2.name) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_with_order_by_limit """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name order by min(distinct t1.score) limit 10; - """ - - order_qt_groupby_pushdown_alias_multiple_equal_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1_alias.score) from min_with_distinct_t t1_alias join min_with_distinct_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - order_qt_groupby_pushdown_complex_join_condition """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_function_processed_columns """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct LENGTH(t1.name)) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_nested_queries """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from min_with_distinct_t where score > 20) t1 join (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from min_with_distinct_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_basic """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 left join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_right_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 right join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_full_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 full join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_semi_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 inner join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_anti_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 left anti join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_complex_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score), avg(t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_subquery """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from min_with_distinct_t where score > 10) t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_outer_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 left join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_deep_subquery """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from min_with_distinct_t) min_with_distinct_t where score > 10) t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_having """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name having min(distinct t1.score) > 100; - """ - - order_qt_with_hint_groupby_pushdown_mixed_aggregates """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score), sum(distinct t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_multi_table_join """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id join min_with_distinct_t t3 on t1.name = t3.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_order_by """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ sum(distinct t1.score), min(distinct t2.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ t1.name, min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ t1.name, min(distinct t1.score), min(distinct t2.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_where_clause """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_varied_aggregates """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score), avg(t1.id), min(distinct t2.name) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_order_by_limit """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name order by min(distinct t1.score) limit 10; - """ - - order_qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1_alias.score) from min_with_distinct_t t1_alias join min_with_distinct_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - order_qt_with_hint_groupby_pushdown_complex_join_condition """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from min_with_distinct_t t1 join min_with_distinct_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_function_processed_columns """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct LENGTH(t1.name)) from min_with_distinct_t t1, min_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_nested_queries """ - select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ min(distinct t1.score) from (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from min_with_distinct_t where score > 20) t1 join (select /*+use_cbo_rule(PUSH_DOWN_AGG_WITH_DISTINCT_THROUGH_JOIN_ONE_SIDE)*/ * from min_with_distinct_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_min_through_join.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_min_through_join.groovy deleted file mode 100644 index 9ee791799ae4bb..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_min_through_join.groovy +++ /dev/null @@ -1,260 +0,0 @@ -// 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. - -suite("push_down_min_through_join") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" - sql "set be_number_for_test=1" - sql "set disable_join_reorder=true" - - sql """ - DROP TABLE IF EXISTS min_t; - """ - - sql """ - CREATE TABLE IF NOT EXISTS min_t( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into min_t values (1, 1, 'a')" - sql "insert into min_t values (2, null, 'a')" - sql "insert into min_t values (3, 1, null)" - sql "insert into min_t values (4, 2, 'b')" - sql "insert into min_t values (5, null, 'b')" - sql "insert into min_t values (6, 2, null)" - sql "insert into min_t values (7, 3, 'c')" - sql "insert into min_t values (8, null, 'c')" - sql "insert into min_t values (9, 3, null)" - sql "insert into min_t values (10, null, null)" - sql "analyze table min_t with sync;" - qt_groupby_pushdown_basic """ - explain shape plan select min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_join """ - explain shape plan select min(t1.score) from min_t t1 left join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_right_join """ - explain shape plan select min(t1.score) from min_t t1 right join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_full_join """ - explain shape plan select min(t1.score) from min_t t1 full join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_semi_join """ - explain shape plan select min(t1.score) from min_t t1 inner join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_anti_join """ - explain shape plan select min(t1.score) from min_t t1 left anti join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_complex_conditions """ - explain shape plan select min(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_aggregate """ - explain shape plan select min(t1.score), avg(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_subquery """ - explain shape plan select min(t1.score) from (select * from min_t where score > 10) t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_outer_join """ - explain shape plan select min(t1.score) from min_t t1 left join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_deep_subquery """ - explain shape plan select min(t1.score) from (select * from (select * from min_t) min_t where score > 10) t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_having """ - explain shape plan select min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name having min(t1.score) > 100; - """ - - qt_groupby_pushdown_mixed_aggregates """ - explain shape plan select min(t1.score), count(*), sum(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_multi_table_join """ - explain shape plan select min(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id join min_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_groupby_pushdown_with_order_by """ - explain shape plan select min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select sum(t1.score), min(t2.score) from min_t t1 join min_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select t1.name, min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select t1.name, min(t1.score), min(t2.score) from min_t t1, min_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_where_clause """ - explain shape plan select min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_groupby_pushdown_varied_aggregates """ - explain shape plan select min(t1.score), avg(t1.id), count(t2.name) from min_t t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_with_order_by_limit """ - explain shape plan select min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name order by min(t1.score) limit 10; - """ - - qt_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select min(t1_alias.score) from min_t t1_alias join min_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_groupby_pushdown_complex_join_condition """ - explain shape plan select min(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_groupby_pushdown_function_processed_columns """ - explain shape plan select min(LENGTH(t1.name)) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_nested_queries """ - explain shape plan select min(t1.score) from (select * from min_t where score > 20) t1 join (select * from min_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_basic """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 left join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_right_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 right join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_full_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 full join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_semi_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 inner join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_anti_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 left anti join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_complex_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score), avg(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from (select * from min_t where score > 10) t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_outer_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 left join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_deep_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from (select * from (select * from min_t) min_t where score > 10) t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_having """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name having min(t1.score) > 100; - """ - - qt_with_hint_groupby_pushdown_mixed_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score), count(*), sum(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_multi_table_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id join min_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score), min(t2.score) from min_t t1 join min_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, min(t1.score), min(t2.score) from min_t t1, min_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_where_clause """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_varied_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score), avg(t1.id), count(t2.name) from min_t t1 join min_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by_limit """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name order by min(t1.score) limit 10; - """ - - qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1_alias.score) from min_t t1_alias join min_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_with_hint_groupby_pushdown_complex_join_condition """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from min_t t1 join min_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_function_processed_columns """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(LENGTH(t1.name)) from min_t t1, min_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_nested_queries """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ min(t1.score) from (select * from min_t where score > 20) t1 join (select * from min_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_distinct_through_join_one_side.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_distinct_through_join_one_side.groovy deleted file mode 100644 index 560f31bab42119..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_distinct_through_join_one_side.groovy +++ /dev/null @@ -1,253 +0,0 @@ -// 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. - -suite("push_down_sum_distinct_through_join_one_side") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "set be_number_for_test=1" - sql """ - DROP TABLE IF EXISTS sum_with_distinct_t; - """ - - sql """ - CREATE TABLE IF NOT EXISTS sum_with_distinct_t( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into sum_with_distinct_t values (1, 1, 'a')" - sql "insert into sum_with_distinct_t values (2, null, 'a')" - sql "insert into sum_with_distinct_t values (3, 1, null)" - sql "insert into sum_with_distinct_t values (4, 2, 'b')" - sql "insert into sum_with_distinct_t values (5, null, 'b')" - sql "insert into sum_with_distinct_t values (6, 2, null)" - sql "insert into sum_with_distinct_t values (7, 3, 'c')" - sql "insert into sum_with_distinct_t values (8, null, 'c')" - sql "insert into sum_with_distinct_t values (9, 3, null)" - sql "insert into sum_with_distinct_t values (10, null, null)" - sql "analyze table sum_with_distinct_t with sync;" - order_qt_groupby_pushdown_basic """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 left join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_right_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 right join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_full_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 full join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_semi_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 inner join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_left_anti_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 left anti join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_complex_conditions """ - select sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_aggregate """ - select sum(distinct t1.score), avg(t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_subquery """ - select sum(distinct t1.score) from (select * from sum_with_distinct_t where score > 10) t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_outer_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 left join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_deep_subquery """ - select sum(distinct t1.score) from (select * from (select * from sum_with_distinct_t) sum_with_distinct_t where score > 10) t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_having """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name having sum(distinct t1.score) > 100; - """ - - order_qt_groupby_pushdown_mixed_aggregates """ - select sum(distinct t1.score), sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_multi_table_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id join sum_with_distinct_t t3 on t1.name = t3.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_order_by """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - order_qt_groupby_pushdown_multiple_equal_conditions """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_with_aggregate """ - select sum(distinct t1.score), sum(distinct t2.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_non_aggregate """ - select t1.name, sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate """ - select t1.name, sum(distinct t1.score), sum(distinct t2.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_with_where_clause """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - order_qt_groupby_pushdown_varied_aggregates """ - select sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_with_order_by_limit """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name order by sum(distinct t1.score) limit 10; - """ - - order_qt_groupby_pushdown_alias_multiple_equal_conditions """ - select sum(distinct t1_alias.score) from sum_with_distinct_t t1_alias join sum_with_distinct_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - order_qt_groupby_pushdown_complex_join_condition """ - select sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - order_qt_groupby_pushdown_function_processed_columns """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_groupby_pushdown_nested_queries """ - select sum(distinct t1.score) from (select * from sum_with_distinct_t where score > 20) t1 join (select * from sum_with_distinct_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_basic """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 left join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_right_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 right join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_full_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 full join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_semi_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 inner join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_left_anti_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 left anti join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_complex_conditions """ - select sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_aggregate """ - select sum(distinct t1.score), avg(t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_subquery """ - select sum(distinct t1.score) from (select * from sum_with_distinct_t where score > 10) t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_outer_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 left join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_deep_subquery """ - select sum(distinct t1.score) from (select * from (select * from sum_with_distinct_t) sum_with_distinct_t where score > 10) t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_having """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name having sum(distinct t1.score) > 100; - """ - - order_qt_with_hint_groupby_pushdown_mixed_aggregates """ - select sum(distinct t1.score), sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_multi_table_join """ - select sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id join sum_with_distinct_t t3 on t1.name = t3.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_order_by """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - select sum(distinct t1.score), sum(distinct t2.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate """ - select t1.name, sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_with_aggregate """ - select t1.name, sum(distinct t1.score), sum(distinct t2.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_where_clause """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_varied_aggregates """ - select sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_with_order_by_limit """ - select sum(distinct t1.score) from sum_with_distinct_t t1, sum_with_distinct_t t2 where t1.id = t2.id group by t1.name order by sum(distinct t1.score) limit 10; - """ - - order_qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - select sum(distinct t1_alias.score) from sum_with_distinct_t t1_alias join sum_with_distinct_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - order_qt_with_hint_groupby_pushdown_complex_join_condition """ - select sum(distinct t1.score) from sum_with_distinct_t t1 join sum_with_distinct_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - order_qt_with_hint_groupby_pushdown_nested_queries """ - select sum(distinct t1.score) from (select * from sum_with_distinct_t where score > 20) t1 join (select * from sum_with_distinct_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.groovy deleted file mode 100644 index e637a58219f1c5..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_through_join.groovy +++ /dev/null @@ -1,259 +0,0 @@ -// 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. - -suite("push_down_sum_through_join") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" - sql "set be_number_for_test=1" - - sql """ - DROP TABLE IF EXISTS sum_t; - """ - - sql """ - CREATE TABLE IF NOT EXISTS sum_t( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into sum_t values (1, 1, 'a')" - sql "insert into sum_t values (2, null, 'a')" - sql "insert into sum_t values (3, 1, null)" - sql "insert into sum_t values (4, 2, 'b')" - sql "insert into sum_t values (5, null, 'b')" - sql "insert into sum_t values (6, 2, null)" - sql "insert into sum_t values (7, 3, 'c')" - sql "insert into sum_t values (8, null, 'c')" - sql "insert into sum_t values (9, 3, null)" - sql "insert into sum_t values (10, null, null)" - sql "analyze table sum_t with sync;" - qt_groupby_pushdown_basic """ - explain shape plan select sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_join """ - explain shape plan select sum(t1.score) from sum_t t1 left join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_right_join """ - explain shape plan select sum(t1.score) from sum_t t1 right join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_full_join """ - explain shape plan select sum(t1.score) from sum_t t1 full join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_semi_join """ - explain shape plan select sum(t1.score) from sum_t t1 inner join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_anti_join """ - explain shape plan select sum(t1.score) from sum_t t1 left anti join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_complex_conditions """ - explain shape plan select sum(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_aggregate """ - explain shape plan select sum(t1.score), avg(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_subquery """ - explain shape plan select sum(t1.score) from (select * from sum_t where score > 10) t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_outer_join """ - explain shape plan select sum(t1.score) from sum_t t1 left join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_deep_subquery """ - explain shape plan select sum(t1.score) from (select * from (select * from sum_t) sum_t where score > 10) t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_having """ - explain shape plan select sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name having sum(t1.score) > 100; - """ - - qt_groupby_pushdown_mixed_aggregates """ - explain shape plan select sum(t1.score), count(*), max(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_multi_table_join """ - explain shape plan select sum(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id join sum_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_groupby_pushdown_with_order_by """ - explain shape plan select sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select max(t1.score), sum(t2.score) from sum_t t1 join sum_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select t1.name, sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select t1.name, sum(t1.score), sum(t2.score) from sum_t t1, sum_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_where_clause """ - explain shape plan select sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_groupby_pushdown_varied_aggregates """ - explain shape plan select sum(t1.score), count(t2.name) from sum_t t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_with_order_by_limit """ - explain shape plan select sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name order by sum(t1.score) limit 10; - """ - - qt_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select sum(t1_alias.score) from sum_t t1_alias join sum_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_groupby_pushdown_complex_join_condition """ - explain shape plan select sum(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_groupby_pushdown_function_processed_columns """ - explain shape plan select sum(LENGTH(t1.name)) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_nested_queries """ - explain shape plan select sum(t1.score) from (select * from sum_t where score > 20) t1 join (select * from sum_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_basic """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 left join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_right_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 right join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_full_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 full join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_semi_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 inner join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_anti_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 left anti join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_complex_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score), avg(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from (select * from sum_t where score > 10) t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_outer_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 left join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_deep_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from (select * from (select * from sum_t) sum_t where score > 10) t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_having """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name having sum(t1.score) > 100; - """ - - qt_with_hint_groupby_pushdown_mixed_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score), count(*), max(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_multi_table_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id join sum_t t3 on t1.name = t3.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ max(t1.score), sum(t2.score) from sum_t t1 join sum_t t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ t1.name, sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ t1.name, sum(t1.score), sum(t2.score) from sum_t t1, sum_t t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_where_clause """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_varied_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score), count(t2.name) from sum_t t1 join sum_t t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by_limit """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name order by sum(t1.score) limit 10; - """ - - qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1_alias.score) from sum_t t1_alias join sum_t t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_with_hint_groupby_pushdown_complex_join_condition """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from sum_t t1 join sum_t t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_function_processed_columns """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(LENGTH(t1.name)) from sum_t t1, sum_t t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_nested_queries """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join) */ sum(t1.score) from (select * from sum_t where score > 20) t1 join (select * from sum_t where id < 100) t2 on t1.id = t2.id group by t1.name; - """ -} diff --git a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.groovy b/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.groovy deleted file mode 100644 index 6b04b8f6ba4e8f..00000000000000 --- a/regression-test/suites/nereids_rules_p0/eager_aggregate/push_down_sum_through_join_one_side.groovy +++ /dev/null @@ -1,259 +0,0 @@ -// 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. - -suite("push_down_sum_through_join_one_side") { - sql "SET enable_nereids_planner=true" - sql "set runtime_filter_mode=OFF" - sql "SET enable_fallback_to_original_planner=false" - sql "SET ignore_shape_nodes='PhysicalDistribute,PhysicalProject'" - sql "set be_number_for_test=1" - - sql """ - DROP TABLE IF EXISTS sum_t_one_side; - """ - - sql """ - CREATE TABLE IF NOT EXISTS sum_t_one_side( - `id` int(32), - `score` int(64) NULL, - `name` varchar(64) NULL - ) ENGINE = OLAP - DISTRIBUTED BY HASH(id) BUCKETS 4 - PROPERTIES ( - "replication_allocation" = "tag.location.default: 1" - ); - """ - - sql "insert into sum_t_one_side values (1, 1, 'a')" - sql "insert into sum_t_one_side values (2, null, 'a')" - sql "insert into sum_t_one_side values (3, 1, null)" - sql "insert into sum_t_one_side values (4, 2, 'b')" - sql "insert into sum_t_one_side values (5, null, 'b')" - sql "insert into sum_t_one_side values (6, 2, null)" - sql "insert into sum_t_one_side values (7, 3, 'c')" - sql "insert into sum_t_one_side values (8, null, 'c')" - sql "insert into sum_t_one_side values (9, 3, null)" - sql "insert into sum_t_one_side values (10, null, null)" - sql "analyze table sum_t_one_side with sync;" - qt_groupby_pushdown_basic """ - explain shape plan select sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_join """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 left join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_right_join """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 right join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_full_join """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 full join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_semi_join """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 inner join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_left_anti_join """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 left anti join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_complex_conditions """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_aggregate """ - explain shape plan select sum(t1.score), avg(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_subquery """ - explain shape plan select sum(t1.score) from (select * from sum_t_one_side where score > 10) t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_outer_join """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 left join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_deep_subquery """ - explain shape plan select sum(t1.score) from (select * from (select * from sum_t_one_side) sum_t_one_side where score > 10) t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_having """ - explain shape plan select sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name having sum(t1.score) > 100; - """ - - qt_groupby_pushdown_mixed_aggregates """ - explain shape plan select sum(t1.score), count(*), max(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_multi_table_join """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id join sum_t_one_side t3 on t1.name = t3.name group by t1.name; - """ - - qt_groupby_pushdown_with_order_by """ - explain shape plan select sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select max(t1.score), sum(t2.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select t1.name, sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select t1.name, sum(t1.score), sum(t2.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_groupby_pushdown_with_where_clause """ - explain shape plan select sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_groupby_pushdown_varied_aggregates """ - explain shape plan select sum(t1.score), avg(t1.id), count(t2.name) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_with_order_by_limit """ - explain shape plan select sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name order by sum(t1.score) limit 10; - """ - - qt_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select sum(t1_alias.score) from sum_t_one_side t1_alias join sum_t_one_side t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_groupby_pushdown_complex_join_condition """ - explain shape plan select sum(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_groupby_pushdown_function_processed_columns """ - explain shape plan select sum(LENGTH(t1.name)) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_groupby_pushdown_nested_queries """ - explain shape plan select sum(t1.score) from (select * from sum_t_one_side where score > 20) t1 join (select * from sum_t_one_side where id < 100) t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_basic """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t2.score < 100 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 left join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_right_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 right join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_full_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 full join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_semi_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 inner join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_left_anti_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 left anti join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_complex_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id and t1.name < t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score), avg(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from (select * from sum_t_one_side where score > 10) t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_outer_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 left join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_deep_subquery """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from (select * from (select * from sum_t_one_side) sum_t_one_side where score > 10) t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_having """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name having sum(t1.score) > 100; - """ - - qt_with_hint_groupby_pushdown_mixed_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score), count(*), max(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_multi_table_join """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id join sum_t_one_side t3 on t1.name = t3.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name order by t1.name; - """ - - qt_with_hint_groupby_pushdown_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ max(t1.score), sum(t2.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_equal_conditions_non_aggregate_selection_with_aggregate """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ t1.name, sum(t1.score), sum(t2.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t1.name = t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_where_clause """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id and t1.score > 50 group by t1.name; - """ - - qt_with_hint_groupby_pushdown_varied_aggregates """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score), avg(t1.id), count(t2.name) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_with_order_by_limit """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name order by sum(t1.score) limit 10; - """ - - qt_with_hint_groupby_pushdown_alias_multiple_equal_conditions """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1_alias.score) from sum_t_one_side t1_alias join sum_t_one_side t2_alias on t1_alias.id = t2_alias.id and t1_alias.name = t2_alias.name group by t1_alias.name; - """ - - qt_with_hint_groupby_pushdown_complex_join_condition """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from sum_t_one_side t1 join sum_t_one_side t2 on t1.id = t2.id and t1.score = t2.score and t1.name <> t2.name group by t1.name; - """ - - qt_with_hint_groupby_pushdown_function_processed_columns """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(LENGTH(t1.name)) from sum_t_one_side t1, sum_t_one_side t2 where t1.id = t2.id group by t1.name; - """ - - qt_with_hint_groupby_pushdown_nested_queries """ - explain shape plan select /*+ USE_CBO_RULE(push_down_agg_through_join_one_side) */ sum(t1.score) from (select * from sum_t_one_side where score > 20) t1 join (select * from sum_t_one_side where id < 100) t2 on t1.id = t2.id group by t1.name; - """ -}