[AURON #2175] Add native support for the _file metadata column#2184
Open
weimingdiit wants to merge 1 commit intoapache:masterfrom
Open
[AURON #2175] Add native support for the _file metadata column#2184weimingdiit wants to merge 1 commit intoapache:masterfrom
weimingdiit wants to merge 1 commit intoapache:masterfrom
Conversation
281a4e2 to
9feb4d6
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds native execution support for the Iceberg _file metadata column by treating it as a per-file constant value, allowing queries projecting _file to remain on the native Iceberg scan path (while still falling back for row-level metadata like _pos).
Changes:
- Extends
IcebergScanPlanto split projected columns into file-backed columns vs. supported metadata columns. - Updates native scan execution to materialize
_filevia constant “partition values” per file. - Adds integration tests verifying native scan correctness for
_fileprojections and fallback for unsupported metadata columns.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| thirdparty/auron-iceberg/src/test/scala/org/apache/auron/iceberg/AuronIcebergIntegrationSuite.scala | Adds integration tests and a helper to compare Spark vs. native results and assert native operator usage. |
| thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/execution/auron/plan/NativeIcebergTableScanExec.scala | Plumbs supported metadata columns through native scan by emitting per-file constant values. |
| thirdparty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala | Allows _file metadata column in native planning while still rejecting unsupported metadata columns like _pos. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...rg/src/main/scala/org/apache/spark/sql/execution/auron/plan/NativeIcebergTableScanExec.scala
Show resolved
Hide resolved
...rty/auron-iceberg/src/test/scala/org/apache/auron/iceberg/AuronIcebergIntegrationSuite.scala
Show resolved
Hide resolved
...rty/auron-iceberg/src/test/scala/org/apache/auron/iceberg/AuronIcebergIntegrationSuite.scala
Show resolved
Hide resolved
...rty/auron-iceberg/src/main/scala/org/apache/spark/sql/auron/iceberg/IcebergScanSupport.scala
Show resolved
Hide resolved
Signed-off-by: weimingdiit <weimingdiit@gmail.com>
9feb4d6 to
f512739
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 #2175
Rationale for this change
This PR adds native support for Iceberg metadata columns in Auron, starting with
_file.Previously, Iceberg scans fell back whenever metadata columns were projected. With this change, queries that read
_filecan remain on the native Iceberg scan path.Iceberg metadata columns are useful in real workloads for debugging, lineage, and inspection queries. However, Auron previously treated metadata columns as unsupported and fell back to Spark.
This PR improves native Iceberg scan coverage by supporting metadata columns that can be represented as file-level constant values, while still falling back for unsupported row-level metadata columns.
What changes are included in this PR?
This PR:
_filemetadata column_poson the fallback pathIcebergScanPlanto distinguish between:IcebergScanSupportto stop rejecting all metadata columns unconditionallyNativeIcebergTableScanExecto project both normal data columns and supported metadata columnsAuronIcebergIntegrationSuiteScope of support in this PR
This PR intentionally takes a conservative approach.
Supported in native scan:
_fileStill falls back:
_posWhy this design?
_fileis a file-level metadata column: every row coming from the same file shares the same value. That makes it a good fit for the existing native file-scan path by treating it as a per-file constant column.In contrast,
_posis row-level metadata and cannot be represented correctly with the same mechanism, so it remains unsupported in native execution for now.How was this patch tested?
CI.