Better error messages when creating a table with unsupported types
Feature Request / Improvement
Related to https://github.com/apache/iceberg-python/issues/830 (reproducer included)
Creating a iceberg table using an arrow table that contains an unsupported type (such as date64). The resultant message is TypeError: Unsupported type: date64[ms]
It would be great if this error message also printed out the column name that has this unsupported type.
Even better, instead of raising a TypeError can a more specific error be returned (such as UnsupportedPyArrowType) which includes the pyarrow.Field (column_name, column_type) as an attribute so that this error can be caught and different exception re-raised based on information contained inside UnsupportedPyArrowType
For example, something like
try:
...
except UnsupportedPyArrowType as e:
raise NewException(f"failure due to {e.field.name}")
Heres the relevant code
https://github.com/apache/iceberg-python/blob/a6cd0cf325b87b360077bad1d79262611ea64424/pyiceberg/io/pyarrow.py#L932
I want to work on this issue, but I cannot find a contributing-doc in the repo on how to set-up the project and run tests.
@kevinjqliu
@vivek378521 The docs are located here.
https://py.iceberg.apache.org/contributing/ https://github.com/apache/iceberg-python/blob/main/mkdocs/docs/contributing.md
This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.
Hi @kevinjqliu, I'm not sure if this issue is being worked on, in case not, can you assign it to me? :)
@DevChrisCross assigned to you!
@kevinjqliu @Fokko could you kindly check the PR please? Thank you! :)