You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/09/01 08:51:02 UTC

[GitHub] [iceberg] singhpk234 commented on issue #5676: Core: Dropping an old partition column causes NPE (and corrupt metadata on v2 tables)

singhpk234 commented on issue #5676:
URL: https://github.com/apache/iceberg/issues/5676#issuecomment-1233962058

   As per my understanding, I think the issue here is that we are trying to bind all partition specs to to current schema which will always not be possible.
   
   For ex : we find current schema and assign this to local var `schema` 
   
   https://github.com/apache/iceberg/blob/84f40cff9b98ee15b706289e551078355bb8a7a5/core/src/main/java/org/apache/iceberg/TableMetadataParser.java#L344-L351
   
   we bind all partition specs to the `schema` which is equal to current schema
   
   https://github.com/apache/iceberg/blob/84f40cff9b98ee15b706289e551078355bb8a7a5/core/src/main/java/org/apache/iceberg/TableMetadataParser.java#L381-L385
   
   
   which is where I think it's failing as we have dropped `day_of_ts` so current schema doesn't have this and partition spec `0` (initial partitioning ) has reference to `day_of_ts` hence it's failing to bind it.
   
   
   


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org