github-actions[bot] commented on code in PR #65382:
URL: https://github.com/apache/doris/pull/65382#discussion_r3543650322


##########
regression-test/suites/segcompaction_p2/test_segcompaction_agg_keys.groovy:
##########
@@ -89,14 +89,21 @@ suite("test_segcompaction_agg_keys") {
         // Cannot use qt_select_default here: S3 Load parallelizes across 
multiple BE workers,
         // each creating separate segments with non-deterministic sequence 
numbers.
         // REPLACE aggregation picks the value from the segment with the 
highest sequence,
-        // so the winner among the 12 source rows with col_0=47 is not 
guaranteed across runs.
-        def selectResult = sql """ SELECT * FROM ${tableName} WHERE col_0=47; 
"""
-        assertEquals(1, selectResult.size(), "Expected exactly 1 row for 
col_0=47 after REPLACE aggregation")
-        def row = selectResult[0].collect { it?.toString() }
-        def possibleResult1 = ["47", "Lychee", "Lychee", "Plum", "Banana", 
"Lychee", "Lychee", "Cherry", "Pineapple", "Banana", "Watermelon", "Mango", 
"Apple", "Apple", "Peach", "Raspberry", "Grapes", "Raspberry", "Raspberry", 
"Kiwi", "Orange", "Apple", "Plum", "Blueberry", "Strawberry", "Orange", 
"Raspberry", "Strawberry", "Lemon", "Orange", "Blueberry", "Apple", "Peach", 
"Banana", "Kiwi", "Orange", "Banana", "Strawberry", "Lemon", "Mango", "Orange", 
"Peach", "Avocado", "Pineapple", "Kiwi", "Lemon", "Grapes", "Strawberry", 
"Grapes", "Lychee"]
-        def possibleResult2 = ["47", "Banana", "Watermelon", "Lychee", 
"Blueberry", "Raspberry", "Strawberry", "Grapes", "Watermelon", "Lemon", 
"Lemon", "Pineapple", "Watermelon", "Peach", "Kiwi", "Lychee", "Peach", 
"Pineapple", "Raspberry", "Grapes", "Lychee", "Raspberry", "Peach", "Kiwi", 
"Pineapple", "Apple", "Lemon", "Lychee", "Pineapple", "Blueberry", "Blueberry", 
"Avocado", "Cherry", "Kiwi", "Cherry", "Watermelon", "Plum", "Banana", "Peach", 
"Pineapple", "Apple", "Strawberry", "Avocado", "Kiwi", "Blueberry", "Mango", 
"Watermelon", "Orange", "Strawberry", "Banana"]
-        assertTrue(row == possibleResult1 || row == possibleResult2,
-            "Result for col_0=47 does not match either expected outcome.\nGot: 
${row}")
+        // so validate stable invariants instead of pinning a specific 
duplicate-key winner.
+        def result = sql """ SELECT * FROM ${tableName} WHERE col_0=47; """
+        assertEquals(1, result.size(), "Expected exactly 1 row for col_0=47 
after REPLACE aggregation")
+        assertEquals(50, result[0].size())
+        assertEquals("47", result[0][0].toString())
+
+        def validValues = [

Review Comment:
   This is too weak for the regression: after this change any row whose 49 
value cells are fruit names passes, even if the row is assembled from different 
duplicate rows or the wrong source columns. The same data set already exposes 
the 12 complete `col_0=47` source rows in `test_segcompaction_dup_keys.out`, 
and the aggregate-key `REPLACE` result should be one complete winner row, not 
just 49 independently valid vocabulary entries. To keep the deflake while 
preserving coverage, please compare `result[0]` against the set of complete 
allowed source rows instead of checking each cell against `validValues`.



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