Fokko commented on code in PR #4422:
URL: https://github.com/apache/iceberg-python/pull/4422#discussion_r4621292918


##########
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:
   Hey @paleolimbot, great seeing you here. I'm not sure why it isn't enabled 
and I don't see a reason to disable it.



-- 
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]

Reply via email to