jtrada168 opened a new pull request, #5285: URL: https://github.com/apache/calcite/pull/5285
## Summary Adds a regression test for [CALCITE-7811](https://issues.apache.org/jira/browse/CALCITE-7811), demonstrating that `RexImplicationChecker.implies()` incorrectly reports `NOT(x = 'a')` as implying `(x = 'a' OR x = 'b')`, even though `x = 'c'` is a counterexample to that implication. The equivalent `x <> 'a'` form is correctly rejected by the checker (it conservatively says "cannot prove implication"), so this is specific to the `NOT(EQUALS(...))` representation — `InputUsageFinder` silently drops the `NOT` while walking the expression and records the negated equality as if it were a plain `EQUALS`, letting the substitution-based check "prove" implication against the wrong fact. This PR intentionally contains **only the failing test**, to make the bug easy to verify in isolation. A follow-up PR will add the fix (and broader coverage across all comparison operators). ## Test plan - [x] `./gradlew :core:test --tests "org.apache.calcite.test.RexImplicationCheckerTest"` — `testNotOfEqualsDoesNotImplyEqualsOr` fails on `main` as expected: ``` NOT(=($11, 'a')) does implies OR(=($11, 'a'), =($11, 'b')) when it should not ==> expected: <false> but was: <true> ``` - [x] All other existing tests in `RexImplicationCheckerTest` continue to pass. 🤖 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]
