Skip to content

NULL Predicate Behavior not conforming to SQL Spec #1475

Open
@yliuuuu

Description

Description

  • In SQL Spec: The null predicate behavior is stated to be:
Expression R IS NULL R IS NOT NULL NOT R IS NULL NOT R IS NOT NULL
degree 1: null TRUE FALSE FALSE TRUE
degree 1: not null FALSE TRUE TRUE FALSE
degree > 1: all null TRUE FALSE FALSE TRUE
degree > 1: Some null FALSE FALSE TRUE TRUE
degree > 1: none null FALSE TRUE TRUE FALSE

In PartiQL:
The NULL Predicate behavior is not conforming to this definition:

PartiQL> SELECT * FROM <<{'a': null}, {'a': null}>> IS NULL;
==='
<<
  {
    '_1': false
  }
>>
---

PartiQL> SELECT * FROM <<{'a': null}, {'a': 1}>> IS NULL;
==='
<<
  {
    '_1': false
  }
>>
---
OK!

The NULL Assertion behavior in PartiQL as of today only assert on if the collection itself is null, without examining the data in the collection.

To Reproduce

Steps to reproduce the behavior:

  1. XXX
  2. XXX

Expected Behavior

  • The NULL Predicate behavior should conform to SQL specification.

Additional Context

  • Java version: XXX
  • PartiQL version: XXX
  • Add any other context about the problem here.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions