0xamlab opened a new pull request, #27539: URL: https://github.com/apache/datafusion/pull/27539
- Closes #27455. ## Rationale for this change Equality pruning on Hive partitions used the literal's path spelling for every type. Typed values with alternate spellings (for example, `01` and `1`, timestamps, and floats) could therefore skip valid files. ## What changes are included in this PR? Restrict prefix pruning to string partition types, including string dictionaries. Non-string predicates are evaluated after parsing, so equivalent spellings cannot hide matching rows. ## What is the testing strategy for this PR? - Added non-string prefix coverage for Int32, Float64, Date32/Date64, and timestamps. - Added string-type and string-dictionary coverage. - Added integration coverage for `p=01` and `p=1`, asserting that both rows are returned. The regression fails without the fix. - `cargo test -p datafusion-catalog-listing` — 27 tests and 7 doctests pass. - `cargo test -p datafusion --test core_integration test_pruned_partition_list_non_string_literal_spellings` — passes. - `cargo clippy --all-targets --all-features -- -D warnings` — passes. - `cargo fmt --all` — clean. ## Are there any user-facing changes? No public API changes. This corrects partition-pruning behavior for typed values with alternate spellings. Assisted-by: AI -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
