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 page index pruning fail on complex_expr #4387

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

Ted-Jiang
Copy link
Member

@Ted-Jiang Ted-Jiang commented Nov 27, 2022

Signed-off-by: yangjiang yangjiang@ebay.com

Which issue does this PR close?

Closes #4317.

Rationale for this change

After fix all the ignore issue, I think now page pruning has the same amount test case like row group pruning✌️.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Signed-off-by: yangjiang <yangjiang@ebay.com>
@github-actions github-actions bot added the core Core datafusion crate label Nov 27, 2022
@Ted-Jiang Ted-Jiang requested a review from alamb November 27, 2022 09:21
async fn prune_f64_scalar_fun_and_gt() {
// result of sql "SELECT * FROM t where abs(f - 1) <= 0.000001 and f >= 0.1"
// only use "f >= 0" to prune
test_prune(
Scenario::Float64,
"SELECT * FROM t where abs(f - 1) <= 0.000001 and f >= 0.1",
Some(0),
Some(2),
Some(10),
Copy link
Member Author

Choose a reason for hiding this comment

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

only use "f >= 0" to prune it will prune two pages (each 5 rows), so make it 10 make sense

);
} else {
trace!(
// when building `PruningPredicate`, some single column filter like `abs(i) = 1`
Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can support rewrite abs(i) = 1 to i = 1 or i = -1🤔 further.

Copy link
Member Author

Choose a reason for hiding this comment

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

File #4388

@Ted-Jiang
Copy link
Member Author

Ted-Jiang commented Nov 27, 2022

@alamb PTAL, and sorry for taking such a long time to fix this(we are doing bugBash in our system😂 , have limited time on datafusion recently). I think now page pruning has the same amount of test case as row group pruning, do we need any more test case so that we can enable Page Filtering by default 🤔

} else {
trace!(
// when building `PruningPredicate`, some single column filter like `abs(i) = 1`
// will be rewrite to `lit(true)`, so may have an empty required_columns.
Copy link
Member Author

Choose a reason for hiding this comment

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

this is the why it fails.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for these comments, BTW -- they help both to review the code as well as read it in the future 👍

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.

Makes sense to me -- thanks @Ted-Jiang 👍

Looking at this PR with whitespace blind diff helped me: https://github.com/apache/arrow-datafusion/pull/4387/files?w=1

@alamb alamb merged commit 9139183 into apache:master Nov 28, 2022
@ursabot
Copy link

ursabot commented Nov 28, 2022

Benchmark runs are scheduled for baseline = da55f93 and contender = 9139183. 9139183 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core datafusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page index pruning fail on complex_expr
3 participants