Repository navigation
Add test: GeoJSONRowOutputFormat::resetFormatterImpl (formatter reuse via formatRow) is untested - #108683
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 [6b70907] Summary: ✅ AI ReviewSummaryThis PR adds a focused stateless regression test for Final VerdictStatus: ✅ Approve |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 768 line(s), 102 function(s) across 140 file(s) · Details Top files
|
30f0ce2
…pr108065 Add test: `GeoJSONRowOutputFormat::resetFormatterImpl` (formatter reuse via `formatRow`) 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 #108065.
PR 108065 adds the
GeoJSONOUTPUT format (GeoJSONRowOutputFormat) — writing a result set as a singleFeatureCollection, oneFeatureper row — and makes input-format tweaks: a newformat_geojson_validate_geometrysetting (defaulttrue) that gates RFC 7946 shape validation on both read and1.
GeoJSONRowOutputFormat::resetFormatterImpl(formatter reuse viaformatRow) is untestedsrc/Processors/Formats/Impl/GeoJSONRowOutputFormat.cpp:438Risk:
formatRow.cpp:101callsrow_output_format->resetFormatter()per row →IOutputFormat::resetFormatter()→GeoJSONRowOutputFormat::resetFormatterImpl()(GeoJSONRowOutputFormat.cpp:436-440). When a wrapper buffer exists (output_format_json_validate_utf8=1creates aWriteBufferValidUTF8, orvalid_output_on_exceptioncreates aPeekableWriteBuffer), the adaptor reset recreates that wrapper, so line 439 must re-fetchostr = getWriteBufferPtr(). RISK: if line 439 is …What's unique vs PR tests: The PR's tests (04402-04412) all run the GeoJSON output formatter once per query (single FeatureCollection) or via the parallel formatter (which throws NOT_IMPLEMENTED for resetFormatterImpl). None reuse a single formatter instance, so none reach
resetFormatterImpl; this test reaches it viaformatRowover multiple rows.Tags:
-- Tags: no-random-settings—no-random-settings: Test asserts exact JSON output bytes; random injection of output_format_json_* settings could alter quoting/format and flake the comparison.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.7.1.172(included in26.7and later)