CTTY commented on code in PR #18622:
URL: https://github.com/apache/iceberg/pull/18622#discussion_r4571642916


##########
api/src/main/java/org/apache/iceberg/types/Comparators.java:
##########
@@ -46,7 +47,7 @@ private Comparators() {}
           .put(Types.TimestampNanoType.withZone(), Comparator.naturalOrder())
           .put(Types.TimestampNanoType.withoutZone(), 
Comparator.naturalOrder())
           .put(Types.StringType.get(), Comparators.charSequences())
-          .put(Types.UUIDType.get(), Comparator.naturalOrder())
+          .put(Types.UUIDType.get(), Comparators.uuids())

Review Comment:
   I hit the same mismatch when testing something. UUIDs are compared through 
two paths, and this PR changes only one:
   - (fixed by this PR) `Comparators.forType(UUIDType)` → now unsigned. Used on 
the **write** side (`PartitionSummary`, `ParquetMetrics`) and by 
`DeleteFileIndex`. 
   - `Literal.comparator()` (`Literals.UUIDLiteral` is a `ComparableLiteral`, 
i.e. `UUID.compareTo`) → still signed. Used by every evaluator: 
`ManifestEvaluator`, `InclusiveMetricsEvaluator`, `StrictMetricsEvaluator`, 
`ParquetMetricsRowGroupFilter`



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