Ignore partition fields that are dropped from the current-schema
A second attempt to fix this (the first attempt in https://github.com/apache/iceberg/pull/11604 but that one was not safe).
When a field that's dropped that still part of an older partition spec, we currently get an error. See #11842
This will replace it with the UnknownType which will be read as a null. This will work fine, since when the evaluator encounters a null, it will assume that there is no value:
https://github.com/apache/iceberg/blob/dbd7d1c6c32834a8708211f19ad6f6901de5433e/api/src/main/java/org/apache/iceberg/expressions/Projections.java#L204-L207
I misused the UnknownType here, but I think it is better than returning an arbitrary type, like we do in the UnknownTransform:
https://github.com/apache/iceberg/blob/dbd7d1c6c32834a8708211f19ad6f6901de5433e/api/src/main/java/org/apache/iceberg/transforms/UnknownTransform.java#L63-L67
Unfortunately, my first approach, where we drop the field, is incorrect, since V1 tables rely on the order.
Fixes #4563
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.