Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #27134.
Rationale for this change
For a table partitioned by
yearandmonth, a file atyear=2024/month=02.parquetis incorrectly read as month02.parquet. The filename supplies a partition value even though themonth=.../directory is missing.What changes are included in this PR?
Require a following path component for each partition directory, so the final filename cannot supply a partition value. Preserve percent-decoding and the existing handling of incomplete partition paths. A filename containing
=is still valid inside a complete partition directory structure.Extend the existing partial-partition regression and add SQL coverage alongside the related listing-table partition tests. Disabling the listing cache rebuilds session state and changes the default-catalog setting; reset that setting at the end for the runner's configuration check.
What is the testing strategy for this PR?
listing_table_partitions.sltpass afterward.888879d01c8131038ab8693cde227597ab5a434f, retaining the new Hive NULL partition behavior and SQL coverage. The filename regression checks skipped incomplete paths, returned rows, partition filtering, and akey=valuefilename in a complete path.cargo fmt --all,cargo clippy --all-targets --all-features -- -D warnings, and the repository's extended workspace test command all pass on a GitHub-hosted runner, before committing this exact patch. That run includes all 21 current catalog-listing unit tests and the SQL logic-test harness.No existing microbenchmark calls this partition helper; this is a correctness fix and makes no performance claim.
Are there any user-facing changes?
Files whose filenames masquerade as missing partition directories are skipped, consistently with other incomplete partition paths. Complete partition paths retain their existing values. There is no public API change.
AI assistance: Codex assisted with the implementation, regression tests and this description. The author has reviewed the current patch. The change follows the repository's existing parser and test patterns.