bigluck commented on issue #541:
URL: https://github.com/apache/iceberg-python/issues/541#issuecomment-2042634726
I'm facing a similar issue in my code.
Tested using main@7fcdb8d25dfa2498ba98a2b8e8d2b327d85fa7c9 (the commit after
`Minor fixes, #523 followup (#563)` and `Cast data to Iceberg Table's pyarrow
schema (#523)`)
In my case I'm creating a new table from this arrow schema:
```
ds: timestamp[ns]
yhat: double
yhat_lower: double
yhat_upper: double
-- schema metadata --
```
This is the full stacktrace:
```
Traceback (most recent call last):
File "/bpln/cba723bb/82eddf43/pip/runtime/s3write/invoke.py", line 62, in
invoke
self._pyiceberg_write_model(model)
File "/bpln/cba723bb/82eddf43/pip/runtime/s3write/invoke.py", line 137, in
_pyiceberg_write_model
pyiceberg_table = catalog.create_table(
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/runtime/shared/pyiceberg_patch.py", line 105, in create_table
iceberg_schema = self._convert_schema_if_needed(schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/bpln/cba723bb/82eddf43/pip/pyiceberg/pyiceberg/catalog/__init__.py", line
559, in _convert_schema_if_needed
schema: Schema = visit_pyarrow(schema, _ConvertToIcebergWithoutIDs()) #
type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/functools.py", line 909, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/bpln/cba723bb/82eddf43/pip/pyiceberg/pyiceberg/io/pyarrow.py", line
682, in _
return visitor.schema(obj, visit_pyarrow(pa.struct(obj), visitor))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/functools.py", line 909, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/bpln/cba723bb/82eddf43/pip/pyiceberg/pyiceberg/io/pyarrow.py", line
691, in _
result = visit_pyarrow(field.type, visitor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/functools.py", line 909, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/bpln/cba723bb/82eddf43/pip/pyiceberg/pyiceberg/io/pyarrow.py", line
726, in _
return visitor.primitive(obj)
^^^^^^^^^^^^^^^^^^^^^^
File "/bpln/cba723bb/82eddf43/pip/pyiceberg/pyiceberg/io/pyarrow.py", line
899, in primitive
raise TypeError(f"Unsupported type: {primitive}")
TypeError: Unsupported type: timestamp[ns]
```
--
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]