Repository navigation
Add dictionary_columns to incremental append scan Arrow reads - #4521
Merged
Merged
Conversation
`DataScan.to_arrow` and `to_arrow_batch_reader` accept `dictionary_columns`, but the `IncrementalAppendScan` equivalents did not, even though the shared Arrow helpers already thread the option through. Forward it with the same signature and docstring as `DataScan`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
smaheshwar-pltr
marked this pull request as ready for review
November 29, 2026 23:22
smaheshwar-pltr
commented
Nov 30, 2026
|
|
||
| All rows will be loaded into memory at once. | ||
|
|
||
| Args: |
Contributor
Author
There was a problem hiding this comment.
(See
iceberg-python/pyiceberg/table/__init__.py
Lines 2681 to 2687 in d9c7869
Fokko
approved these changes
Nov 30, 2026
Fokko
left a comment
Contributor
There was a problem hiding this comment.
Thanks @smaheshwar-pltr. In hindsight this shouldn't be exposed since it is an PyArrow specific implementation detail, but that ship has sailed 😬
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.
Rationale for this change
DataScan.to_arrow()andto_arrow_batch_reader()takedictionary_columns, which reads the given columns dictionary-encoded to save memory on low-cardinality strings. TheIncrementalAppendScanversions don't, although both go through the same Arrow helpers. This adds the argument to both, with the same default and docstring asDataScan.Are these changes tested?
Yes. A test runs an incremental scan over two appends on the in-memory and SQL catalogs, and checks that both methods return only the requested column dictionary-encoded.
Are there any user-facing changes?
IncrementalAppendScan.to_arrow()andto_arrow_batch_reader()accept an optionaldictionary_columnsargument.AI Disclosure: This PR was authored by Claude Code (Opus 5.5) but directed and overseen by me.