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
However, in the query plan shown below, the expression (FALSE OR t0.c0) != t0.c0 is optimized as (NOT((t0.c0 = t0.c0))). This is incorrect and prevented the row from being fetched.
d0/main*> EXPLAIN ANALYZE SELECT t0.c0 AS ref0 FROM t0 WHERE (FALSE OR t0.c0) != t0.c0;
+--------------------------------+
| plan |
+--------------------------------+
| Project |
| ├─ columns: [t0.c0 as ref0] |
| └─ Filter |
| ├─ (NOT((t0.c0 = t0.c0))) |
| └─ Table |
| ├─ name: t0 |
| └─ columns: [c0] |
+--------------------------------+
7 rows in set (0.00 sec)
Notably, the equivalent query produces the expected result:
d0/main*> SELECT t0.c0 AS ref0 FROM t0 WHERE (0 OR t0.c0) != t0.c0;
+------+
| ref0 |
+------+
| 2 |
+------+
1 row in set (0.00 sec)
Consider the following test case:
Actual:
no rows fetched
Expected:
Description
The condition evaluates to true in the WHERE clause for the row in the table. This is verified as follows:
However, in the query plan shown below, the expression
(FALSE OR t0.c0) != t0.c0
is optimized as(NOT((t0.c0 = t0.c0)))
. This is incorrect and prevented the row from being fetched.Notably, the equivalent query produces the expected result:
Dolt Version
I reproduced this on v1.51.0.
The text was updated successfully, but these errors were encountered: