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

   As already discussed in 
https://github.com/apache/iceberg/pull/3411#discussion_r821845093 this special 
case will fail to create a metadata schema with the following error:
   ```
   PartitionSpec initialSpec = PartitionSpec.builderFor(SCHEMA)
       .identity("data")
       .build();
   TestTables.TestTable table = TestTables.create(tableDir, "test", SCHEMA, 
initialSpec, V2_FORMAT_VERSION);
   
   table.updateSpec()
       .removeField("data")
       .commit();
   
   table.updateSpec()
       .addField("data")
       .addField("id")
       .commit();
   
   struct<1000: data: optional string, 1001: data: optional string, 1002: id: 
optional int>
   ```
   gives:
   `Invalid schema: multiple fields for name partition.data: 1000 and 1001 `
   
   It's due to how `Partitioning$partitionType` method collects all specs and 
creates a union partition type. For V2 tables reused partition columns don't 
get renamed, they just get a new id.
   
   


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