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

Not equal predicate in physical_planning pruning #544

Merged
merged 2 commits into from
Jun 13, 2021

Conversation

jgoday
Copy link
Contributor

@jgoday jgoday commented Jun 11, 2021

Which issue does this PR close?

Closes #420.

Rationale for this change

Pruning not equal predicates if the value is between min and max bounds.

What changes are included in this PR?

Are there any user-facing changes?

Change datafusion/src/physical_optimizer/pruning.rs build_predicate_expression to include Operator::NotEq
and define test case 'row_group_predicate_not_eq'

@codecov-commenter
Copy link

Codecov Report

Merging #544 (c4e91d9) into master (ad70a1e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #544      +/-   ##
==========================================
+ Coverage   76.13%   76.15%   +0.01%     
==========================================
  Files         156      156              
  Lines       27032    27047      +15     
==========================================
+ Hits        20582    20597      +15     
  Misses       6450     6450              
Impacted Files Coverage Δ
datafusion/src/physical_optimizer/pruning.rs 92.52% <100.00%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad70a1e...c4e91d9. Read the comment docs.

Copy link
Contributor

@Dandandan Dandandan left a comment

Choose a reason for hiding this comment

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

LGTM 👍

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.

Looks awesome -- thank you @jgoday !

@alamb alamb merged commit 2568323 into apache:master Jun 13, 2021
@alamb
Copy link
Contributor

alamb commented Jun 14, 2021

I think we got the logic a bit too aggressive see -- see #560. FYI @jgoday

alamb added a commit to alamb/datafusion that referenced this pull request Jun 14, 2021
@houqp houqp added datafusion Changes in the datafusion crate enhancement New feature or request labels Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datafusion Changes in the datafusion crate enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for != predicate in pruning predicates
5 participants