huaxingao opened a new pull request #3845:
URL: https://github.com/apache/iceberg/pull/3845


   Please see here https://github.com/apache/iceberg/issues/3709 for a complete 
description of the issue.
   
   Basically, if a partitioned table has a column named "partition", any 
operation on the metadata table will fail with the following error:
   ```
   spark.table("my.test.table.files").show()
   2021-12-10 15:18:22,405 [main] INFO org.apache.iceberg.BaseTableScan - 
Scanning table my.test.table snapshot 1482056096771695160 created at 2021-12-10 
15:18:15.323 with filter true
   java.lang.IllegalArgumentException: Cannot create identity partition sourced 
from different field in schema: partition
     at 
org.apache.iceberg.relocated.com.google.common.base.Preconditions.checkArgument(Preconditions.java:217)
     at 
org.apache.iceberg.PartitionSpec$Builder.checkAndAddPartitionName(PartitionSpec.java:344)
     at 
org.apache.iceberg.PartitionSpec$Builder.identity(PartitionSpec.java:380)
     at 
org.apache.iceberg.BaseMetadataTable.lambda$transformSpec$0(BaseMetadataTable.java:66)
     at 
org.apache.iceberg.relocated.com.google.common.collect.ImmutableList.forEach(ImmutableList.java:405)
     at 
org.apache.iceberg.BaseMetadataTable.transformSpec(BaseMetadataTable.java:66)
     at 
org.apache.iceberg.DataFilesTable$FilesTableScan.planFiles(DataFilesTable.java:118)
     at org.apache.iceberg.BaseTableScan.planFiles(BaseTableScan.java:208)
     at 
org.apache.iceberg.DataFilesTable$FilesTableScan.planFiles(DataFilesTable.java:68)
     at org.apache.iceberg.BaseTableScan.planTasks(BaseTableScan.java:241)
   ```
   This PR fixes the bug.


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