Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relationships test always passes when there are nulls in the foreign key #887

Closed
cmcarthur opened this issue Jul 31, 2018 · 0 comments
Closed
Assignees

Comments

@cmcarthur
Copy link
Member

Issue

Issue description

When running this SQL on Redshift:

with a as (
  select null as id
    union all
  select 2 as id
)
select 1 as id
where id is not null
and id not in (
  select id
  from a
);

you would expect this to return 1 row. But it actually returns 0 rows. We need to either say that this is the correct behavior, or we need to fix it. The fix is just to add a WHERE ... IS NOT NULL in the subquery.

@beckjake beckjake self-assigned this Aug 13, 2018
beckjake added a commit that referenced this issue Aug 15, 2018
…ith-nulls

Relationships tests with nulls (#887)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants