Fix incorrect NULL IN () optimization#17092
Conversation
alamb
left a comment
There was a problem hiding this comment.
Thank you @findepi
It is unfortunate that we need to complicate the actual code to add a testing hook.
Is it posisble to just unit test the code in question -- for example, perhaps we could write a unit test that usedSimplifier directly rather than ExprSimplifier 🤔
One can argue that one is an impl detail of the other... are there any tests for
we can go without a regression test for this fix. |
The optimization does not manifest as a bug in typical queries, because the `ConstantEvaluator` prevents that. However, it still needs to be corrected (or removed), otherwise it's a bug waiting to manifest somewhere.
done |
7727b4c to
0a7b3a9
Compare
| assert_eq!(simplify(expr), lit(true)); | ||
| } | ||
|
|
||
| #[test] |
The optimization does not manifest as a bug in typical queries, because
the
ConstantEvaluatorprevents that. However, it still needs to becorrected (or removed), otherwise it's a bug waiting to manifest
somewhere.