Skip to content

Add test: Ignored/foreign members in a Feature, geometry object, and after the features array are accepted but untested - #108010

Merged
nihalzp merged 1 commit into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr98124
Jun 25, 2026
Merged

nihalzp merged 1 commit into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr98124

Conversation

@clickgapai

@clickgapai clickgapai commented Jun 20, 2026 •

Copy link
Copy Markdown
Contributor

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 #98124.
That PR Adds a new GeoJSON input format (GeoJSONRowInputFormat) that reads a FeatureCollection into fixed columns id String, geometry Geometry, properties Nullable(JSON), plus a new input_format_geojson_unsupported_geometry_handling setting (throw/null). (1) Changes: new parser with strict

1. Ignored/foreign members in a Feature, geometry object, and after the features array are accepted but untested
src/Processors/Formats/Impl/GeoJSONRowInputFormat.cpp:326, src/Processors/Formats/Impl/GeoJSONRowInputFormat.cpp:384
Risk: forEachFieldInJSONObject line 325 if (!handle_field(key)) calls skipJSONValueStrict (line 326) for any unrecognized member; the PR's own tests only ever exercise the skip for a member before features (readPrefix line 663), never inside a Feature, inside a geometry, or after features. Risk: if the skip path regresses, common real-world GeoJSON files that carry per-Feature bbox or extra geometry/top-level members would be wrongly rejected (a usability regression that silently …
What's unique vs PR tests: The PR only tests an ignored member BEFORE the features array (readPrefix). This test covers the three other skip positions — inside a Feature, inside a geometry object, and after the features array — all LLVM-uncovered.
Try it on ClickHouse Fiddle

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.7.1.62

@clickgapai

Copy link
Copy Markdown
Contributor Author

Pre-PR Validation Gate (per ClickGap pipeline):

a) Deterministic repro? ✅
Test exercises the previously-uncovered branch and passes (correct behaviour).

b) Root cause explained? ✅
GeoJSONRowInputFormat.cpp:326 skipJSONValueStrict(buf, json_settings) (and its return false entry points at lines 384 and 795, plus the after-features skip at line 690) are reachable only via a foreign member at those positions, which no PR test supplies.

c) Fix matches root cause? ✅
N/A for coverage gap — this PR adds a regression test, not a fix. Asserts current correct behaviour at the cited line.

d) Test intent preserved? / New tests added? ✅
New regression test added: 04401_geojson_ignored_members.sql.

e) Both directions demonstrated? ✅
Test passes (MATCH) on master proving current correctness; would fail if the cited branch regressed. Single-direction is the correct shape for a coverage gap test.

f) Fix is general, not a narrow patch? ✅
Test asserts the invariant at the cited line — covers the branch, not a specific input shape.

@clickgapai clickgapai mentioned this pull request Jun 20, 2026
1 task done
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Jun 20, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [dd7c32f]

Summary: ✅


AI Review

Summary

This test-only PR adds stateless coverage for GeoJSON ignored members inside a Feature, inside a geometry object, and after the top-level features array. The added assertions match the parser paths they intend to cover, the expected output is consistent with neighboring GeoJSON tests, and I found no correctness or test-quality issues that need inline comments.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 20, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.20% 85.20% +0.00%
Functions 92.50% 92.50% +0.00%
Branches 77.40% 77.40% +0.00%

Changed lines: No C/C++ source files changed — skipping uncovered code analysis.

Newly covered by added/modified tests: 353 line(s), 42 function(s) across 110 file(s) · Details

Top files
  • src/Storages/StorageKeeperMap.cpp: 22 line(s)
  • src/AggregateFunctions/TimeSeries/AggregateFunctionTimeseriesLinearRegression.h: 14 line(s), 32 function(s)
  • src/Storages/Statistics/ConditionSelectivityEstimator.cpp: 11 line(s), 2 function(s)
  • src/Interpreters/HashJoin/HashJoin.cpp: 11 line(s)
  • src/Storages/MergeTree/ReplicatedMergeTreeRestartingThread.cpp: 11 line(s)

Full report

@nihalzp nihalzp self-assigned this Jun 20, 2026
@nihalzp
nihalzp added this pull request to the merge queue Jun 25, 2026
Merged via the queue into ClickHouse:master with commit 58a554c Jun 25, 2026
327 of 328 checks passed
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 25, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…pr98124

Add test: Ignored/foreign members in a Feature, geometry object, and after the `features` array are accepted but untested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants