You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SET vectorize=on;
CREATETABLEt0(c0 INT);
CREATETABLEt1(c0 INT);
INSERT INTO t0(c0) VALUES(0);
INSERT INTO t1(c0) VALUES(NULL);
CREATEINDEXON t1(c0) INTERLEAVE IN PARENT t0(c0);
SELECT*FROM t0 WHEREt0.rowid>0; -- expected: {}, actual: {0}
According to a SELECT rowid FROM t0, the value of rowid is NULL, which means that the predicate NOT(t0.rowid < 1) should evaluate to NULL and not fetch a row. However, it unexpectedly fetches a row. As expected, the following query (also) fetches a row:
SELECT*FROM t0 WHERE (t0.rowid>0) IS NULL; -- {0}
Now surprisingly, without the SET vectorize=on flag, SELECT rowid FROM t0 fetches an integer (e.g., 543758368624279553). Based on this output, the first SELECT seems to be correct, but the second with the IS NULL predicate should not fetch a row. In each case, one of the query results seems to be incorrect.
Consider the following test case:
According to a
SELECT rowid FROM t0
, the value ofrowid
isNULL
, which means that the predicateNOT(t0.rowid < 1)
should evaluate toNULL
and not fetch a row. However, it unexpectedly fetches a row. As expected, the following query (also) fetches a row:Now surprisingly, without the
SET vectorize=on
flag,SELECT rowid FROM t0
fetches an integer (e.g.,543758368624279553
). Based on this output, the firstSELECT
seems to be correct, but the second with theIS NULL
predicate should not fetch a row. In each case, one of the query results seems to be incorrect.I found this bug based on commit 5d33d44.
The text was updated successfully, but these errors were encountered: