[fix](regression) Deflake segcompaction agg keys case#65382
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
There was a problem hiding this comment.
Review result: Request changes.
Critical checkpoints:
- Goal and test coverage: the PR intends to deflake
test_segcompaction_agg_keys, but the new assertion no longer proves the full aggregate-keyREPLACEwinner row; see the inline comment. - Scope: the change is focused to one regression test file. No production code, config, session propagation, persistence, or compatibility change is present.
- Parallel paths: sibling segcompaction outputs expose the complete duplicate source rows, so the test can preserve row-level coverage without pinning one deterministic winner.
- Concurrency, lifecycle, data writes, and observability: not applicable to this test-only assertion change.
- Validation: static review only in this runner.
.worktree_initialized,thirdparty/installed, andthirdparty/installed/bin/protocare absent, so I did not run the regression suite locally.
User focus: no additional user-provided review focus was supplied.
Subagent conclusions:
optimizer-rewrite: no new valuable findings; the optimizer/rewrite concern was dismissed as not applicable to this one-file test assertion change.tests-session-config:TSC-001was accepted asMAIN-001and submitted inline.- Convergence: round 1 ended with both live subagents replying
NO_NEW_VALUABLE_FINDINGSfor the same final ledger/comment set.
| assertEquals(50, result[0].size()) | ||
| assertEquals("47", result[0][0].toString()) | ||
|
|
||
| def validValues = [ |
There was a problem hiding this 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.
Proposed changes
Follow up the existing
test_segcompaction_agg_keysdeflake from #61026.The current master case already avoids the old golden file by allowing two concrete full-row results for
col_0=47. This patch keeps the same intent but removes the hard-coded full-row candidates. The case now checks stable invariants instead:col_0=47returns exactly one aggregate row.47.REPLACEvalue columns belong to the known fruit value domain in the ORC input.This avoids pinning the test to a specific duplicate-key
REPLACEwinner while still checking that the load and aggregation returned a valid row.Why
The ORC input contains multiple rows with
col_0=47. WithAGGREGATE KEY(col_0)andREPLACEvalue columns, the case should not require one specific source row to win unless the data/model makes that winner deterministic.Validation
Remote branch-4.1 regression environment:
Result: