-
Notifications
You must be signed in to change notification settings - Fork 690
Open
Description
Hi,
We have noticed that the result of the following example doesn't return the expected result (based on https://doi.org/10.14778/3151113.3151116)
alasql('CREATE TABLE R (a number)');
alasql('CREATE TABLE S (b number)');
alasql.tables.R.data = [ {a: 1}, {a: null} ];
alasql.tables.S.data = [ {b: null} ];
var res = alasql('select a from R where a not in (select b from S)');
// expected: res = []
// alasql: res = [ {"a": 1} ]
See https://jsfiddle.net/3ya794kr/.
This query compares each row of R with NULL which always returns unknown in SQL. Since not in unknown is unknown, the result should be the empty collection.
Copilot