Amineharrabi opened a new pull request, #19108: URL: https://github.com/apache/iceberg/pull/19108
Flink compares a column with a wider numeric literal in the wider type, but `FlinkFilters` pushed the literal down unchanged and binding converted it to the column type. This narrowed values (`f > 0.1E0` on a FLOAT column dropped matching rows, as did a DOUBLE literal on a DECIMAL column) or threw `ValidationException` (`i > 6.5`, `i > 6.0`, `d > 0.1` on a DOUBLE column). This converts the literal by value and pushes the comparison down only when the column type represents it exactly, otherwise leaving the filter to Flink. Compared with #19103, which skips pushdown whenever the types differ, this keeps pushdown for literals such as `d > 0`, `f > 0.5E0`, `i > 6.0` and `d > 0.1`. Fixes #19102 Test plan: `TestFlinkFilters` checks that exact literals are pushed with the converted value and inexact ones are not, for each numeric column type and with the literal on either side. `TestFlinkTableSource` checks query results and the pushed filter for an INT, a DOUBLE and a FLOAT column. --- **AI Disclosure** - Model: Claude Opus 5.5 - Platform/Tool: Claude Code - Human Oversight: [unknown - human to fill in] - Prompt Summary: Reproduce #19102 end to end, propose a fix that keeps pushdown where it is exact, and add tests. The fix, its tests and this description are generated; the decision to push down by value rather than by type, and to open this PR alongside #19103, are the author's. -- 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]
