stevenzwu commented on code in PR #16692:
URL: https://github.com/apache/iceberg/pull/16692#discussion_r3554714520


##########
data/src/test/java/org/apache/iceberg/data/TestMetricsRowGroupFilter.java:
##########
@@ -471,6 +472,86 @@ public void testColumnNotInFile() {
     }
   }
 
+  @TestTemplate
+  public void testColumnNotInFileWithInitialDefault() {

Review Comment:
   A few paths that flow through the new `predicate()` override aren't 
exercised here. All three can reuse this test's 'field id not in the file' 
pattern with fresh ids — no writer setup, no new fixture:
   
   - `startsWith` / `notStartsWith` on `country`: `startsWith("U")` should 
match, `startsWith("X")` should skip; symmetric for `notStartsWith`.
   - One non-string default. `pred.test((T) initialDefault)` receives the 
internal Iceberg representation — `Integer` for date, `Long` for timestamp, 
`BigDecimal` for decimal, `ByteBuffer` for binary. String hides that contract 
because Java value and internal repr coincide; e.g. an `IntegerType` field (id 
100) with `Literal.of(42)` against `lt/gt/eq` would guard the unchecked cast 
against a future representation change.
   - A `DoubleType` field (id 101) with a non-NaN default — enables `isNaN` 
(skip) and `notNaN` (match), which the current coverage skips entirely.



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