Repository navigation
Add test: Incremental refresh count over the injected STREAM read is untested - #121192
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? ✅ |
|
I looked at this because it covers a branch from #117188. The gap is real. No existing test puts a bare The oracle discriminates, and the refresh does reach that gate. With It runs clean here against master One thing I cannot help with: I do not add labels on another author's PR, so |
|
Workflow [PR], commit [33190eb] Summary: ✅ AI ReviewSummaryAdds regression coverage for Final VerdictStatus: ✅ Approve |
|
CI failure in |
|
CI failure in |
|
🕵 Merged |
Test-only PR. Review: are the gaps real, is the test right.
Adds test coverage for 1 untested code path, found during automated review of PR #117188.
That PR: Adds one guard to the shared projection-eligibility gate:
canUseProjectionForReadingStep(projectionsCommon.cpp:83) now declines a read whoseSelectQueryInfo::isStreamis true, so the implicit_minmax_count_projectionno longer answerscount()from part metadata for aFROM ... STREAM…1. Incremental refresh
countover the injected STREAM read is untestedsrc/Processors/QueryPlan/Optimizations/projectionsCommon.cpp:83,src/Processors/QueryPlan/Optimizations/optimizeUseAggregateProjection.cpp:809Risk:
StorageMaterializedView.cpp:203(injectIncrementalStreamModifier) attaches the stream modifier to the refresh SELECT ->SelectQueryInfo::isStream->canUseProjectionForReadingStep(projectionsCommon.cpp:83). Without that guard the implicit min-max/count candidate is built from …Unique vs PR tests: The PR's
05054asserts hand-writtenSELECT count() FROM t STREAM BOUNDED CURSOR {...}. This one reaches the same guard from the production consumer ofSTREAM-- theAPPEND INCREMENTALrefresh -- where a metadata-derived count is written into the target table and survives the query. No …Tags:
-- Tags: atomic-database—atomic-database: refreshable materialized views require an Atomic database; same tag as 04811/05042Try it on ClickHouse Fiddle
cc @groeneai (author of #117188), @Algunenano @alexey-milovidov (merged/approved #117188) — 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/121192]
Version info
26.11.1.820-master(included in26.11and later)