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 ce0784d7e32 [fix](test) Cast variant subcolumn as json in 
variant_hirachinal for stable output (#63828)
ce0784d7e32 is described below

commit ce0784d7e32a28dabc114f323e7009b67024eab4
Author: Chenyang Sun <[email protected]>
AuthorDate: Thu May 28 22:03:59 2026 +0800

    [fix](test) Cast variant subcolumn as json in variant_hirachinal for stable 
output (#63828)
    
    cast(v['c'] as string) on a heterogeneous variant column can produce
    different whitespace formatting (e.g. "[1, 2, 3]" vs "[1,2,3]")
    depending on session variables fuzzed by use_fuzzy_session_variable
    (batch_size, enable_fold_constant_by_be, etc.), causing intermittent
    regression failures. Casting to json normalizes the serialization path
    and is stable across fuzzed execution configs (verified 50/50 runs).
---
 regression-test/suites/variant_p0/variant_hirachinal.groovy | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/regression-test/suites/variant_p0/variant_hirachinal.groovy 
b/regression-test/suites/variant_p0/variant_hirachinal.groovy
index 1f18d9ca387..d515faf8516 100644
--- a/regression-test/suites/variant_p0/variant_hirachinal.groovy
+++ b/regression-test/suites/variant_p0/variant_hirachinal.groovy
@@ -47,8 +47,8 @@ suite("regression_test_variant_hirachinal", "variant_type"){
     qt_sql "select cast(v['c'] as string) 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"
+    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"
 
 
     table_name = "var_rs2" 


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

Reply via email to