-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Error happened after deleting a partitioned column #5399
Comments
Do you have a testcase or sample SQL to reproduce this? |
we can reproduce this error using the following sql (spark3.2, iceberg0.13 or 0.14), prod is the name of catalog: CREATE TABLE prod.db.sample (id bigint, data string, category string) USING iceberg PARTITIONED BY (category) TBLPROPERTIES('format-version' = '2'); ALTER TABLE prod.db.sample DROP PARTITION FIELD category; ALTER TABLE prod.db.sample DROP COLUMN category; |
Update:
|
just fyi that we're tracking the same issue in #5676 |
Hey all, I have a PR ready: #5707 This doesn't lookup the historical columns anymore. |
If a fields is being deleted that used to be part of a partition spec, that will throw an error because it cannot resolve the field anymore. Closes apache#5676 Closes apache#5707 Closes apache#5399
If a fields is being deleted that used to be part of a partition spec, that will throw an error because it cannot resolve the field anymore. Closes apache#5676 Closes apache#5707 Closes apache#5399
error message:
json of metadata file contains information of schemas/partition-specs/sort-orders.
But there is no link between schemas and partition-specs, thus deleting a partitioned column will raise error while building history partition-specs, because source-id could not be found in current schema. I think that schema-id should be add to json of partition-specs.
part of metadata file:
The text was updated successfully, but these errors were encountered: