From ad9616853e64baa7b56322f5a014face729a48fd Mon Sep 17 00:00:00 2001 From: 924060929 Date: Fri, 13 Nov 2026 11:59:47 +0800 Subject: [PATCH] [test](regression) Pin row counts in bucket shuffle set operation tests ### Background The bucket-shuffle set-operation suite checks physical plan shapes as well as query results. INTERSECT input ordering and bucket-shuffle anchor selection depend on estimated row counts. ### What problem does this PR solve? Issue Number: None Related PR: #65129 (enabled the suite and added bucket-shuffle coverage) PR Type: Test Problem Summary: The three initial tables each contain three rows, but asynchronous tablet statistics updates can leave one estimated at three rows and another at one row. This changes INTERSECT input order or the UNION anchor and causes intermittent shape mismatches. Inject row_count=3 for both columns of these tables before checking plans. Keep the existing queries, assertions, and golden results. ### Details - **Failure:** INTERSECT children can swap, or the join above UNION ALL can change from colocated to bucket shuffle. - **Cause:** The plan checks relied on asynchronously reported row counts immediately after creating and loading the tables. - **Stability evidence:** The complete suite passed 10 consecutive runs with default settings and another 10 with enable_spill=true. Only row counts are specified: adding detailed column statistics changes an unrelated join choice and bypasses the parent-hash-request coverage. All existing shape and result checks remain intact, including the fixtures with larger injected row counts later in the suite. ### Testing On a local macOS instance with one FE and one ASAN BE, built from b325dcd122b: - Single complete suite run passed. - `./run-regression-test.sh --run -d query_p0/set_operations -s bucket_shuffle_set_operation -parallel 1 -times 10`: 10/10 passed with default settings. - The same command with global enable_spill=true: 10/10 passed. - Regression framework compilation and its 50 unit tests passed. - FE build passed with zero Checkstyle violations; BE build passed. - `git diff --check` passed. No golden output changes. ### Release note None ### Check List (For Author) - Behavior changed: No - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Codex - Generated: Test setup and PR description. - Human review: Pending maintainer review. --- .../set_operations/bucket_shuffle_set_operation.groovy | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/regression-test/suites/query_p0/set_operations/bucket_shuffle_set_operation.groovy b/regression-test/suites/query_p0/set_operations/bucket_shuffle_set_operation.groovy index baa433fe16a8ce..be94cd49a3a6b1 100644 --- a/regression-test/suites/query_p0/set_operations/bucket_shuffle_set_operation.groovy +++ b/regression-test/suites/query_p0/set_operations/bucket_shuffle_set_operation.groovy @@ -32,6 +32,16 @@ suite("bucket_shuffle_set_operation") { set runtime_filter_mode=off; """ + // Row counts affect INTERSECT input order and the bucket-shuffle basic child. Pin + // both columns so plan shapes do not depend on asynchronous tablet statistics updates. + // Leave detailed column statistics unset to preserve the existing join-plan coverage. + ["bucket_shuffle_set_operation1", "bucket_shuffle_set_operation2", "bucket_shuffle_set_operation3"].each { table -> + ["id", "value"].each { column -> + sql """alter table ${table} modify column ${column} set stats + ('row_count'='3')""" + } + } + // make bucket shuffle set operation stable sql "set parallel_pipeline_task_num=5" // disable the bucket shuffle downgrade so the chosen shapes do not depend on the