Repository navigation
Add test: input_format_orc_dictionary_as_low_cardinality as a schema-inference cache-key component is untested for same-file poisoning - #111942
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 [95fa7f2] Summary: ✅ AI ReviewSummaryThis PR adds a stateless ORC regression test for same-file schema-inference cache poisoning across Final Verdict✅ No new findings. |
Without this, a write and the first DESC in the same second invalidate the entry (SchemaCache.cpp:125 st_mtime >= registration_time, both second-granularity time_t), so the second DESC re-infers and passes even if the cache key omits input_format_orc_dictionary_as_low_cardinality. Requested by @clickhouse-gh[bot] in ClickHouse#111942 (comment)
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 #110074.
That PR This PR removes the legacy Apache Arrow-based ORC reader (
ORCBlockInputFormat/ORCSchemaReader), so the ORC input format now always uses the nativeNativeORCBlockInputFormat. Format registration (registerInputFormatORC,registerORCSchemaReader) moved intoNativeORCBlockInputFormat.cpp,1.
input_format_orc_dictionary_as_low_cardinalityas a schema-inference cache-key component is untested for same-file poisoningsrc/Processors/Formats/Impl/NativeORCBlockInputFormat.cpp:2330,src/Processors/Formats/Impl/NativeORCBlockInputFormat.cpp:1222Risk:
registerORCSchemaReaderbuilds the schema-cache additional-info string atNativeORCBlockInputFormat.cpp:2325-2332, andgetSchemaat :1221-1225 wraps dictionary-encoded String columns inLowCardinalityonly whendictionary_as_low_cardinalityis set (parseORCType :255). The PR rewrote this cache-key line and added same-file poisoning tests for the two sibling keys it newly introduced (skip_columns, max_parser_depth) but not for this one. RISK: if thedictionary_as_low_cardinality={}…What's unique vs PR tests: The PR's 04514/04631 test same-file schema-cache poisoning for the two cache-key components it newly added (skip_columns_with_unsupported_types, max_parser_depth). 03241 exercises
input_format_orc_dictionary_as_low_cardinalityonly across DIFFERENT files, so it never triggers a same-file cache collision. This test is the missing same-file cache-key poisoning test for the third schema-affecting component of the rewritten ORC cache key.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.8.1.607(included in26.8and later)