rdblue commented on PR #10678:
URL: https://github.com/apache/iceberg/pull/10678#issuecomment-2272052551

   @sl255051, I think this is the right fix for the test failures from the 
changes to the identity transform method:
   
   ```diff
   diff --git a/api/src/main/java/org/apache/iceberg/PartitionSpec.java 
b/api/src/main/java/org/apache/iceberg/PartitionSpec.java
   index 6f5eb70297..a11c2b8537 100644
   --- a/api/src/main/java/org/apache/iceberg/PartitionSpec.java
   +++ b/api/src/main/java/org/apache/iceberg/PartitionSpec.java
   @@ -465,7 +465,7 @@ public class PartitionSpec implements Serializable {
    
        public Builder identity(String sourceName) {
          Types.NestedField sourceColumn = findSourceColumn(sourceName);
   -      return identity(sourceColumn, sourceColumn.name());
   +      return identity(sourceColumn, 
schema.findColumnName(sourceColumn.fieldId()));
        }
    
        public Builder year(String sourceName, String targetName) {
   ```
   
   The problem was that in the deletes metadata table, the schema is this:
   
   ```
   table {
     2147483546: file_path: required string (Path of a file in which a deleted 
row is stored)
     2147483545: pos: required long (Ordinal position of a deleted row in the 
data file)
     2147483544: row: optional struct<1: c1: optional int, 2: c2: optional 
string, 3: c3: optional string> (Deleted row values)
     2147483642: partition: required struct<4: c1: optional int> (Partition 
that position delete row belongs to)
     2147483643: spec_id: required int (Spec ID used to track the file 
containing a row)
   }
   ```
   
   There are two `c1` columns and now that this uses `sourceColumn.name()` 
there was a duplicate `c1`. Before this, the name used to look up the nested 
field would have been used. That is, both `row.c1` and `partition.c1` so there 
was no conflict.
   
   Using the full name of the field for the partition name fixes the problem.


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to