Skip to content

Core: Fix useSnapshotSchema logic and projection in RESTTableScan#15609

Open
singhpk234 wants to merge 3 commits intoapache:mainfrom
singhpk234:fix/rest-table-scan-snapshot-schema-and-projection
Open

Core: Fix useSnapshotSchema logic and projection in RESTTableScan#15609
singhpk234 wants to merge 3 commits intoapache:mainfrom
singhpk234:fix/rest-table-scan-snapshot-schema-and-projection

Conversation

@singhpk234
Copy link
Contributor

The useSnapshotSchema determination previously compared snapshot IDs, which was incorrect. The real distinction is branch (false) vs tag/direct snapshot ID (true). This is now tracked via a field that is set in overridden useRef() and useSnapshot() methods.

The projection code previously only selected top-level field names, missing nested fields. Now uses TypeUtil.getProjectedIds() matching the pattern in SnapshotScan.

@github-actions github-actions bot added the core label Mar 12, 2026
@singhpk234 singhpk234 closed this Mar 12, 2026
@singhpk234 singhpk234 reopened this Mar 13, 2026
@singhpk234
Copy link
Contributor Author

working on adding a test for this

@singhpk234 singhpk234 requested review from nastra and rdblue March 13, 2026 06:10
The useSnapshotSchema determination previously compared snapshot IDs,
which was incorrect. The real distinction is branch (false) vs
tag/direct snapshot ID (true). This is now tracked via a field that
is set in overridden useRef() and useSnapshot() methods.

The projection code previously only selected top-level field names,
missing nested fields. Now uses TypeUtil.getProjectedIds() matching
the pattern in SnapshotScan.
@sfc-gh-prsingh sfc-gh-prsingh force-pushed the fix/rest-table-scan-snapshot-schema-and-projection branch from b7c9b4b to ec39661 Compare March 13, 2026 06:29
@singhpk234 singhpk234 marked this pull request as ready for review March 13, 2026 06:29
Set useSnapshotSchema on this before calling super, letting
newRefinedScan propagate the value to the new instance.
@singhpk234 singhpk234 added this to the Iceberg 1.11.0 milestone Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants