0x26res opened a new issue, #1900:
URL: https://github.com/apache/iceberg-python/issues/1900

   ### Feature Request / Improvement
   
   Currently a pa.Schema with a pa.DurationType can't be converted to an 
iceberg schema.
   
   I think it should be treated the same way as a `pa.Time64Type` and be mapped 
to a `time` type in iceberg.
   
   ```python
   import pyarrow as pa
   import pytest
   from pyiceberg.catalog import Catalog
   from pyiceberg.io.pyarrow import UnsupportedPyArrowTypeException
   
   
   def test_iceberg_config():
       pa_schema = pa.schema(
           [
               pa.field("timestamp", pa.timestamp("us", "UTC")),
               pa.field("time", pa.time64("us")),
               pa.field("duration", pa.duration("us")),
           ],
       )
       with pytest.raises(
           UnsupportedPyArrowTypeException,
           match=r"Column 'duration' has an unsupported type: duration\[us\]",
       ):
           Catalog._convert_schema_if_needed(pa_schema)
   
   ```


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to