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

   ### 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 bug found 
by @[SQLancer](https://github.com/sqlancer/sqlancer).
   
   1. CREATE DATABASE and INSERT VALUES
   `CREATE TABLE t0(c0 BOOLEAN NOT NULL) DUPLICATE KEY(c0) DISTRIBUTED BY HASH 
(c0) PROPERTIES ("replication_num" = "1");`
   <img width="379" alt="image" 
src="https://user-images.githubusercontent.com/91189188/224529372-f4019ed6-7397-4dd0-b6e9-be7cfa1c85fd.png";>
   
   2. `select (t0.c0 BETWEEN 0.44 AND 1) from t0;` 
   Execute this SQL, then Doris throws Unexpected exception
   <img width="954" alt="image" 
src="https://user-images.githubusercontent.com/91189188/224529440-c54e3285-17f6-4500-9cce-18918a31d1fe.png";>
   
   
   ### What You Expected?
   
   Maybe it should be like the following, where boolean is used as 1 or 0 in 
`between and`.
   
   <img width="333" alt="image" 
src="https://user-images.githubusercontent.com/91189188/224529494-3c3a5069-3aee-48d7-942f-05cd4a6fdc28.png";>
   
   If the boolean columns not support`between and` , an SQL syntax error should 
be given instead of an exception
   
   ### How to Reproduce?
   
   _No response_
   
   ### 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