jun-he opened a new issue #2569:
URL: https://github.com/apache/iceberg/issues/2569


   ```
       sql("CREATE TABLE testTable (id bigint NOT NULL, ts timestamp, data 
string) USING iceberg");
       sql("ALTER TABLE testTable ADD PARTITION FIELD bucket(16, id)");
       sql("ALTER TABLE testTable DROP PARTITION FIELD bucket(16, id)");
       sql("ALTER TABLE testTable ADD PARTITION FIELD truncate(id, 4)");
       sql("ALTER TABLE testTable DROP PARTITION FIELD truncate(id, 4)");
       sql("ALTER TABLE testTable ADD PARTITION FIELD years(ts)");
   ```
   will throw an error
   ```
       java.lang.IllegalArgumentException: Multiple entries with same key: (1, 
void)=1001: id_trunc_4: void(1) and (1, void)=1000: shard: void(1)
           at 
org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap.conflictException(ImmutableMap.java:214)
           at 
org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:208)
           at 
org.apache.iceberg.relocated.com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:146)
           at 
org.apache.iceberg.relocated.com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:109)
           at 
org.apache.iceberg.relocated.com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:392)
           at 
org.apache.iceberg.BaseUpdatePartitionSpec.indexSpecByTransform(BaseUpdatePartitionSpec.java:296)
           at 
org.apache.iceberg.BaseUpdatePartitionSpec.<init>(BaseUpdatePartitionSpec.java:71)
   ......
   ```
   When doing `indexSpecByTransform` within `BaseUpdatePartitionSpec`, 
`VoidTransform` probably should be skipped.
   


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

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