Skip to content

test(window): update sampled ANALYZE result - #28172

Merged
mergify[bot] merged 1 commit into
matrixorigin:mainfrom
gouhongshen:agent/issue-28171-77ae6149
Sep 4, 2026
Merged

mergify[bot] merged 1 commit into
matrixorigin:mainfrom
gouhongshen:agent/issue-28171-77ae6149

Conversation

@gouhongshen

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

Related to #28171

What this PR does / why we need it:

Root cause

The sampled-statistics change e89cd75352 changed the successful ANALYZE TABLE result from the legacy two-column NDV row to an 11-column structured status row. The window hash-partition case retained the old approx_count_distinct(k) / approx_count_distinct(ck) expectation, so mo-tester failed at ANALYZE TABLE t(k, ck) before reaching the window assertions. The SQL fixture and window behavior are otherwise unchanged.

Changes

  • Update test/distributed/cases/window/window_hash_partition.result to expect the supported sampled-ANALYZE status row:
    window_hash_partition.t | AUTO | SNAPSHOT_VISIBLE_V1 | 2 | 10000 | 1 | 10000 | 3 | 760000 | OK | q=1/1.
  • Keep the existing 10,000-row fixture, INT and CHAR partition controls, explain assertions, window-function coverage, and teardown unchanged.

Issue-to-test proof

  • Before the change, the exact case on a freshly built d300619bb4 service reproduced the issue: 14/15 SQL statements passed and ANALYZE TABLE t(k, ck) failed because the expected result had 2 columns while the actual result had 11.
  • After the change, the exact case passed in normal comparison mode with 15/15 statements and 100% success.
  • A second run against the same instance also passed 15/15 and 100%, covering the case cleanup/reuse path.

Tests run

  • make build — passed on darwin/arm64; only the existing duplicate-library linker warning was emitted.
  • ./run.sh -n -g -o -p <matrixone>/test/distributed/cases/ -i window_hash_partition -r 100 — passed twice; each run selected window/window_hash_partition.sql and reported 15 total, 15 success, 0 failed, 0 ignored.

Residual risks

This is a test-oracle-only change. It does not alter production code, query planning, window execution, sampling, topology, or resource behavior. The expected summary values are deterministic for the existing fixture and match the service output at the sampled-statistics contract revision.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head d0bcd7c.

No blocking issues found. This is a narrowly scoped test oracle update: it aligns ANALYZE output with the current sampled-statistics contract while preserving the 10,000-row fixture, INT/CHAR controls, EXPLAIN/window assertions, and teardown. The relevant counterexamples (old 2-column output, current 11-column status output, and repeat execution) are covered by the PR evidence and green CI.

@mergify mergify Bot added the queued label Sep 4, 2026
@mergify

mergify Bot commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-09-04 20:36 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-09-04 20:36 UTC · at 313991b503fb10d0b72daf811c716e57fe7f2a07 · squash

This pull request spent 13 seconds in the queue, including 2 seconds running CI.

Required conditions to merge
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • github-review-approved [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / UT Test on Ubuntu/x86
    • check-neutral = Matrixone CI / UT Test on Ubuntu/x86
    • check-skipped = Matrixone CI / UT Test on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone CI / SCA Test on Linux/arm64
    • check-neutral = Matrixone CI / SCA Test on Linux/arm64
    • check-skipped = Matrixone CI / SCA Test on Linux/arm64
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-neutral = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
    • check-skipped = Matrixone Compose CI / multi cn e2e bvt test docker compose(PROXY)
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Utils CI / Coverage
    • check-neutral = Matrixone Utils CI / Coverage
    • check-skipped = Matrixone Utils CI / Coverage
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-neutral = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
    • check-skipped = Matrixone UT Coverage / UT Coverage on Ubuntu/x86
  • any of [🛡 GitHub branch protection]:
    • check-success = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-neutral = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)
    • check-skipped = Matrixone Standlone CI / multi CN e2e BVT Test on Linux/x64(COMPOSE, PESSIMISTIC)

@mergify
mergify Bot merged commit 313991b into matrixorigin:main Sep 4, 2026
49 of 50 checks passed
@mergify mergify Bot removed the queued label Sep 4, 2026
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
### Root cause

The sampled-statistics change `e89cd75352` changed the successful `ANALYZE TABLE` result from the legacy two-column NDV row to an 11-column structured status row. The window hash-partition case retained the old `approx_count_distinct(k)` / `approx_count_distinct(ck)` expectation, so mo-tester failed at `ANALYZE TABLE t(k, ck)` before reaching the window assertions. The SQL fixture and window behavior are otherwise unchanged.

### Changes

- Update `test/distributed/cases/window/window_hash_partition.result` to expect the supported sampled-ANALYZE status row:
`window_hash_partition.t | AUTO | SNAPSHOT_VISIBLE_V1 | 2 | 10000 | 1 | 10000 | 3 | 760000 | OK | q=1/1`.
- Keep the existing 10,000-row fixture, INT and CHAR partition controls, explain assertions, window-function coverage, and teardown unchanged.

### Issue-to-test proof

- Before the change, the exact case on a freshly built `d300619bb4` service reproduced the issue: 14/15 SQL statements passed and `ANALYZE TABLE t(k, ck)` failed because the expected result had 2 columns while the actual result had 11.
- After the change, the exact case passed in normal comparison mode with 15/15 statements and 100% success.
- A second run against the same instance also passed 15/15 and 100%, covering the case cleanup/reuse path.

### Tests run

- `make build` — passed on darwin/arm64; only the existing duplicate-library linker warning was emitted.
- `./run.sh -n -g -o -p <matrixone>/test/distributed/cases/ -i window_hash_partition -r 100` — passed twice; each run selected `window/window_hash_partition.sql` and reported 15 total, 15 success, 0 failed, 0 ignored.

### Residual risks

This is a test-oracle-only change. It does not alter production code, query planning, window execution, sampling, topology, or resource behavior. The expected summary values are deterministic for the existing fixture and match the service output at the sampled-statistics contract revision.

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
### Root cause

The sampled-statistics change `e89cd75352` changed the successful `ANALYZE TABLE` result from the legacy two-column NDV row to an 11-column structured status row. The window hash-partition case retained the old `approx_count_distinct(k)` / `approx_count_distinct(ck)` expectation, so mo-tester failed at `ANALYZE TABLE t(k, ck)` before reaching the window assertions. The SQL fixture and window behavior are otherwise unchanged.

### Changes

- Update `test/distributed/cases/window/window_hash_partition.result` to expect the supported sampled-ANALYZE status row:
`window_hash_partition.t | AUTO | SNAPSHOT_VISIBLE_V1 | 2 | 10000 | 1 | 10000 | 3 | 760000 | OK | q=1/1`.
- Keep the existing 10,000-row fixture, INT and CHAR partition controls, explain assertions, window-function coverage, and teardown unchanged.

### Issue-to-test proof

- Before the change, the exact case on a freshly built `d300619bb4` service reproduced the issue: 14/15 SQL statements passed and `ANALYZE TABLE t(k, ck)` failed because the expected result had 2 columns while the actual result had 11.
- After the change, the exact case passed in normal comparison mode with 15/15 statements and 100% success.
- A second run against the same instance also passed 15/15 and 100%, covering the case cleanup/reuse path.

### Tests run

- `make build` — passed on darwin/arm64; only the existing duplicate-library linker warning was emitted.
- `./run.sh -n -g -o -p <matrixone>/test/distributed/cases/ -i window_hash_partition -r 100` — passed twice; each run selected `window/window_hash_partition.sql` and reported 15 total, 15 success, 0 failed, 0 ignored.

### Residual risks

This is a test-oracle-only change. It does not alter production code, query planning, window execution, sampling, topology, or resource behavior. The expected summary values are deterministic for the existing fixture and match the service output at the sampled-statistics contract revision.

Approved by: @XuPeng-SH
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
### Root cause

The sampled-statistics change `e89cd75352` changed the successful `ANALYZE TABLE` result from the legacy two-column NDV row to an 11-column structured status row. The window hash-partition case retained the old `approx_count_distinct(k)` / `approx_count_distinct(ck)` expectation, so mo-tester failed at `ANALYZE TABLE t(k, ck)` before reaching the window assertions. The SQL fixture and window behavior are otherwise unchanged.

### Changes

- Update `test/distributed/cases/window/window_hash_partition.result` to expect the supported sampled-ANALYZE status row:
`window_hash_partition.t | AUTO | SNAPSHOT_VISIBLE_V1 | 2 | 10000 | 1 | 10000 | 3 | 760000 | OK | q=1/1`.
- Keep the existing 10,000-row fixture, INT and CHAR partition controls, explain assertions, window-function coverage, and teardown unchanged.

### Issue-to-test proof

- Before the change, the exact case on a freshly built `d300619bb4` service reproduced the issue: 14/15 SQL statements passed and `ANALYZE TABLE t(k, ck)` failed because the expected result had 2 columns while the actual result had 11.
- After the change, the exact case passed in normal comparison mode with 15/15 statements and 100% success.
- A second run against the same instance also passed 15/15 and 100%, covering the case cleanup/reuse path.

### Tests run

- `make build` — passed on darwin/arm64; only the existing duplicate-library linker warning was emitted.
- `./run.sh -n -g -o -p <matrixone>/test/distributed/cases/ -i window_hash_partition -r 100` — passed twice; each run selected `window/window_hash_partition.sql` and reported 15 total, 15 success, 0 failed, 0 ignored.

### Residual risks

This is a test-oracle-only change. It does not alter production code, query planning, window execution, sampling, topology, or resource behavior. The expected summary values are deterministic for the existing fixture and match the service output at the sampled-statistics contract revision.

Approved by: @XuPeng-SH

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants