w3lld1 opened a new pull request, #19836: URL: https://github.com/apache/hudi/pull/19836
### Describe the issue this Pull Request addresses Procedure filters evaluate Catalyst expressions directly, but numeric comparisons only coerced a Long column against an Int literal and did so by narrowing the column. This produced incorrect results for large Long values, reversed operands, and other mixed numeric types. Fixes #19632. ### Summary and Changelog - I use Spark's numeric type-coercion rules to find a wider common type for both comparison operands. - I cast only the operands that need widening, so the behavior is symmetric when the literal is on the left. - I updated the existing regression tests for large Long values, reversed operands, integral widths, floating-point values, and decimals. ### Impact Numeric procedure filters now preserve wide values and evaluate mixed numeric comparisons consistently. I did not change any public API. ### Risk Level Low. The change is limited to numeric comparison operands and delegates the common-type choice to Spark's existing `TypeCoercion` implementation. ### Documentation Update None. ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable ### Validation - `mvn test -Punit-tests -Dspark3.5 -Dscala-2.12 -Dtest=skipJavaTests -DwildcardSuites=org.apache.spark.sql.hudi.procedure.TestHoodieProcedureFilterUtils -Dsurefire.failIfNoSpecifiedTests=false -Dgpg.skip -Djacoco.skip -Pwarn-log -pl hudi-spark-datasource/hudi-spark -am` (18 tests passed) - `git diff --check` I did not run the full repository test matrix locally; I am leaving that broader coverage to CI. -- 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]
