Skip to content

[AURON #2246] Reuse Hudi table properties when detecting native scan support#2247

Merged
slfan1989 merged 1 commit into
apache:masterfrom
weimingdiit:feat/hudi-reues-properties
May 14, 2026
Merged

[AURON #2246] Reuse Hudi table properties when detecting native scan support#2247
slfan1989 merged 1 commit into
apache:masterfrom
weimingdiit:feat/hudi-reues-properties

Conversation

@weimingdiit

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #2246

Rationale for this change

Hudi native scan support detection may need to read .hoodie/hoodie.properties to resolve table type and base file format. Before this change, these two pieces of metadata were loaded through separate code paths, which duplicated the file loading logic.

What changes are included in this PR?

  • Add a shared helper to load Hudi table properties from .hoodie/hoodie.properties.
  • Reuse the loaded properties when resolving Hudi table type and base file format.
  • Use Using.resource to manage the metadata input stream.
  • Reuse the resolved supported file format in HudiConvertProvider.

Are there any user-facing changes?

No. This is an internal refactor for Hudi native scan support detection.

How was this patch tested?

CI. Existing Hudi scan support tests should cover the behavior.

@weimingdiit
weimingdiit force-pushed the feat/hudi-reues-properties branch from 50588cc to 5155399 Compare May 10, 2026 02:44
@weimingdiit
weimingdiit marked this pull request as ready for review May 10, 2026 03:18
@slfan1989
slfan1989 requested a review from Copilot May 10, 2026 07:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors Hudi native scan support detection to avoid duplicated reads of .hoodie/hoodie.properties by introducing a shared properties loader and reusing the loaded Properties when resolving table type and base file format.

Changes:

  • Added a shared helper to load Hudi table properties from metadata once (with Using.resource for stream management).
  • Reused the loaded table properties to resolve Hudi table type and base file format during support detection.
  • Introduced supportedFileFormat and updated HudiConvertProvider to reuse the resolved supported format when selecting native Parquet vs ORC scan conversion.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
thirdparty/auron-hudi/src/main/scala/org/apache/spark/sql/auron/hudi/HudiScanSupport.scala Adds shared hoodie.properties loader and threads the resulting Properties through file format + support detection.
thirdparty/auron-hudi/src/main/scala/org/apache/spark/sql/auron/hudi/HudiConvertProvider.scala Switches to supportedFileFormat for support checks and to select the correct native scan implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

… scan support

Signed-off-by: weimingdiit <weimingdiit@gmail.com>
@weimingdiit
weimingdiit force-pushed the feat/hudi-reues-properties branch from 5155399 to dcdfd47 Compare May 10, 2026 11:34
@slfan1989
slfan1989 merged commit d4b47e0 into apache:master May 14, 2026
123 checks passed
@slfan1989

Copy link
Copy Markdown
Contributor

@weimingdiit Thanks for the contribution! Merged. @yew1eb Thanks for the review!

@weimingdiit

Copy link
Copy Markdown
Contributor Author

@yew1eb @slfan1989 Thanks for your review and merge.

@weimingdiit
weimingdiit deleted the feat/hudi-reues-properties branch May 14, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reuse Hudi table properties when detecting native scan support

4 participants