github-actions[bot] commented on PR #61333:
URL: https://github.com/apache/doris/pull/61333#issuecomment-4060523781
## Code Review Summary
**PR: [chore](test) Make results of array_union sorted by array_sort in test
cases**
This PR wraps `array_union()` calls with `array_sort()` in regression test
cases to make test results deterministic, since `array_union` does not
guarantee element order. The change is purely test-stabilization — no product
code is modified.
### Critical Checkpoint Conclusions
- **Goal and correctness**: The goal is to eliminate flaky test results
caused by non-deterministic `array_union` output ordering. The approach of
wrapping with `array_sort()` is correct and minimal. All `array_union` calls
producing checked results are now wrapped; exception-test paths are correctly
left unwrapped.
- **Modification scope**: The change is minimal, clear, and focused — only
`array_sort()` wrappers are added around existing `array_union()` calls. No
test logic, table definitions, or test coverage is altered.
- **Concurrency**: N/A — test-only changes with no concurrency implications.
- **Lifecycle management**: N/A — no lifecycle changes.
- **Configuration items**: N/A — no configuration changes.
- **Incompatible changes**: N/A — no format or symbol changes.
- **Parallel code paths**: The three repeated blocks in
`test_array_functions_by_literal.groovy` (for different
`enable_fold_constant_by_be` settings) are all consistently updated.
- **Special conditional checks**: N/A.
- **Test coverage**: The existing test coverage is preserved. The `.out`
files reflect the sorted output. The `q04.out` file changes are consistent with
a regenerated output after adding `array_sort()` and an extra CREATE TABLE
statement in `q04.sql` (tag numbering shift from 5 to 6 statements is correct).
- **Observability**: N/A — test-only changes.
- **Transaction/persistence**: N/A.
- **Data writes**: N/A.
- **FE-BE variable passing**: N/A.
- **Performance**: N/A — test-only changes.
- **Other issues**: None identified. The use of `qt_sql` (rather than
`order_qt`) is acceptable because: (1) table queries operate on single-row
tables, and (2) literal-only queries have no row-ordering ambiguity.
### Regression Test Standards Compliance
- `array_sort()` used for deterministic output: **Yes**
- Expected errors use `test { sql ...; exception ... }`: **Yes** (lines
401-414 in test_array_function.groovy)
- Tables dropped before use, not after: **Consistent with existing pattern**
- `.out` files appear auto-generated (consistent formatting): **Yes**
**Verdict: No issues found. This is a clean test-stabilization change.**
--
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]