Repository navigation
Add test: JSON_VALUE multi-path over Dynamic input with function_json_value_return_type_allow_nullable=1 — per-leaf makeNullable branch untested - #111866
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? ✅ |
|
I reviewed this test and it looks good. Coverage gap is real. Reference verified. I ran the Parallel-safe: only literals and a session-local One note: this branch is about 1900 commits behind master and predates the fix, so it only passes after a merge with current master. CI tests On the |
|
Workflow [PR], commit [9dafddb] Summary: ✅ AI ReviewSummaryThis PR adds a focused stateless regression test for Final Verdict✅ Approve. No correctness, coverage, or PR-metadata issues found in the current diff. |
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 #109944.
PR fixes a
LOGICAL_ERRORinJSON_EXISTS/JSON_VALUE/JSON_QUERYwhen the input isDynamicand the path argument is a multi-path (Tuple/Array) whose elements are wrapped inLowCardinalityorNullable(e.g.tuple('$.a', toLowCardinality('$.b')), or a scalarTuplesubquery arriving1.
JSON_VALUEmulti-path overDynamicinput withfunction_json_value_return_type_allow_nullable=1— per-leafmakeNullablebranch untestedsrc/Functions/FunctionSQLJSON.h:655Risk:
FunctionSQLJSON.h:654-655 only runs when the setting is enabled AND the input isDynamicAND the path is multi-path; the PR's Dynamic tests use the default (setting=0) and the existing setting=1 test (04066) uses non-Dynamic input, so the branch that makes leavesNullableon the Dynamic path is never executed. Risk: if this branch is broken the declared return type collapses to non-nullableTuple(String, ...)while execution fills NULLs, reproducing theLOGICAL_ERROR(declared-type …What's unique vs PR tests: The PR's 04325 Dynamic tests run only at the default
function_json_value_return_type_allow_nullable=0(plainStringleaves); the existing 04066 setting=1 test uses non-Dynamic input (hits line 632, not the Dynamic overload at 654-655). This test is the only one that combinesDynamicinput + multi-path + setting=1, executing line 655.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