simw opened a new issue, #1986:
URL: https://github.com/apache/iceberg-python/issues/1986

   ### Apache Iceberg version
   
   0.9.0 (latest release)
   
   ### Please describe the bug 🐞
   
   Preamble: using a local sqlite db:
   ```python
   from pyiceberg.catalog import load_catalog
   
   warehouse_path = "data/warehouse"
   catalog = load_catalog(
       "default",
       **{
           'type': 'sql',
           "uri": f"sqlite:///{warehouse_path}/pyiceberg_catalog.db",
           "warehouse": f"file://{warehouse_path}",
       },
   )
   ```
   
   A pyiceberg UUID column works fine:
   
   ```python
   from pyiceberg.schema import Schema
   from pyiceberg.types import NestedField, UUIDType
   
   schema = Schema(
       NestedField(field_id=1, name="uuid", field_type=UUIDType(), 
required=False),
   )
   
   catalog.create_table("default.test2", schema=schema)
   ```
   
   But a pyarrow UUID column gives an error:
   
   ```python
   import pyarrow as pa
   
   schema = pa.schema([pa.field("foo", pa.uuid(), nullable=True)])
   
   catalog.create_table("default.test4", schema=schema)
   ```
   
   The exception is:
   ```
   File 
~/Code/Projects/others/icebergs/.venv/lib/python3.13/site-packages/pyiceberg/io/pyarrow.py:1032,
 in _(obj, visitor)
      1030     result = visit_pyarrow(field_type, visitor)
      1031 except TypeError as e:
   -> 1032     raise UnsupportedPyArrowTypeException(obj, f"Column '{obj.name}' 
has an unsupported type: {field_type}") from e
      1033 visitor.after_field(obj)
      1035 return visitor.field(obj, result)
   
   UnsupportedPyArrowTypeException: Column 'foo' has an unsupported type: 
extension<arrow.uuid>
   ```
   
   Related to https://github.com/simw/pydantic-to-pyarrow/issues/27
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [x] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


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