sungwy commented on code in PR #1141:
URL: https://github.com/apache/iceberg-python/pull/1141#discussion_r1759608913
##########
pyiceberg/io/pyarrow.py:
##########
@@ -1251,10 +1253,17 @@ def _task_to_record_batches(
arrow_table = arrow_table.filter(pyarrow_filter)
if len(arrow_table) == 0:
continue
- batch = arrow_table.to_batches()[0]
- yield _to_requested_schema(
- projected_schema, file_project_schema, batch,
downcast_ns_timestamp_to_us=True, use_large_types=use_large_types
- )
+ output_batches = arrow_table.to_batches()
+ else:
+ output_batches = iter([batch])
+ for output_batch in output_batches:
Review Comment:
You are not alone 😨
I think the long term solution is to upgrade our minimum requirement for
PyArrow to 17.0.0, but as you said, I feel that we should still have a fix that
works with the lower versions while we handle the longer process of discussing
the version bump, and actually enforcing it slowly and together with the
community
--
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]