Repository navigation
test: seed MSQ quantiles sketch for partition tests - #20440
Merged
FrankChen021 merged 1 commit intoSep 28, 2026
Merged
Conversation
FrankChen021
left a comment
Member
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found. The change is limited to the test class and uses DataSketches' documented deterministic-test random hook; resetting it before each test makes each method repeatable without changing production behavior. I inspected the full changed class, the collector and sketch call paths, the pinned DataSketches 4.2.0 source/API, module test execution settings, related MSQ tests, and the existing ItemsSketch test pattern.
Reviewed 1 of 1 changed files.
Validation: Static review completed; git diff --check passed. No build or test commands were run.
This is an automated review by Codex GPT-5.6-Luna(max)
FrankChen021
approved these changes
Sep 28, 2026
This was referenced Sep 29, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20439.
Description
ClusterByStatisticsCollectorImplTestfixes the input shuffle order, but the DataSketchesItemsSketchalso uses a shared random generator when it compacts and merges. Different sketch samples can push a partition outside the test's fixed weight leeway.Seed the sketch generator before each test method so the existing partition coverage, boundary, and weight assertions run against a repeatable sample. This changes only the test; production partitioning is unchanged. Seed
0Lreproduced the same weight failure for this fixture, so the test uses1Lafter checking the target method and the full class.Verification
single collector, random order,generatePartitionsWithMaxCount(50), partition#13, atverifyPartitionWeights.ClusterByStatisticsCollectorImplTestpassed with retries disabled.git diff --checkpassed.Tests used JDK 25 and Maven 3.9.16 with
-pl multi-stage-query -am,-Pskip-static-checks, and-Dweb.console.skip=true.Key changed/added classes in this PR
ClusterByStatisticsCollectorImplTestThis PR has: