morrySnow commented on code in PR #69075:
URL: https://github.com/apache/doris/pull/69075#discussion_r4271969709
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/EliminateUnnecessaryProject.java:
##########
@@ -55,14 +57,56 @@ private Plan rewriteProject(LogicalProject<?> project) {
if (project.child() instanceof LogicalEmptyRelation) {
// eliminate unnecessary project
return new
LogicalEmptyRelation(StatementScopeIdGenerator.newRelationId(),
project.getProjects());
- } else if
(project.getOutputExprIdBitSet().equals(project.getChildrenOutputExprIdBitSet()))
{
+ } else if (isPassThroughProject(project)) {
// eliminate unnecessary project
return rewrite(project.child());
} else {
return rewriteChildren(project);
}
}
+ /**
+ * 判断 project 是否只是把孩子的输出原样透传(只有这种 project 才是多余的)。
Review Comment:
用英文注释
--
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]