Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](nereids)LogicalProject should always has non-empty project list #18863

Merged
merged 2 commits into from
Apr 21, 2023

Conversation

starocean999
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

Problem summary

Describe your changes.

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@starocean999
Copy link
Contributor Author

run buildall

jackwener
jackwener previously approved these changes Apr 20, 2023
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 20, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@jackwener jackwener requested a review from 924060929 April 20, 2023 11:16
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()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

child maybe unbound, so selectMinimumColumn() at this place could failed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Apr 21, 2023
@starocean999
Copy link
Contributor Author

run buildall

@morrySnow morrySnow changed the title [fix](nereids)LogicalProject should always has no-empty project list [fix](nereids)LogicalProject should always has non-empty project list Apr 21, 2023
@morrySnow morrySnow merged commit c41b486 into apache:master Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants