Repository navigation
Add test: WindowStep frame serialization of end_preceding (flags |= 4) is untested for distributed plans - #112969
Conversation
|
Pre-PR Validation Gate (per ClickGap pipeline): 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 [8190eac] Summary: ✅ AI ReviewSummaryThis PR adds a focused stateless test for the Final Verdict✅ No material issues found. |
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.
Adds test coverage for 1 untested code path(s), found during automated review of PR #109802.
That PR The PR implements
serialize/deserializeforWindowStepso window functions can run undermake_distributed_plan=1, registers a "Window" step inQueryPlanStepRegistry, bumpsDBMS_QUERY_PLAN_SERIALIZATION_VERSIONto 4, and extendsSortingStepserialization to carry `partition_by_descripti1.
WindowStepframe serialization ofend_preceding(flags |= 4) is untested for distributed planssrc/Processors/QueryPlan/WindowStep.cpp:194,src/Processors/QueryPlan/WindowStep.cpp:213Risk:
serializeWindowFrameatWindowStep.cpp:193-194 sets bit 4 only whenframe.end_precedingis true;deserializeWindowFrame:213 reads it back intoframe.end_preceding. The PR's frame tests all useend_preceding=false(1 PRECEDING AND CURRENT ROW,... AND N FOLLOWING), so this bit is never written or read. RISK: if the flag is dropped/mis-encoded, the deserialized frame silently reinterprets an end-PRECEDING boundary as end-FOLLOWING, producing WRONG window aggregation results for …What's unique vs PR tests: The PR's 04506 rolling-frame test uses
ROWS BETWEEN 1 PRECEDING AND CURRENT ROW(end_preceding=false); its other frames use... AND N FOLLOWING(end_preceding=false). None exercise an end-PRECEDING boundary, soflags |= 4(line 194) and its read at line 213 are only exercised by this test.Tags:
-- Tags: no-old-analyzer—no-old-analyzer: make_distributed_plan requires the analyzer; matches the PR's own window tests.Try it on ClickHouse Fiddle
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
Version info
26.8.1.626(included in26.8and later)