starocean999 commented on code in PR #18863: URL: https://github.com/apache/doris/pull/18863#discussion_r1173264526
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalProject.java: ########## @@ -82,7 +83,10 @@ private LogicalProject(List<NamedExpression> projects, List<NamedExpression> exc Optional<GroupExpression> groupExpression, Optional<LogicalProperties> logicalProperties, CHILD_TYPE child, boolean isDistinct) { super(PlanType.LOGICAL_PROJECT, groupExpression, logicalProperties, child); - this.projects = ImmutableList.copyOf(Objects.requireNonNull(projects, "projects can not be null")); + Preconditions.checkArgument(projects != null, "projects can not be null"); + this.projects = projects.isEmpty() + ? ImmutableList.of(ExpressionUtils.selectMinimumColumn(child.getOutput())) Review Comment: Thanks for your reminder. Only ColumnPrune rule may produce empty projects, this happens in rewrite phase. So if projects is empty, all plans have been bound already. I added a precondition check to reflect that. -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org