Akanksha-kedia opened a new pull request, #17903:
URL: https://github.com/apache/iceberg/pull/17903

   ### What changes were proposed in this pull request?
   `testSqlParseNaN()` in `TestFlinkTableSource` was an empty test body with a 
`// todo add some test case to test NaN` comment.
   
   `FlinkFilters` already converts `EQ`/`NOT_EQ` predicates against a NaN 
literal into `Expressions.isNaN`/`Expressions.notNaN`, and that conversion 
already has unit coverage in `TestFlinkFilters` 
(`testEqualsNaN`/`testNotEqualsNaN`). What was missing is end-to-end coverage 
that a real SQL query is planned and the filter is actually pushed down to the 
scan, which is what `TestFlinkTableSource` (a `TableSourceTestBase` subclass) 
is for.
   
   Adds two assertions following the existing `testFilterPushDownEqual` pattern 
in the same file:
   - `WHERE d = CAST('NaN' AS DOUBLE)` pushes down `is_nan(ref(name="d"))`
   - `WHERE d <> CAST('NaN' AS DOUBLE)` pushes down `not_nan(ref(name="d"))`
   
   Applied identically across all currently supported Flink versions (v1.20, 
v2.1, v2.2, v2.3), matching the existing per-version duplication pattern 
already used for this test file.
   
   ### Why are the changes needed?
   Closes a test-coverage gap the code itself flagged via the TODO comment.
   
   ### Does this PR introduce any user-facing change?
   No. Test-only change.
   
   ### How was this patch tested?
   New test added; follows the exact structure/assertions of the adjacent 
`testFilterPushDownEqual`/`testFilterPushDownGreaterThan` tests in the same 
file, which are known-passing. I wasn't able to run the full Gradle build 
locally (corporate network blocks plugin resolution), so I'd appreciate 
CI/reviewer double-checking the `CAST('NaN' AS DOUBLE)` literal parses as 
expected in the Flink SQL planner used here.


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