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 Date32 and Date64 parquet row group pruning #690

Merged
merged 1 commit into from
Jul 10, 2021

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Jul 6, 2021

Which issue does this PR close?

Fixes: #649 as found by @yordan-pavlov

Build on #657 and #689 so please review them first

Rationale for this change

Parquet pruning is not working for Date32 or Date64

What changes are included in this PR?

Fixes parquet pruning on Date32 and Date64 columns by adding the appropriate expression evaluation machinery for Date32 and Date64. Creating arrays for testing I found super awkward and I filed apache/arrow-rs#527 to try and track improving that situation

@github-actions github-actions bot added the datafusion Changes in the datafusion crate label Jul 6, 2021
@alamb alamb force-pushed the alamb/fix_date32_pruning branch from 5baaf93 to 6d48968 Compare July 7, 2021 13:45
@alamb alamb marked this pull request as ready for review July 7, 2021 13:45
@@ -900,6 +900,7 @@ impl TryFrom<ScalarValue> for i64 {
fn try_from(value: ScalarValue) -> Result<Self> {
match value {
ScalarValue::Int64(Some(inner_value))
| ScalarValue::Date64(Some(inner_value))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This mirrors the clause above for Date32 in TryFrom<ScalarValue> for i32

@alamb
Copy link
Contributor Author

alamb commented Jul 8, 2021

@yordan-pavlov this is ready for review. cc @Dandandan

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.

Looking good!

@Dandandan Dandandan merged commit 7d24567 into apache:master Jul 10, 2021
@alamb
Copy link
Contributor Author

alamb commented Jul 10, 2021

Thank you @Dandandan

@alamb alamb deleted the alamb/fix_date32_pruning branch July 10, 2021 10:17
@houqp houqp added the bug Something isn't working label Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datafusion Changes in the datafusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Predicate push-down into parquet broken for Date32 columns
3 participants