[fix](Nereids) check slot from children may produce wrong format err (#31638)
This commit is contained in:
@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user