szlta opened a new issue #4292: URL: https://github.com/apache/iceberg/issues/4292
Currently PartitionsTable will be constructed with a schema based on the latest table spec only: https://github.com/apache/iceberg/blob/master/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ficeberg%2FPartitionsTable.java#L48 Especially with V2, this can result in funny partition table prints when we drop a partition field and create a different one. E.g: Table schema: a int, b timestamp spec0: year(b) -> partitions table schema: b_year int spec1: day(b) -> partitions table schema: b_day date Any rows inserted in spec0 times will store partition values that is epoch years, like 52 for 2022. Then after spec change the value 52 would be considered an epoch day instead, and will yield to "1970-02-22" I believe the solution would be to use what DataFilesTable has already: Partitioning.partitionType(table()); see: https://github.com/apache/iceberg/blob/master/core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ficeberg%2FDataFilesTable.java#L55 cc: @RussellSpitzer @aokolnychyi -- 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]
