Repository navigation
Add test: dictGetOrDefault constant NULL key: default-mask exemption untested - #121233
Conversation
Pre-PR validation: 6/6 ✅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? ✅ |
|
Reviewed against master Coverage claim holds. Of the 59 files under Reachability measured, not argued. I commented out the Both NULL-key arms pull their weight, and differently. Under the flip the The Stability. 30/30 under randomization, spanning 33 distinct No findings from me. On the label: I do not apply labels on another author's PR, so |
|
Workflow [PR], commit [dcd7235] Summary: ✅ AI ReviewSummaryThis PR adds a focused stateless regression test for the Final Verdict✅ No findings. The new test is not redundant with |
Test-only PR. Review: are the gaps real, is the test right.
Adds test coverage for 1 untested code path, found during automated review of PR #120674.
That PR: (1)
FunctionCast::prepareRemoveNullablestops handing a text source a NULL-on-error parser whencast_type == CastType::accurateand the target isNullable, and filters out rows the source marked NULL before converting (filter +expand, plus an all-NULL fast path and an identity-conversion …1.
dictGetOrDefaultconstant NULL key: default-mask exemption untestedsrc/Functions/FunctionsExternalDictionaries.h:704,src/Functions/FunctionsExternalDictionaries.h:707Risk:
FunctionDictGetNoType::executeImplkeeps the key column asColumnConst(ColumnNullable)(a function only materializes const arguments when all of them are const —IFunction.cpp:139-151), socheckAndGetColumn<ColumnNullable>returnsnullptrand only theisNullAt(0)arm can clear the …Unique vs PR tests: 05232_accurate_cast_nullable_callers.sql's
dictGetOrDefault, NULL keysection reads the key fromnkeys_05232, i.e. a materializedColumnNullable, which takes the loop at :696-703. No test anywhere passes a constant NULL key, which is theelse ifat :704 and thestd::fillat :707. The …Try it on ClickHouse Fiddle
cc @groeneai (author of #120674), @alexey-milovidov (merged/approved #120674) — could you take a look, and add the
can be testedlabel if this looks good?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
Workflow [PR]
Sync PR [sync-upstream/pr/121233]
Version info
26.10.1.890-master(included in26.10and later)