Copilot commented on code in PR #63610:
URL: https://github.com/apache/doris/pull/63610#discussion_r3300740884


##########
regression-test/suites/variant_p0/predefine/variant_hirachinal.groovy:
##########
@@ -33,9 +33,9 @@ suite("regression_test_variant_predefine_hirachinal", 
"variant_type"){
     sql """insert into  ${table_name} select * from (select -2, '{"a": 11245, 
"b" : [123, {"xx" : 1}], "c" : {"c" : 456, "d" : "null", "e" : 7.111}}'  as 
json_str
             union  all select -1, '{"a": 1123}' as json_str union all select 
*, '{"a" : 1234, "xxxx" : "kaana"}' as json_str from numbers("number" = 
"4096"))t order by 1 limit 4098 ;"""
     qt_sql "select * from ${table_name} order by k limit 10"
-    qt_sql "select cast(v['c'] as string) from ${table_name} where k = -3 or k 
= -2 order by k"
+    qt_sql "select cast(v['c'] as json) from ${table_name} where k = -3 or k = 
-2 order by k"
     qt_sql "select v['b'] from ${table_name} where k = -3 or k = -2"
     sql """insert into ${table_name} values (-3, '{"c" : 12345}')"""
-    order_qt_sql1 "select cast(v['c'] as string) from var_rs where k = -3 or k 
= -2 or k = -4 or (k = 1 and v['c'] = 1024) order by k"
-    order_qt_sql2 "select cast(v['c'] as string) from var_rs where k = -3 or k 
= -2 or k = 1 order by k, cast(v['c'] as text) limit 3"
-}
\ No newline at end of file
+    order_qt_sql1 "select cast(v['c'] as json) from var_rs where k = -3 or k = 
-2 or k = -4 or (k = 1 and v['c'] = 1024) order by k"
+    order_qt_sql2 "select cast(v['c'] as json) from var_rs where k = -3 or k = 
-2 or k = 1 order by k, cast(v['c'] as text) limit 3"

Review Comment:
   These queries hard-code the table name `var_rs` instead of using the 
existing `table_name` variable. This makes the test brittle if the table name 
is ever changed/refactored and is inconsistent with earlier statements in this 
suite that use `${table_name}`.
   



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