morrySnow commented on code in PR #60045:
URL: https://github.com/apache/doris/pull/60045#discussion_r2711211811
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -2539,36 +2539,39 @@ public PlanFragment
visitPhysicalRepeat(PhysicalRepeat<? extends Plan> repeat, P
PlanFragment inputPlanFragment = repeat.child(0).accept(this, context);
List<List<Expr>> distributeExprLists =
getDistributeExprs(repeat.child(0));
- ImmutableSet<Expression> flattenGroupingSetExprs = ImmutableSet.copyOf(
- ExpressionUtils.flatExpressions(repeat.getGroupingSets()));
+ Set<NamedExpression> outputSets =
ImmutableSet.copyOf(repeat.getOutputExpressions());
Review Comment:
`repeat.getOutpuSet();` can return outputSets directly
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -2539,36 +2539,39 @@ public PlanFragment
visitPhysicalRepeat(PhysicalRepeat<? extends Plan> repeat, P
PlanFragment inputPlanFragment = repeat.child(0).accept(this, context);
List<List<Expr>> distributeExprLists =
getDistributeExprs(repeat.child(0));
- ImmutableSet<Expression> flattenGroupingSetExprs = ImmutableSet.copyOf(
- ExpressionUtils.flatExpressions(repeat.getGroupingSets()));
+ Set<NamedExpression> outputSets =
ImmutableSet.copyOf(repeat.getOutputExpressions());
+ List<Expression> flattenGroupingExpressions =
repeat.getGroupByExpressions();
+ Set<Slot> preRepeatExpressions = Sets.newLinkedHashSet();
+ // keep group by expression comes first
+ for (Expression groupByExpr : flattenGroupingExpressions) {
+ Slot groupBySlot = (Slot) groupByExpr;
+ Preconditions.checkState(outputSets.contains(groupBySlot));
Review Comment:
remove this check, or add error message to it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]