This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new c9abf2c2503 branch-3.0: [fix](nereids)fix bug of
PushDownFilterThroughSetOperation (#46370) (#46457)
c9abf2c2503 is described below
commit c9abf2c2503e116bfd65b2ef88bb60e399aff35e
Author: morrySnow <[email protected]>
AuthorDate: Tue Jan 7 16:53:55 2025 +0800
branch-3.0: [fix](nereids)fix bug of PushDownFilterThroughSetOperation
(#46370) (#46457)
pick from master #46370
Co-authored-by: feiniaofeiafei <[email protected]>
---
.../nereids/rules/rewrite/PushDownFilterThroughSetOperation.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSetOperation.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSetOperation.java
index c8f83d62b49..4146fed87f6 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSetOperation.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownFilterThroughSetOperation.java
@@ -44,16 +44,16 @@ public class PushDownFilterThroughSetOperation extends
OneRewriteRuleFactory {
return logicalFilter(logicalSetOperation()).then(f -> {
LogicalSetOperation setOperation = f.child();
List<Plan> newChildren = new ArrayList<>();
- for (Plan child : setOperation.children()) {
+ for (int childIdx = 0; childIdx < setOperation.children().size();
++childIdx) {
Map<Expression, Expression> replaceMap = new HashMap<>();
for (int i = 0; i < setOperation.getOutputs().size(); ++i) {
NamedExpression output = setOperation.getOutputs().get(i);
- replaceMap.put(output, child.getOutput().get(i));
+ replaceMap.put(output,
setOperation.getRegularChildOutput(childIdx).get(i));
}
Set<Expression> newFilterPredicates =
f.getConjuncts().stream().map(conjunct ->
ExpressionUtils.replace(conjunct,
replaceMap)).collect(ImmutableSet.toImmutableSet());
- newChildren.add(new LogicalFilter<>(newFilterPredicates,
child));
+ newChildren.add(new LogicalFilter<>(newFilterPredicates,
setOperation.child(childIdx)));
}
return setOperation.withChildren(newChildren);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]