Repository navigation
Fix flaky test_writes_split_offsets_read_by_spark - #127787
alexey-milovidov merged 1 commit into
Conversation
The integration harness randomizes `max_block_size` (8000..100000, p=0.5). Parquet is not a "prefers large blocks" format, so the INSERT SELECT squashing uses `max_block_size` as its minimum and `numbers(10000)` reaches the Iceberg sink as two chunks, M and 10000-M rows. The Parquet writer forms row groups per chunk, so for M in [8001, 8999] the file has 8 + 1 = 9 row groups instead of 10, and the precondition `len(expected) == 10` fails. Check that there are several row groups and keep the strict `split_offsets` comparison, the same as 6962e76 did for 05395_iceberg_write_split_offsets. Master failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=1c6ae3a087fc4a6471182c0be402acf0f32a81b3&name_0=MasterCI&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%203%2F4%29 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus my own cold review (0 findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-9:20261025-173900 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-5:20261025-172300 |
|
cc @hanfei1991, could you review this and add the |
|
Workflow [PR], commit [0cf078b] Summary: ✅ AI ReviewSummaryThis PR fixes a flaky precondition in Final VerdictStatus: ✅ Approve |
1230fe6
Related: #125619
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
test_storage_iceberg_with_spark/test_writes_split_offsets.py::test_writes_split_offsets_read_by_sparkfails its preconditionassert len(expected) == 10withassert 9 == 10in about 0.5% of runs: on master (report) and on an unrelated PR (report).The integration harness randomizes
max_block_size(8000 to 100000, half of the runs). Parquet does not prefer large blocks, so the INSERT SELECT squashing usesmax_block_sizeas its minimum andnumbers(10000)reaches the Iceberg sink as two chunks, M and 10000 - M rows. The Parquet writer forms row groups per chunk, so for M in [8001, 8999] the file has 8 + 1 = 9 row groups.The test now checks that there are several row groups and still compares Spark's
split_offsetswith the real row-group offsets, the same change 6962e76 made for05395_iceberg_write_split_offsets.Validation: a
clickhouse localsweep gives 9 row groups for every M in [8001, 8999] and 10 elsewhere; both CI failure offset arrays match M in 8209..8216 and 8225..8232 byte for byte. The integration test withmax_block_sizeforced to 8001, 8500 and 8999 fails9 == 10before the change and passes after it; 9500 and three normal random draws pass.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/127787]
Version info
26.11.1.863-master(included in26.11and later)