nastra commented on code in PR #14500:
URL: https://github.com/apache/iceberg/pull/14500#discussion_r2527847456
##########
api/src/test/java/org/apache/iceberg/expressions/TestInclusiveMetricsEvaluator.java:
##########
@@ -970,4 +988,198 @@ public void testNotNullInNestedStruct() {
.as("Should not read: optional_address.optional_street2 is optional")
.isFalse();
}
+
+ /** Tests UUID equality filter using byte-order comparison against data file
metrics. */
+ @Test
+ public void testUuidEq() {
+ UUID belowMin = UUID.fromString("00000000-0000-0000-0000-000000000000");
+ boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA, equal("uuid",
belowMin)).eval(FILE);
+ assertThat(shouldRead).as("Should not read: uuid below lower
bound").isFalse();
+
+ shouldRead = new InclusiveMetricsEvaluator(SCHEMA, equal("uuid",
UUID_MIN_VALUE)).eval(FILE);
+ assertThat(shouldRead).as("Should read: uuid equal to lower
bound").isTrue();
+
+ UUID middle = UUID.fromString("7fffffff-ffff-ffff-7fff-ffffffffffff");
Review Comment:
```suggestion
UUID between = UUID.fromString("7fffffff-ffff-ffff-7fff-ffffffffffff");
```
--
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]