codenohup opened a new issue, #19374:
URL: https://github.com/apache/doris/issues/19374

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   Apache Doris 1.2.2 RELEASE
   
   ### What's Wrong?
   
   I'm trying to add Apache Doris support to SQLancer, this may be a logic bug 
found by @[SQLancer](https://github.com/sqlancer/sqlancer).
   
   These two similar SQL statements obtained different results, which is 
confusing.
   1. `select t11.c0 from t11 group by t11.c0 having not ('1' in (t11.c0));`
   2. `select t11.c0 from t11 group by t11.c0 having ('1' not in (t11.c0));`
   
   ### What You Expected?
   
   I think these two similar SQL statements should have the same result, and I 
guess this error is due to incorrect execution of the `"having $value in column 
sentense` statement
   
   ### How to Reproduce?
   
   You can reproduce this error from the following steps.
   
   1. data prepare
   ```
   CREATE TABLE t11(c0 CHAR(109) NOT NULL) DISTRIBUTED BY HASH (c0) BUCKETS 13 
PROPERTIES ("replication_num" = "1");
   insert into t11 values ('1'), ('1'), ('2'), ('2'), ('3'), ('4');
   ```
   
   
![image](https://user-images.githubusercontent.com/130116763/236738802-82834c6a-7ba5-4abb-85ec-1d10ffa576b3.png)
   
   
   2. `select t11.c0 from t11 group by t11.c0 having ('1' not in (t11.c0));`
   
![image](https://user-images.githubusercontent.com/130116763/236738648-6a7a34c8-5c2b-4e14-81ee-00f03ed9ac65.png)
   
   3. `select t11.c0 from t11 group by t11.c0 having not ('1' in (t11.c0));`
   
![image](https://user-images.githubusercontent.com/130116763/236738686-11504d63-4975-4cfd-b671-d113a9d6f0fa.png)
   
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to