hedger9487 opened a new pull request, #3868:
URL: https://github.com/apache/iceberg-python/pull/3868

   Closes #3128
   
   # Rationale for this change
   
   Currently, `Table.to_polars()` does not accept keyword arguments and calls 
`polars.scan_iceberg(self)` directly without forwarding options. This prevents 
users from passing crucial scan configurations such as `storage_options` (cloud 
credentials for S3/GCS/Azure), `snapshot_id` (time-travel queries), or 
`reader_override`.
   
   This change updates `Table.to_polars()` to accept `**kwargs: Any` and 
forward them to `polars.scan_iceberg(self, **kwargs)`.
   
   ## Are these changes tested?
   
   Yes, tested with:
   - `tests/table/test_init.py::test_table_to_polars_forwards_kwargs`: Unit 
test verifying exact forwarding of keyword arguments (both empty and populated).
   - `tests/table/test_init.py::test_table_to_polars_e2e`: End-to-end 
integration test verifying real Polars scan execution with an Iceberg table, 
both without parameters and with `snapshot_id`.
   - All 115 tests in `tests/table/test_init.py` and 468 tests in 
`tests/table/` pass cleanly.
   - All pre-commit static analysis checks (`uv run prek run -a`) pass 100%.
   
   ## Are there any user-facing changes?
   
   Yes, `Table.to_polars()` now accepts `**kwargs` forwarded to 
`polars.scan_iceberg`, enabling users to supply `storage_options`, 
`snapshot_id`, `reader_override`, etc.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to