-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
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:
- Create a table (v1) with two columns in it (id 1, and 2 respectively) (col1 long ,col2 long) also /w partition spec col1 (identity)
- Remove partition field from partition spec aka void(1)
- Remove col1 from table
- 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)
Fokko
Metadata
Metadata
Assignees
Labels
No labels