This is an automated email from the ASF dual-hosted git repository.

eldenmoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new eb46d1ebf14 [fix](regression) Stabilize variant hirachinal array 
output (#63610)
eb46d1ebf14 is described below

commit eb46d1ebf145dbd515ac0a5b831db213cca28ff7
Author: lihangyu <[email protected]>
AuthorDate: Tue May 26 10:03:07 2026 +0800

    [fix](regression) Stabilize variant hirachinal array output (#63610)
    
    Stabilize the variant predefine hirachinal regression
    output by serializing `v['c']` through JSON instead of relying on
    variant string formatting, which can differ in insignificant array
    whitespace.
---
 regression-test/data/variant_p0/predefine/variant_hirachinal.out  | 2 +-
 .../suites/variant_p0/predefine/variant_hirachinal.groovy         | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/regression-test/data/variant_p0/predefine/variant_hirachinal.out 
b/regression-test/data/variant_p0/predefine/variant_hirachinal.out
index e5ab29c3d46..7e87108b84a 100644
--- a/regression-test/data/variant_p0/predefine/variant_hirachinal.out
+++ b/regression-test/data/variant_p0/predefine/variant_hirachinal.out
@@ -12,7 +12,7 @@
 6      {"a":1234,"xxxx":"kaana"}
 
 -- !sql --
-[1, 2, 3]
+[1,2,3]
 {"c":456,"d":"null","e":7.111}
 
 -- !sql --
diff --git 
a/regression-test/suites/variant_p0/predefine/variant_hirachinal.groovy 
b/regression-test/suites/variant_p0/predefine/variant_hirachinal.groovy
index 7a4d68942d0..20c8f6fa68c 100644
--- a/regression-test/suites/variant_p0/predefine/variant_hirachinal.groovy
+++ b/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"
+}


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

Reply via email to