laserninja opened a new pull request, #10593:
URL: https://github.com/apache/gravitino/pull/10593

   ### What changes were proposed in this pull request?
   
   Implement the `snapshots` query parameter filtering for the Iceberg REST 
`loadTable` endpoint. When `snapshots=refs`, the response is filtered to only 
include snapshots directly referenced by the table's refs (branches and tags), 
per the Iceberg REST specification.
   
   Follow-up to: #10536 (comment by @roryqi)
   
   ### Why are the changes needed?
   
   The `snapshots` query parameter was accepted but not implemented (marked 
with `// todo support snapshots`). Per the Iceberg REST spec, `snapshots=refs` 
should return only ref-referenced snapshots, reducing payload size for clients 
that don't need the full snapshot history.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes - `loadTable` with `snapshots=refs` now returns a filtered response 
containing only snapshots referenced by branches/tags, instead of all snapshots.
   
   ### How was this patch tested?
   
   - Added `testLoadTableSnapshotsRefsFiltering`: creates a multi-snapshot 
table and verifies `snapshots=refs` returns fewer snapshots, all of which are 
ref-referenced
   - Added `testLoadTableSnapshotsAllReturnsAllSnapshots`: verifies default 
behavior is unchanged
   - All 60 existing tests pass
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to