vatogrande opened a new issue, #7386:
URL: https://github.com/apache/iceberg/issues/7386
### Apache Iceberg version
1.2.1 (latest release)
### Query engine
None
### Please describe the bug 🐞
With a table /w v1 metadata, after deleting a partition field and then
deleting the related schema field, partitioning is then broken moving forward
(cannot add a new partition field).
Steps:
1. Create a table (v1) with two columns in it (id 1, and 2 respectively)
(col1 long ,col2 long) also /w partition spec col1 (identity)
2. Remove partition field from partition spec aka void(1)
3. Remove col1 from table
4. try to add a new partition field for col2 and receive exception
`java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because
"name" is null
at org.apache.iceberg.Schema.findField(Schema.java:341)
at org.apache.iceberg.TableMetadata.freshSpec(TableMetadata.java:743)
at org.apache.iceberg.TableMetadata.access$2900(TableMetadata.java:50)
at
org.apache.iceberg.TableMetadata$Builder.addPartitionSpecInternal(TableMetadata.java:1462)
at
org.apache.iceberg.TableMetadata$Builder.setDefaultPartitionSpec(TableMetadata.java:1040)
at
org.apache.iceberg.TableMetadata.updatePartitionSpec(TableMetadata.java:552)
at
org.apache.iceberg.BaseUpdatePartitionSpec.commit(BaseUpdatePartitionSpec.java:331)`
--
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]