[fix](nereids)need add mark join slot to upper project in PullUpProjectUnderApply rule (#31408)
This commit is contained in:
@ -65,6 +65,9 @@ public class PullUpProjectUnderApply extends OneRewriteRuleFactory {
|
||||
"ScalarSubquery should only have one output column");
|
||||
newProjects.add(project.getProjects().get(0));
|
||||
}
|
||||
if (apply.isMarkJoin()) {
|
||||
newProjects.add(apply.getMarkJoinSlotReference().get());
|
||||
}
|
||||
return project.withProjectsAndChild(newProjects, newCorrelate);
|
||||
}).toRule(RuleType.PULL_UP_PROJECT_UNDER_APPLY);
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ import com.google.common.collect.ImmutableList;
|
||||
/**
|
||||
* A special type of column that will be generated to replace the subquery when unnesting the subquery of MarkJoin.
|
||||
*/
|
||||
public class MarkJoinSlotReference extends SlotReference implements SlotNotFromChildren {
|
||||
public class MarkJoinSlotReference extends SlotReference {
|
||||
final boolean existsHasAgg;
|
||||
|
||||
public MarkJoinSlotReference(String name) {
|
||||
|
||||
Reference in New Issue
Block a user