Hey folks,

There is a bug when dropping a column that is referenced by older partition
specs that has been reported several times(see this
<https://github.com/apache/iceberg/pull/11842#issue-2753620197>) . Dropping
such a column breaks the table.

It has an easy repro as seen here
<https://github.com/apache/iceberg/issues/10234#issuecomment-2117081412>.
It can also be reproduced in core tests as shown in this PR
<https://github.com/apache/iceberg/pull/11842#issue-2753620197>.

After chatting with Russell, Amogh and @advancedxy
<https://github.com/advancedxy>, we concluded the solution is two parts

Part 1: Prevent dropping the column referenced in older specs (#
<https://github.com/apache/iceberg/pull/11842>11842
<https://github.com/apache/iceberg/pull/11842>)
Part 2: Provide a maintenance API for users to remove all unused specs (
#10755 <https://github.com/apache/iceberg/pull/10755>)

My concern is that Part 1 is a big behaviour change i.e we cannot drop any
columns part of a partition spec. Also, it requires changing many partition
evolution tests. I'm wondering if there is a better approach to this bug.

Please take a look at # <https://github.com/apache/iceberg/pull/11842>11842
<https://github.com/apache/iceberg/pull/11842> and let me know what you
think.

Thanks,
Anurag Mantripragada

Reply via email to