englefly commented on code in PR #15646:
URL: https://github.com/apache/doris/pull/15646#discussion_r1064521948
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSlotReference.java:
##########
@@ -354,13 +355,32 @@ public List<Rule> buildRules() {
RuleType.BINDING_SORT_SLOT.build(
logicalSort(logicalProject()).when(Plan::canBind).thenApply(ctx -> {
LogicalSort<LogicalProject<GroupPlan>> sort = ctx.root;
+ Set<Slot> orderSlots = Sets.newHashSet();
+ sort.getOrderKeys().stream()
+ .forEach(orderKey ->
+
orderSlots.addAll(orderKey.getExpr().getInputSlots()));
+ Set<Slot> projectOutput = sort.child().getOutputSet();
+ SlotBinder strictBinderOnProject = new
SlotBinder(toScope(Lists.newArrayList(projectOutput)),
+ sort, true, ctx.cascadesContext);
+ //SlotBinder looseBinderOnProject = new
SlotBinder(toScope(Lists.newArrayList(projectOutput)),
+ // sort, false, ctx.cascadesContext);
Review Comment:
done
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindSlotReference.java:
##########
@@ -540,10 +560,17 @@ private <E extends Expression> E bind(E expr, List<Plan>
inputs, Plan plan, Casc
private class SlotBinder extends SubExprAnalyzer {
private final Plan plan;
+ //strict = true: bind slot including its qualifier
+ private boolean strict;
Review Comment:
done
--
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]