Akanksha-kedia commented on PR #17903:
URL: https://github.com/apache/iceberg/pull/17903#issuecomment-5536386864
@uros-b Addressed both comments:
- Added a `d = Double.NaN` row local to `testSqlParseNaN` (all 4 version
dirs) so `is_nan`/`not_nan` actually demonstrate selective filtering instead of
trivially passing.
- Switched the not-NaN assertion to `assertSameElements`, matching the
file's existing pattern (e.g. `testFilterPushDownNoEqual`).
While fixing that I also found the actual cause of the
`flink-scala-2-12-tests (17)` CI failure: `FlinkFilters.convertFieldAndLiteral`
only accepted a literal operand that was already a `ValueLiteralExpression`.
`CAST('NaN' AS DOUBLE)` resolves to a CAST `CallExpression` wrapping the string
literal rather than folding into a `Double` literal, so the whole predicate
fell through to no pushdown (`Expressions.alwaysTrue()`) instead of reaching
the existing `is_nan`/`not_nan` handling. Added CAST/TRY_CAST literal
unwrapping, scoped to `DOUBLE`/`FLOAT` targets (the standard SQL idiom for
NaN/Infinity literals), so this now correctly pushes down
`is_nan(ref(name="d"))` / `not_nan(ref(name="d"))`.
Pushed both fixes plus a spotless formatting fix. Let me know if anything
else needs adjusting.
--
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]