Skip to content

Commit 33e4c6d

Browse files
Gayathri Srividya RajavarapuGayathri Srividya Rajavarapu
authored andcommitted
refactor: keep dictionary_columns as tuple in ArrowScan
1 parent e429e48 commit 33e4c6d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pyiceberg/io/pyarrow.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,11 +1625,11 @@ def _task_to_record_batches(
16251625
partition_spec: PartitionSpec | None = None,
16261626
format_version: TableVersion = TableProperties.DEFAULT_FORMAT_VERSION,
16271627
downcast_ns_timestamp_to_us: bool | None = None,
1628-
dictionary_columns: frozenset[str] = frozenset(),
1628+
dictionary_columns: tuple[str, ...] = (),
16291629
) -> Iterator[pa.RecordBatch]:
16301630
format_kwargs: dict[str, Any] = {"pre_buffer": True, "buffer_size": ONE_MEGABYTE * 8}
16311631
if dictionary_columns and task.file.file_format == FileFormat.PARQUET:
1632-
format_kwargs["dictionary_columns"] = tuple(dictionary_columns)
1632+
format_kwargs["dictionary_columns"] = dictionary_columns
16331633
arrow_format = _get_file_format(task.file.file_format, **format_kwargs)
16341634
with io.new_input(task.file.file_path).open() as fin:
16351635
fragment = arrow_format.make_fragment(fin)
@@ -1733,7 +1733,7 @@ class ArrowScan:
17331733
_case_sensitive: bool
17341734
_limit: int | None
17351735
_downcast_ns_timestamp_to_us: bool | None
1736-
_dictionary_columns: frozenset[str]
1736+
_dictionary_columns: tuple[str, ...]
17371737
"""Scan the Iceberg Table and create an Arrow construct.
17381738
17391739
Attributes:
@@ -1764,7 +1764,7 @@ def __init__(
17641764
self._case_sensitive = case_sensitive
17651765
self._limit = limit
17661766
self._downcast_ns_timestamp_to_us = Config().get_bool(DOWNCAST_NS_TIMESTAMP_TO_US_ON_WRITE)
1767-
self._dictionary_columns = frozenset(dictionary_columns)
1767+
self._dictionary_columns = dictionary_columns
17681768

17691769
@property
17701770
def _projected_field_ids(self) -> set[int]:

0 commit comments

Comments
 (0)