-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong conversion from Delta to Iceberg when Delta table is enabled column mapping #624
Comments
Hi @the-other-tim-brown, could you please take a look on this issue? Thank you. |
Thanks for reporting this, it seems like we need a concept of a "last used ID" instead of starting at 0, is that correct? I am curious if Iceberg will allow us to set the ID of the element level higher than the value's ID. |
Hi Tim @the-other-tim-brown , |
A quick update,, to answer this
However, back to original issue for a Delta table with enabling column mapping, when the schema evolves and for example a new column is added, actually the column name written in the underlying parquet file is different:
The added field name is |
Apart from it, I was wondering if you have tested the case when renaming a column of delta table, can Iceberg table successfully handle this schema update? |
Search before asking
Please describe the bug 🐞
Error
When converting a Delta table to Iceberg table with enabling Delta column mapping(https://docs.delta.io/latest/delta-column-mapping.html), I got this error.
Details with troubleshooting
Table schema:
Troubleshooting:
While enabling delta column mapping, Delta doesn't assign id for element level for a list type field (similar for map field), here is what looks like in Delta (log from
_delta_log/00000000000000000000.json
)Raw log snippets
raw log
Readable structure:
However, Iceberg assigns id for element level when the field is list type. See how Xtable assigns ids for fields whose id is null without checking :
https://github.com/apache/incubator-xtable/blob/main/xtable-core/src/main/java/org/apache/xtable/iceberg/IcebergSchemaExtractor.java#L67
https://github.com/apache/incubator-xtable/blob/main/xtable-core/src/main/java/org/apache/xtable/iceberg/IcebergSchemaExtractor.java#L244
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: