Skip to content

ArrayHas does not handle nulls in the haystack correctly. #19288

@EmilyMatt

Description

@EmilyMatt

Describe the bug

For Array(0, null, 3) checking for needle 2
The eq array will be (false, null, false)
Currently that means we return FALSE

But the result priority should be:
Has true -> true
Has null -> null
Neither -> false

This is relevant for both the scalar and array cases

To Reproduce

As provided above

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions