morningman commented on code in PR #14528:
URL: https://github.com/apache/doris/pull/14528#discussion_r1030998493


##########
regression-test/suites/query_p0/sql_functions/string_functions/test_string_function_regexp.groovy:
##########
@@ -75,5 +75,25 @@ suite("test_string_function_regexp") {
     qt_sql"select * from ${tableName} where lower(k7) not 
regexp'^[a-z]+[0-9]+[a-z]+\$' order by k1, k2, k3, k4"
     qt_sql"select * from ${tableName} where lower(k7) not 
regexp'^[a-o]+[0-9]+[a-z]?\$' order by k1, k2, k3, k4"
     qt_sql"select count(*) from ${tableName} where k1<10 and lower(k6) not 
regexp '^t'"
+
+    def tbName2 = "test_string_function_field"
+    sql "DROP TABLE IF EXISTS ${tbName2}"
+    sql """
+            CREATE TABLE IF NOT EXISTS ${tbName2} (
+                id int,
+                name varchar(32)
+            )
+            DISTRIBUTED BY HASH(name) BUCKETS 5 properties("replication_num" = 
"1");
+        """
+    sql """
+        INSERT INTO ${tbName2} VALUES 
+            (2,"Suzi"),
+            (9,"Ben"),
+            (7,"Suzi"),
+            (8,"Henry"),
+            (1,"Ben"),
+            (4,"Henry")
+        """
+    qt_sql_field "select name from ${tbName2} order by 
field(name,'Suzi','Ben','Henry');"

Review Comment:
   How about add some case which the `value` does not exist in `expr`?



-- 
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: commits-unsubscr...@doris.apache.org

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