Tishj commented on issue #18309:
URL: https://github.com/apache/iceberg/issues/18309#issuecomment-5917088645

   I did some digging, the code in this repro defines the `equals` for 
`PartitionField` as:
   ```java
     @Override
     public boolean equals(Object other) {
       if (this == other) {
         return true;
       } else if (!(other instanceof PartitionField)) {
         return false;
       }
   
       PartitionField that = (PartitionField) other;
       return sourceId == that.sourceId
           && fieldId == that.fieldId
           && name.equals(that.name)
           && transform.toString().equals(that.transform.toString());
     }
   ```
   Which means that the field-id is part of the equivalence of a partition 
field?
   This isn't used in the partition-spec `compatibleWith` implementation, which 
seems to follow the letter of the specification.
   `PartitionField` has no such `compatibleWith` method however, so I actually 
don't know how fields are compared for equality, since the `PartitionSpec`'s 
`equals` is not what's used to implement the specification.


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