paleolimbot commented on code in PR #4422:
URL: https://github.com/apache/iceberg-python/pull/4422#discussion_r4619986745
##########
pyiceberg/io/pyarrow.py:
##########
@@ -1767,6 +1838,16 @@ def _task_to_record_batches(
format_kwargs: dict[str, Any] = {"pre_buffer": True, "buffer_size":
ONE_MEGABYTE * 8}
if dictionary_columns and task.file.file_format == FileFormat.PARQUET:
format_kwargs["dictionary_columns"] = dictionary_columns
+ if (
+ task.file.file_format == FileFormat.PARQUET
+ and hasattr(ds.ParquetFragmentScanOptions, "arrow_extensions_enabled")
+ and any(
+ isinstance(table_schema.find_type(field_id), (GeometryType,
GeographyType))
+ for field_id in projected_field_ids & table_schema.field_ids
+ )
+ ):
+ # Dataset scans disable logical-type extension decoding by default.
+ format_kwargs["arrow_extensions_enabled"] = True
Review Comment:
I am not sure about this part: it seems like it may turn on a switch that
had been turned off deliberately (arrow_extensions_enabled is on by default in
pyarrow, so I am guessing it was turned off here)
--
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]