darpan-e6 opened a new pull request, #4846: URL: https://github.com/apache/calcite/pull/4846
## Summary - When a filter condition on `VALUES` contains a UDF with no Janino `CallImplementor`, `RexExecutorImpl` cannot reduce it to a `RexLiteral` and returns the expression unchanged. - `ValuesReduceRule.apply()` then calls `isAlwaysTrue()` on the unreduced `RexCall`, which returns `false`, causing the rule to incorrectly drop the tuple. - The fix checks whether the reduced value is a `RexLiteral` before evaluating `isAlwaysTrue()`; if it is not reducible, the rule bails out and leaves the plan unchanged. ## Test plan - Added `ValuesReduceRuleTest` with a UDF (`CUSTOM_FUNC`) that cannot be reduced by Janino. - The test verifies the plan is unchanged after applying `PROJECT_FILTER_VALUES_MERGE` — tuples are preserved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
