Skip to content

SQL: AND and OR don't behave correctly with NULLS in SELECT clause #35240

@matriv

Description

@matriv
SELECT languages = 2 OR null, languages = 2 AND null FROM test_emp
WHERE emp_no BETWEEN 10018 AND 10020 ORDER BY emp_no;

Returns:

null | null                                        
null | null                                        
null | null

instead of:

true | null
null | false
null | null

The issue is spotted in the BinaryLogicProcessor which doesn't override process() so the process() of BinaryProcessor is called which exits if either left or right evaluates to null.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions