fix: fall back to Spark when Parquet field ID matching is enabled in native_datafusion#3415
Merged
andygrove merged 3 commits intoapache:mainfrom Feb 6, 2026
Merged
Conversation
…native_datafusion When `spark.sql.parquet.fieldId.read.enabled` is true, native_datafusion reads columns by name/position rather than Parquet field IDs, producing wrong results. Detect this config and fall back to Spark. Closes apache#3316 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Spark's TestSQLContext overrides PARQUET_FIELD_ID_READ_ENABLED to true for all tests, so checking only the config caused every native_datafusion scan to fall back in CI. Now also check ParquetUtils.hasFieldIds() on the required schema, matching Spark's own pattern in ParquetRowConverter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lback # Conflicts: # dev/diffs/3.5.8.diff
mbutrovich
approved these changes
Feb 6, 2026
Contributor
mbutrovich
left a comment
There was a problem hiding this comment.
Makes sense to me. Are we filing follow up issues for the fallbacks?
Member
Author
|
andygrove
added a commit
to andygrove/datafusion-comet
that referenced
this pull request
Feb 6, 2026
…#3415 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
andygrove
added a commit
to andygrove/datafusion-comet
that referenced
this pull request
Feb 6, 2026
Row index tests (apache#3317) and field ID tests (apache#3316) are both fixed upstream in apache#3414 and apache#3415, so no additional test ignores are needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
nativeDataFusionScan()to detect whenspark.sql.parquet.fieldId.read.enabledis true and fall back to Spark, since native DataFusion reads columns by name/position rather than Parquet field IDsIgnoreCometNativeDataFusiontest annotations for [native_datafusion] [Spark SQL Tests] Parquet field ID matching not supported #3316 from the Spark 3.5.8 diff (ParquetFieldIdIOSuite)Closes #3316
Test plan
ParquetFieldIdIOSuitepass withnative_datafusionenabled in CI🤖 Generated with Claude Code