lurnagao opened a new issue, #7415:
URL: https://github.com/apache/iceberg/issues/7415

   ### Apache Iceberg version
   
   1.2.0
   
   ### Query engine
   
   None
   
   ### Please describe the bug 🐞
   
   1.schema and spec:
   `Types.NestedField.required(1, "id", Types.IntegerType.get());
   Types.NestedField.required(2, "name", Types.StringType.get());
   Types.NestedField.required(3, "dt", Types.StringType.get());`
   
   `PartitionSpec.builderFor(schema).identity("dt").build();`
   
   2.drop partition field
   `table.updateSpec().removeField("dt").commit`
   
   3.drop column field
   `table.updateSchema().deleteColumn("dt").commit`
   
   4.hivesql insert will throw npe:
   `Exception in thread "main" java.lang.NullPointerException: Type cannot be 
null
        at 
org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:897)
        at org.apache.iceberg.types.Types$NestedField.<init>(Types.java:449)
        at org.apache.iceberg.types.Types$NestedField.optional(Types.java:418)
        at 
org.apache.iceberg.PartitionSpec.partitionType(PartitionSpec.java:141)
        at 
org.apache.iceberg.util.PartitionSet.lambda$new$0(PartitionSet.java:45)
        at 
org.apache.iceberg.relocated.com.google.common.collect.RegularImmutableMap.forEach(RegularImmutableMap.java:185)
        at org.apache.iceberg.util.PartitionSet.<init>(PartitionSet.java:45)
        at org.apache.iceberg.util.PartitionSet.create(PartitionSet.java:37)
        at 
org.apache.iceberg.ManifestFilterManager.<init>(ManifestFilterManager.java:91)
        at 
org.apache.iceberg.MergingSnapshotProducer$DataFileFilterManager.<init>(MergingSnapshotProducer.java:701)
        at 
org.apache.iceberg.MergingSnapshotProducer$DataFileFilterManager.<init>(MergingSnapshotProducer.java:699)
        at 
org.apache.iceberg.MergingSnapshotProducer.<init>(MergingSnapshotProducer.java:117)
        at org.apache.iceberg.MergeAppend.<init>(MergeAppend.java:32)`
   


-- 
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]

Reply via email to