Skip to content

Logical InSubquery only take the expression nullability into account #23428

Description

@AdamGS

Describe the bug

Calling <Expr as ExprSchemable>::nullable on an InSubquery expression only uses the expr's nullability over the schema, and not the subquery's nullability. so it return false for queries with the general shape of x_non_null IN (SELECT a_nullable FROM t).

This will cause ExprSimplifier to wrongly simplify some expressions into a lit(true) incorrectly.

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions