sduzh opened a new issue #3688:
URL: https://github.com/apache/incubator-doris/issues/3688


   **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    |
   +------+
   |    0 |
   |    1 |
   |    2 |
   |    3 |
   +------+
   6 rows in set (0.00 sec)
   ```
   
   **Screenshots**
   ```
   +------+
   | k    |
   +------+
   |    1 |
   +------+
   2 rows in set (0.00 sec)
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to