Skip to content

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

@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
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
H0TB0X420 pushed a commit to H0TB0X420/datafusion that referenced this pull request Oct 7, 2025
* chore: upgrade datafusion Deps

Ref apache#690

* update concat and concat_ws to use datafusion_functions

Moved in apache#10089

* feat: upgrade functions.rs

Upstream is continuing it's migration to UDFs.

Ref apache#10098
Ref apache#10372

* fix ScalarUDF import

* feat: remove deprecated suppors_filter_pushdown and impl supports_filters_pushdown

Deprecated function removed in apache#9923

* use `unnest_columns_with_options` instead of deprecated `unnest_column_with_option`

* remove ScalarFunction wrappers

These relied on upstream BuiltinScalarFunction, which are now removed.

Ref apache#10098

* update dataframe `test_describe`

`null_count` was fixed upstream.

Ref apache#10260

* remove PyDFField and related methods

DFField was removed upstream.

Ref: apache#9595

* bump `datafusion-python` package version to 38.0.0

* re-implement `PyExpr::column_name`

The previous implementation relied on `DFField` which was removed upstream.

Ref: apache#9595
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Predicate push-down into parquet broken for Date32 columns

3 participants