feiniaofeiafei commented on code in PR #57258:
URL: https://github.com/apache/doris/pull/57258#discussion_r2472544260
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildOutputPropertyDeriver.java:
##########
@@ -345,22 +346,41 @@ && isSameHashValue(child.child(0).getDataType(),
child.getDataType())) {
.map(NamedExpression::getExprId)
.collect(Collectors.toSet()));
}
+ } else {
+ // namedExpression is slot
+ projections.put(namedExpression.getExprId(),
namedExpression.getExprId());
}
}
- if (projections.entrySet().stream().allMatch(kv ->
kv.getKey().equals(kv.getValue()))) {
- return childrenOutputProperties.get(0);
- }
+
DistributionSpecHash childDistributionSpecHash =
(DistributionSpecHash) childDistributionSpec;
+ boolean canUseChildProperties = true;
+ for (ExprId exprId :
childDistributionSpecHash.getOrderedShuffledColumns()) {
+ if (!projections.containsKey(exprId) ||
!projections.get(exprId).equals(exprId)) {
+ canUseChildProperties = false;
Review Comment:
can break early here
--
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]