NULL Predicate Behavior not conforming to SQL Spec #1475
Open
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:
- XXX
- 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.