Since #2632 we have the capability to use any expressions in logical expressions in filters in the columnar query engine. For example:
logs | where severity_text == <some expr>
If the types on the left or the right don't evaluate to the same type, we return throw an execution error at runtime
logs | where severity_text == severity_number
I think the correct behaviour would probably be for this to resolve as false. Then we could also maybe catch these using static analysis and fold this a static false (we can only do this if we know the type a-priori, won't work for all expressions).
Similarly, if we have expressions the evaluate to null on both sides. E.g. attributes["x"] == attributes["y"] where both these attributes are null, currently evaluates to false but I feel it should evaluate to true.
Since #2632 we have the capability to use any expressions in logical expressions in filters in the columnar query engine. For example:
If the types on the left or the right don't evaluate to the same type, we return throw an execution error at runtime
I think the correct behaviour would probably be for this to resolve as false. Then we could also maybe catch these using static analysis and fold this a static
false(we can only do this if we know the type a-priori, won't work for all expressions).Similarly, if we have expressions the evaluate to null on both sides. E.g.
attributes["x"] == attributes["y"]where both these attributes are null, currently evaluates tofalsebut I feel it should evaluate totrue.