Skip to content

EXISTS operator returns NULL when multiple predicates are present #9456

@majetideepak

Description

@majetideepak

What happens?

EXISTS operator returns NULL. The documentation says it should only return true or false.

To Reproduce

create table u(u0 int, u1 int);
create table t(t0 int, t1 int);
insert into u values(1, 10);
insert into t values(1, 11);
insert into u values(null, 20);
insert into t values(null, 21);
SELECT t0, t1, EXISTS (SELECT * FROM u WHERE u0 = t0 AND u1 < t1) FROM t;

OS:

arm64

DuckDB Version:

0.9.1

DuckDB Client:

CLI

Full Name:

Deepak Majeti

Affiliation:

IBM

Have you tried this on the latest main branch?

I have tested with a main build

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions