Repository navigation
Add 2 tests for coverage gaps in PR #116706 - #121307
Conversation
Pre-PR validation: 6/6 ✅a) Deterministic repro? ✅ b) Root cause explained? ✅ c) Fix matches root cause? ✅ d) Test intent preserved? / New tests added? ✅ e) Both directions demonstrated? ✅ f) Fix is general, not a narrow patch? ✅ |
|
Workflow [PR], commit [12f3118] Summary: ✅ AI ReviewSummaryAdds stateless tests for streaming Final Verdict✅ Approve. |
|
After investigation, the bot determined the failure in |
|
CI fix exhausted: 5 attempts on |
|
@clickgapai check again. Test failures are for your changes |
EXPLAIN cannot show the per-round STREAM read plan, so convert the test to .sh and grep the lag-watermark query's debug log for the commit_order selection. Pin optimize_use_projections = 1 for random-settings runs. Requested by @clickhouse-gh[bot] in ClickHouse#121307 (comment)
Capture the client output, exit 1 with it on stderr when the client fails, then grep the saved output via a here-string instead of a pipe. Requested by @clickhouse-gh[bot] in ClickHouse#121307 (comment)
The `STREAM BOUNDED WATERMARK` read takes time linear in the table size even with `LIMIT` (about 1.35 s for 10000 rows in a release build with randomized MergeTree settings), so the test exceeded 180 s in the ASan and debug flaky checks. 100 rows still exceed every `LIMIT` used. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=121307&sha=latest&name_0=PR PR: ClickHouse#121307 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 100-row fixture fit in one default block, so AlignStreams drained both inputs before LIMIT finished and a missing input close() went undetected. Requested by @clickhouse-gh[bot] in ClickHouse#121307 (comment)
Test-only PR. Review: are the gaps real, is the test right.
Adds test coverage for 2 untested code paths, found during automated review of PR #116706.
That PR: Rewrites the streaming
WATERMARKread path. (1) The single read plan is split into two: a narrow metadata plan (_partition_id,_block_number,_block_offset+ the watermark expression's source columns) that computes watermarks unfiltered, and a wide data plan that now carries the row- …1. Streaming
WATERMARKover a table with projections is untestedsrc/Interpreters/Streaming/Utils.cpp:50,src/Interpreters/Streaming/Utils.cpp:53Risk:
extendMetadataWithStreamclones every projection whose sample block holds the watermark column and injects the_time_attributevirtual into the clone (Utils.cpp:48-58);chooseCommitOrderProjectionthen accepts a commit-order projection on that virtual (ReadRoundContext.cpp:132). The loop …Unique vs PR tests: The PR's own watermark tests (04891, 05042, 05047, 05218, 05227) all use plain tables with no projection, and every watermark expression in them reads only the
WATERMARK FORcolumn itself. This is the first test wheremetadata->projectionsis non-empty duringextendMetadataWithStreamand the …Try it on ClickHouse Fiddle
2.
AlignStreamsteardown on earlyLIMITtermination is untestedsrc/Storages/MergeTree/Streaming/ReadingPlan/AlignStreams.cpp:210,src/Storages/MergeTree/Streaming/ReadingPlan/AlignStreams.cpp:211Risk:
AlignStreamsProcessor::preparecloses both inputs and returnsFinishedwhen its output port is already finished (AlignStreams.cpp:208-213). That is the only teardown path of the PR's new two-input processor and the only way aLIMITed watermark stream stops. Risk: if the twoclose()calls …Unique vs PR tests:
04235_streaming_queries_explain_analyze_stream_read.sqlalready covers LIMIT-driven early termination of a streaming read, but without aWATERMARK, soAlignStreamsis not in that pipeline. None of the PR's six watermark tests uses aLIMIT; they all drain the bounded snapshot.cc @Michicosun (author of #116706), @CheSema (merged/approved #116706) — could you take a look, and add the
can be testedlabel if this looks good?Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Not applicable — test-only change.
Documentation entry for user-facing changes
Workflow [PR]
Sync PR [sync-upstream/pr/121307]
Version info
26.11.1.819-master(included in26.11and later)