-
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
ALTER TABLE ... DROP COLUMN
allows dropping a column used by old PartitionSpecs
#4563
Comments
Hm. I think that we want to allow the user to drop columns that are used by old partition specs. But that means we will need to handle specs that can't be bound to the current schema. We recently introduced an |
I want to try fix it. @rdblue |
Hey @felixYyu Thanks in advance |
Could you test this case with the refer PR if you have time? @swapz-z @alexjo2144 |
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. |
This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale' |
This should be reopened |
Iceberg 1.1.0 had 3b65cca which seems to address something. Can we now allow this on Trino? @alexjo2144 / @krvikash ? |
hmmm, looks like BEFORE dropping a partition column I need to Here's a sample sequence of steps:
and in Trino:
But if I add an |
cc: @rdblue / @RussellSpitzer Probably Spark should also disallow dropping partition column if it's referenced in the live table files. Here's
|
🤦 I didn't realise this was issue under I now realise that the issue is exactly asking for what I propose - disallow dropping column if used by older partition spec. |
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. |
cc: @rdblue Seems this is important. See #5707 (comment) for why this is important. |
Dropping a column used by the most recent PartitionSpec fails cleanly, however dropping a column used by an older PartitionSpec corrupts the table entirely. For example, in SparkSQL:
NPE Stack Trace:
The text was updated successfully, but these errors were encountered: