Skip to content

Conversation

@dmitriibugakov
Copy link
Contributor

Which issue does this PR close?

Closes #10290.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the optimizer Optimizer rules label May 1, 2024
@dmitriibugakov dmitriibugakov force-pushed the 10290-optimise-propagate-empty-relation branch from 5b6a4fc to 95eb2d6 Compare May 1, 2024 18:15
@dmitriibugakov dmitriibugakov force-pushed the 10290-optimise-propagate-empty-relation branch from 95eb2d6 to 2edfff4 Compare May 1, 2024 18:16
@alamb alamb changed the title Optimized propagation of empty relations #10290 Stop copying LogicalPlan and Exprs in PropagateEmptyRelation May 2, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @dmitrybugakov -- this looks very nice. I took a look at empty_child

fn empty_child(plan: &LogicalPlan) -> Result<Option<LogicalPlan>> {
and while in theory it recreates an new plan node when it could reuse the existing one, I don't think that will matter in practice

Thanks again -- really nice to see these contributions

}

#[test]
fn test_propagate_empty_relation_inner_join_and_unions() {
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ for the additional coverage

@alamb alamb merged commit 63e05fa into apache:main May 2, 2024
@dmitriibugakov dmitriibugakov deleted the 10290-optimise-propagate-empty-relation branch May 2, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimizer Optimizer rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop copying LogicalPlan and Exprs in PropagateEmptyRelation

2 participants