Repository navigation
Add test: MVTEncode aggregate state serialize/deserialize round-trip is untested - #109601
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 [e817dae] Summary: ❌
AI ReviewSummaryThis PR adds a stateless query test that persists Missing context / blind spots
Final Verdict✅ No review findings in the current diff. The change looks reasonable pending normal CI execution of the new stateless test. |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 128 line(s), 7 function(s) across 38 file(s) · Details Top files
|
22b4e85
…pr106107 Add test: `MVTEncode` aggregate state `serialize`/`deserialize` round-trip is untested
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 #106107.
That PR Adds native Mapbox Vector Tile encoding: scalar
MVTEncodeGeom(project/clip a geometry into tile pixel space), aggregateMVTEncode(assemble a single-layer tile with optional named-tuple properties, feature id and stringify_unsupported), and helpersMVTBoundingBox/MVTBoundingBoxMercator. The1.
MVTEncodeaggregate stateserialize/deserializeround-trip is untestedsrc/AggregateFunctions/AggregateFunctionMVTEncode.cpp:593,src/AggregateFunctions/AggregateFunctionMVTEncode.cpp:612Risk:
serialize(AggregateFunctionMVTEncode.cpp:591-598) writes a versioned flat record buffer anddeserialize(600-630) reads it back; this path is used by AggregatingMergeTree state columns and by distributed partial aggregation merged across shards. The PR's-State/-Mergetest keeps the state in memory (ColumnAggregateFunction) and never serializes (LLVM 593-629 uncovered). Risk: if the state format is broken, tiles stored in AggregatingMergeTree or aggregated across shards would silently …What's unique vs PR tests: The PR's '-State / -Merge round-trip' test uses an in-query subquery, keeping the state as an in-memory ColumnAggregateFunction (LLVM shows serialize/deserialize 593-629 uncovered). This test persists the state in a MergeTree AggregateFunction column, forcing the serialize-on-INSERT / deserialize-on-SELECT format path the PR never exercises, and additionally covers the has_feature_id min-record-size validation branch.
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