Skip to content

Commit 299f156

Browse files
committed
Pass the partitioned write tasks as an iterator
write_file expects an Iterator, and mypy rejects a list on Python 3.11.
1 parent 2532c5f commit 299f156

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎pyiceberg/io/pyarrow.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3349,7 +3349,7 @@ def _dataframe_to_data_files(
33493349
)
33503350
for batches in bin_pack_arrow_table(sorted_partition, target_file_size)
33513351
)
3352-
yield from write_file(io=io, table_metadata=table_metadata, tasks=tasks)
3352+
yield from write_file(io=io, table_metadata=table_metadata, tasks=iter(tasks))
33533353

33543354

33553355
def _sort_table_for_write(table_metadata: TableMetadata, table: pa.Table) -> tuple[pa.Table, int | None]:

0 commit comments

Comments
 (0)