[AURON #2234] Handle Hudi scan options case-insensitively#2235
Open
weimingdiit wants to merge 1 commit intoapache:masterfrom
Open
[AURON #2234] Handle Hudi scan options case-insensitively#2235weimingdiit wants to merge 1 commit intoapache:masterfrom
weimingdiit wants to merge 1 commit intoapache:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the robustness of Auron’s Hudi native scan detection by making option/property lookups case-insensitive, aligning behavior with common Spark datasource option handling and reducing the risk of unsafe native scan eligibility decisions when users supply mixed-case Hudi keys.
Changes:
- Normalize Hudi scan option and catalog/storage property lookups to be case-insensitive (table type, base file format, path, time travel keys).
- Make
.hoodie/hoodie.propertieslookups case-insensitive for relevant keys. - Add a unit test covering mixed-case Hudi option keys.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| thirdparty/auron-hudi/src/main/scala/org/apache/spark/sql/auron/hudi/HudiScanSupport.scala | Introduces shared case-insensitive lookup helpers and applies them across Hudi support detection paths (options, catalog, metadata properties, time travel). |
| thirdparty/auron-hudi/src/test/scala/org/apache/spark/sql/auron/hudi/HudiScanSupportSuite.scala | Adds a unit test validating mixed-case option keys are handled as expected. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ef6158f to
c3005c1
Compare
Signed-off-by: weimingdiit <weimingdiit@gmail.com>
c3005c1 to
9ff82bc
Compare
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 #2234
Rationale for this change
Auron Hudi native scan detection checks several Hudi datasource options and table properties by key, including table type, base file format, table path, and time travel options.
These lookups were previously case-sensitive. Spark datasource options are commonly handled case-insensitively, so mixed-case Hudi option keys may cause Auron to miss important scan metadata.
This can lead to incorrect native scan conversion decisions. For example, a mixed-case MOR table type option may not be detected, so a query that should fall back to Spark could be considered eligible for native scan.
What changes are included in this PR?
This PR makes Hudi scan option and property lookup case-insensitive for:
.hoodie/hoodie.propertiesIt also adds unit coverage for mixed-case Hudi options.
Are there any user-facing changes?
No API changes.
This only makes Hudi native scan detection more compatible and safer when Hudi option key casing differs.
How was this patch tested?
CI.