Fokko commented on issue #5676: URL: https://github.com/apache/iceberg/issues/5676#issuecomment-1234015308
@kbendick The tests are different, it doesn't drop the source column. I did some digging around in the code, and we bind the partition spec right away because we need the column type for the transform. There is a PR https://github.com/apache/iceberg/pull/5601 that will decouple this, and then we can also solve this issue. A simple test reproduces this behavior: ```java @Test public void testDropColumnOfOldPartitionField() { sql("CREATE TABLE %s (id bigint NOT NULL, ts timestamp, day_of_ts date) USING iceberg PARTITIONED BY (day_of_ts)", tableName); sql("ALTER TABLE %s SET TBLPROPERTIES ('format-version' = '2');", tableName); sql("ALTER TABLE %s REPLACE PARTITION FIELD day_of_ts WITH days(ts)", tableName); sql("ALTER TABLE %s DROP COLUMN day_of_ts", tableName); } ``` I think this should be quite straightforward to fix this once https://github.com/apache/iceberg/pull/5601 has been merged -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
