yiguolei commented on code in PR #40814:
URL: https://github.com/apache/doris/pull/40814#discussion_r1764466501


##########
regression-test/suites/correctness/test_scan_keys_with_bool_type.groovy:
##########
@@ -0,0 +1,47 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite("test_scan_keys_with_bool_type") {
+    sql """ DROP TABLE IF EXISTS test_scan_keys_with_bool_type """
+
+    sql """ 
+        CREATE TABLE `test_scan_keys_with_bool_type` (
+            `col1` tinyint NOT NULL,
+            `col2` boolean NOT NULL,
+            `col3` tinyint NOT NULL,
+            `col5` boolean REPLACE NOT NULL,
+            `col4` datetime(2) REPLACE NOT NULL,
+            `col6` double REPLACE_IF_NOT_NULL NULL,
+            `col7` datetime(3) REPLACE_IF_NOT_NULL NULL
+        ) ENGINE=OLAP
+        AGGREGATE KEY(`col1`, `col2`, `col3`)
+        DISTRIBUTED BY HASH(`col1`, `col2`, `col3`) BUCKETS 4
+        PROPERTIES (
+            "replication_allocation" = "tag.location.default: 1"
+        ); 
+    """
+
+    sql """ insert into test_scan_keys_with_bool_type values
+        ( -100 ,    0 ,  -82 ,    0 , '2023-11-11 10:49:43.00' ,   
840968969.872149 , NULL ),
+        ( -100 ,    1 ,  -82 ,    1 , '2024-02-16 04:37:37.00' , 
-1299962421.904282 , NULL ),
+        ( -100 ,    1 ,   92 ,    1 , '2024-02-16 04:37:37.00' ,   
23423423.0324234 , NULL );
+    """
+
+    qt_select1 " select * from test_scan_keys_with_bool_type order by 1, 2, 3, 
4, 5, 6, 7; "
+    qt_select2 " select * from test_scan_keys_with_bool_type where col1 <= 
-100 and col2 in (true, false) and col3 = -82 order by 1, 2, 3, 4, 5, 6, 7; "

Review Comment:
   1. col2 int,  col2 in (1,2) 
   2. col2 char, col2 in ('a','b')



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