This issue was generated automatically by Claude Code (Anthropic's AI coding agent) running a scheduled CI-triage routine on behalf of @FrankChen021. Analysis and suggested fixes are AI-produced; please verify before acting on them.
Status: Resolved by #20440
Subject: ClusterByStatisticsCollectorImplTest.test_clusterByXYbucketByX_threeX_uniqueY (multi-stage-query, unit tests (25, C*))
Failures: 0 job failures, 4 passed on retry · First seen: 2026-09-26 · Last seen: 2026-09-27
So far every occurrence failed its first attempt and then passed on a surefire rerun (surefire.rerunFailingTestsCount=3), so no job has failed yet. It is tracked because it happened 4 times in 2 days.
Root cause
The single collector, random order case fails in verifyPartitionWeights because one partition from generatePartitionsWithMaxCount(50) falls outside PARTITION_SIZE_LEEWAY (0.35). The test seeds its key shuffle (new Random(7)), but QuantilesSketchKeyCollector uses DataSketches ItemsSketch. In datasketches-java 4.2.0, ItemsSketch.rand is a public static Random that is never seeded. The sketch calls nextBoolean() on it when it compacts and nextInt() when it merges, so the partition boundaries change from run to run, and sometimes a partition lands outside the tolerance. The failing partition index differs each time (#1, #2, #3, #32). None of the commits touches multi-stage-query/.../statistics.
Suggested fix
In ClusterByStatisticsCollectorImplTest, call ItemsSketch.rand.setSeed(<constant>) in a @BeforeEach so the sketch compacts the same way every run. Alternatively, derive the allowed partition size from the sketch's normalized rank error instead of the fixed 35%.
Occurrences
Push-triggered master jobs where this test failed at least one attempt. The daily triage routine adds one row per new job.
This issue was generated automatically by Claude Code (Anthropic's AI coding agent) running a scheduled CI-triage routine on behalf of @FrankChen021. Analysis and suggested fixes are AI-produced; please verify before acting on them.
Status: Resolved by #20440
Subject:
ClusterByStatisticsCollectorImplTest.test_clusterByXYbucketByX_threeX_uniqueY(multi-stage-query,unit tests (25, C*))Failures: 0 job failures, 4 passed on retry · First seen: 2026-09-26 · Last seen: 2026-09-27
So far every occurrence failed its first attempt and then passed on a surefire rerun (
surefire.rerunFailingTestsCount=3), so no job has failed yet. It is tracked because it happened 4 times in 2 days.Root cause
The
single collector, random ordercase fails inverifyPartitionWeightsbecause one partition fromgeneratePartitionsWithMaxCount(50)falls outsidePARTITION_SIZE_LEEWAY(0.35). The test seeds its key shuffle (new Random(7)), butQuantilesSketchKeyCollectoruses DataSketchesItemsSketch. In datasketches-java 4.2.0,ItemsSketch.randis apublic staticRandomthat is never seeded. The sketch callsnextBoolean()on it when it compacts andnextInt()when it merges, so the partition boundaries change from run to run, and sometimes a partition lands outside the tolerance. The failing partition index differs each time (#1, #2, #3, #32). None of the commits touchesmulti-stage-query/.../statistics.Suggested fix
In
ClusterByStatisticsCollectorImplTest, callItemsSketch.rand.setSeed(<constant>)in a@BeforeEachso the sketch compacts the same way every run. Alternatively, derive the allowed partition size from the sketch's normalized rank error instead of the fixed 35%.Occurrences
Push-triggered master jobs where this test failed at least one attempt. The daily triage routine adds one row per new job.
unit tests (25, C*)unit tests (25, C*)unit tests (25, C*)unit tests (25, C*)