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
Consider the test case below. It is unexpected that the third query returns empty result, since the second query returns TRUE, which means that the WHERE clause in the third query should be evaluated to TRUE and thus return the row in the table.
Steps to Reproduce
DROPTABLE IF EXISTS t0;
CREATETABLEt0(c0 VARCHAR, c1 INT, PRIMARY KEY(c0));
INSERT INTO t0 (c0, c1) VALUES ('a', 1);
REFRESH TABLE t0;
SELECT*FROM t0; -- a, 1SELECT NOT ((t0.c0 NOT IN (''))AND(t0.c1!=t0.c1)) FROM t0; -- TRUESELECT*FROM t0 WHERE (NOT ((t0.c0 NOT IN (''))AND(t0.c1!=t0.c1)));
-- Expected: a, 1-- Actual: empty result
It seems like pretty similar to #15395? I guess the previous issue has fixed as the test case is working as expected now (on 93ee46e).
In case to better fix the issue, here's another test case which I think is due to the same root cause (get and collect?), but kindly lemme know if it's caused by another reason.
DROPTABLE IF EXISTS t0;
CREATETABLEt0(c0 VARCHAR, PRIMARY KEY(c0));
INSERT INTO t0 (c0) VALUES ('a');
REFRESH TABLE t0;
SELECTt0.c0FROM t0; -- aSELECT NOT ((t0.c0!='b')AND(t0.c0='c')) FROM t0; -- TRUESELECTt0.c0FROM t0 WHERE NOT ((t0.c0!='b')AND(t0.c0='c'));
-- expected: a-- actual: empty table
Yes they are supposed to due to the same cause. Initially I attempted to solve it elsewhere (but was reverted). This time the two reports should be handled by the same fix.
Activity
jeeminso commentedon Jan 31, 2024
Thanks for reporting @suyZhong .
Yes they are supposed to due to the same cause. Initially I attempted to solve it elsewhere (but was reverted). This time the two reports should be handled by the same fix.