Skip to content

feat: Support passing kwargs to polars.scan_iceberg in Table.to_polars - #3868

Open
hedger9487 wants to merge 1 commit into
apache:mainfrom
hedger9487:feat/table-to-polars-kwargs-3128
Open

feat: Support passing kwargs to polars.scan_iceberg in Table.to_polars#3868
hedger9487 wants to merge 1 commit into
apache:mainfrom
hedger9487:feat/table-to-polars-kwargs-3128

Conversation

@hedger9487

@hedger9487 hedger9487 commented Aug 27, 2026

Copy link
Copy Markdown

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) matching the convention of other engine bridges (to_daft, to_bodo, to_ray).
  • All 114 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.

Copilot AI lite review requested due to automatic review settings August 27, 2026 09:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@hedger9487
hedger9487 force-pushed the feat/table-to-polars-kwargs-3128 branch from 6619662 to 7f9e959 Compare August 27, 2026 09:32
@hedger9487
hedger9487 force-pushed the feat/table-to-polars-kwargs-3128 branch from 7f9e959 to 2696f07 Compare August 27, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to pass storage config to polars lazy read

2 participants