This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.2 by this push:
new 756a67000b7 [test](regression) Make map_agg NULL-key assertions
order-independent (#69446)
756a67000b7 is described below
commit 756a67000b797a9847f390b60e629825fd054e9a
Author: Jerry Hu <[email protected]>
AuthorDate: Fri Oct 23 14:15:28 2026 +0800
[test](regression) Make map_agg NULL-key assertions order-independent
(#69446)
### What problem does this PR solve?
Issue Number: None
The `agg_sync_mv` regression expected a map without a valid NULL key and
compared the string representation of `map_agg` results, which can vary
with map entry order.
### What changed?
- Keep the existing input and aggregation, but assert the map size,
NULL-key presence, and values for NULL and ordinary keys through scalar
expressions.
- Update only the final expected-output block for the affected
regression case. No product behavior changes.
### Testing
- ASAN BE/FE build with BE Java extensions and Maven Checkstyle
validation: passed.
- Minimal NULL-key scalar query: passed; confirmed two keys and both
expected values.
- `agg_sync_mv` P1 regression output regeneration (`-forceGenOut`) and
runs without regeneration: passed. The final narrowed expected-output
change passed the full suite (1 suite, 0 failures).
- `git diff --check origin/branch-4.2...HEAD` for the two changed files:
passed.
### Release note
None
---
.../nereids_syntax_p1/mv/aggregate/agg_sync_mv.out | 26 +++++++++++-----------
.../mv/aggregate/agg_sync_mv.groovy | 11 ++++++++-
2 files changed, 23 insertions(+), 14 deletions(-)
diff --git
a/regression-test/data/nereids_syntax_p1/mv/aggregate/agg_sync_mv.out
b/regression-test/data/nereids_syntax_p1/mv/aggregate/agg_sync_mv.out
index 020baae99f1..692cf74254f 100644
--- a/regression-test/data/nereids_syntax_p1/mv/aggregate/agg_sync_mv.out
+++ b/regression-test/data/nereids_syntax_p1/mv/aggregate/agg_sync_mv.out
@@ -1500,17 +1500,17 @@
11 [0, 0]
-- !test --
-\N {null:"null"}
-1 {0:"string1"}
-2 {1:"string2"}
-3 {2:"string3"}
-4 {3:"string1"}
-5 {4:"string2"}
-6 {5:"string3"}
-7 {6:"string1"}
-8 {7:"string2"}
-9 {8:"string3"}
-10 {9:"string1"}
-11 {10:"string2"}
-12 {11:"string3"}
+\N 1 true null null
+1 2 true string1 string1
+2 1 false \N string2
+3 1 false \N string3
+4 1 false \N string1
+5 1 false \N string2
+6 1 false \N string3
+7 1 false \N string1
+8 1 false \N string2
+9 1 false \N string3
+10 1 false \N string1
+11 1 false \N string2
+12 1 false \N string3
diff --git
a/regression-test/suites/nereids_syntax_p1/mv/aggregate/agg_sync_mv.groovy
b/regression-test/suites/nereids_syntax_p1/mv/aggregate/agg_sync_mv.groovy
index ae4143cdc7e..12c5842dd19 100644
--- a/regression-test/suites/nereids_syntax_p1/mv/aggregate/agg_sync_mv.groovy
+++ b/regression-test/suites/nereids_syntax_p1/mv/aggregate/agg_sync_mv.groovy
@@ -512,5 +512,14 @@ suite("agg_sync_mv") {
sql "insert into agg_mv_test select * from agg_mv_test;"
sql "set parallel_pipeline_task_num=1"
- qt_test "select kbint, map_agg(id, kstr) from agg_mv_test group by kbint
order by kbint;"
+ qt_test """
+ select kbint, map_size(m), map_contains_key(m, cast(null as int)),
+ m[cast(null as int)], m[cast(kbint - 1 as int)]
+ from (
+ select kbint, map_agg(id, kstr) as m
+ from agg_mv_test
+ group by kbint
+ ) t
+ order by kbint;
+ """
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]