Skip to content

Columnar Query engine comparing fields with different types/nulls does not have correct behaviour #2659

@albertlockett

Description

@albertlockett

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions