This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8a1bc8b82f9 [fix](Nereids) check slot from children may produce wrong
format err (#31638)
8a1bc8b82f9 is described below
commit 8a1bc8b82f966b6de63809667c7255afb84f95b9
Author: morrySnow <[email protected]>
AuthorDate: Fri Mar 1 16:47:27 2024 +0800
[fix](Nereids) check slot from children may produce wrong format err
(#31638)
---
.../doris/nereids/rules/analysis/CheckAfterRewrite.java | 12 +++++++-----
regression-test/suites/nereids_p0/aggregate/aggregate.groovy | 2 +-
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckAfterRewrite.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckAfterRewrite.java
index b1313a16a19..754d3efa583 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckAfterRewrite.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/CheckAfterRewrite.java
@@ -108,16 +108,18 @@ public class CheckAfterRewrite extends
OneAnalysisRuleFactory {
notFromChildren = removeValidSlotsNotFromChildren(notFromChildren,
childrenOutput);
if (!notFromChildren.isEmpty()) {
if (plan.arity() != 0 && plan.child(0) instanceof
LogicalAggregate) {
- throw new AnalysisException(String.format("%s not in agg's
output", notFromChildren
+ throw new AnalysisException(String.format("%s not in
aggregate's output", notFromChildren
.stream().map(NamedExpression::getName).collect(Collectors.joining(", "))));
} else {
throw new AnalysisException(String.format(
- "Input slot(s) not in child's output: %s in plan: %s,"
- + " child output is: %s\n" + "plan tree:\n" +
plan.treeString(),
+ "Input slot(s) not in child's output: %s in plan:
%s\nchild output is: %s\nplan tree:\n%s",
StringUtils.join(notFromChildren.stream().map(ExpressionTrait::toString)
.collect(Collectors.toSet()), ", "),
- plan, plan.children().stream().flatMap(child ->
child.getOutput().stream())
- .collect(Collectors.toSet())));
+ plan,
+ plan.children().stream()
+ .flatMap(child -> child.getOutput().stream())
+ .collect(Collectors.toSet()),
+ plan.treeString()));
}
}
}
diff --git a/regression-test/suites/nereids_p0/aggregate/aggregate.groovy
b/regression-test/suites/nereids_p0/aggregate/aggregate.groovy
index e9cb3b31b8d..2446fcf0923 100644
--- a/regression-test/suites/nereids_p0/aggregate/aggregate.groovy
+++ b/regression-test/suites/nereids_p0/aggregate/aggregate.groovy
@@ -334,7 +334,7 @@ suite("aggregate") {
SELECT k1, k2 FROM tempbaseall
GROUP BY k1;
"""
- exception "java.sql.SQLException: errCode = 2, detailMessage = k2 not
in agg's output"
+ exception "java.sql.SQLException: errCode = 2, detailMessage = k2 not
in aggregate's output"
}
test {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]