Open
Description
Describe the bug
If there are cast
statements in where clause, a wrong result may be returned.
To Reproduce
create table t1(k bigint not null) DISTRIBUTED BY HASH(k) BUCKETS 1;
insert into t1 values(0), (1), (2), (3);
select * from t4 where cast(cast(k as boolean) as bigint) = 1;
Expected behavior
+------+
| k |
+------+
| 1 |
| 2 |
| 3 |
+------+
6 rows in set (0.00 sec)
Real behavior
+------+
| k |
+------+
| 1 |
+------+
2 rows in set (0.00 sec)
Activity