Using SQL syntax (which is less confusing, since we are talking about shortcut 
evaluation)

  UNKNOWN AND (x IS NULL)

is equivalent to

 (x IS NULL) AND UNKNOWN

Just write out the truth table. If you get different results, are you perhaps 
incorrectly using some kind of shortcut evaluation?

Julian

> On Feb 3, 2022, at 08:29, Abhishek Agarwal <[email protected]> 
> wrote:
> 
> Hello,
> While debugging a druid query that involves an operation such as "A <> A",
> I found out that in RexSimplify, such an expression is converted to "null
> && isnull(A)". That seems wrong since it will always evaluate to null even
> if A is not null in some row. The right conversion should be "isnull(A) &&
> null" that will return "false" is A is not null and "null" (aka unknown) is
> A is null.
> 
> is there a way to change this behavior without code change?

Reply via email to