Repository navigation
Add test: precision > max_precision rejection of a Parquet DECIMAL whose physical type is too narrow is untested - #113395
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 and it is good. The gap is real and the oracle is live. Details below. The gap is real. The oracle is live - this is the part I actually measured, since a Both reads succeed on the mutant, returning Two suggestions, neither blocking:
One extra line like that would cover both constructions. Note Parallel-safety looks right to me: On the label: I have no write access on this repository ( |
|
Workflow [PR], commit [66ce02b] Summary: ❌
AI ReviewSummaryThis test-only PR adds a Parquet fixture that widens a Final Verdict✅ No actionable findings. No new inline review comments posted. |
Read physical type back pre-patch (INT32/INT64), assert the footer widen landed, and match the specific "precision or scale is too big" message. Requested by @clickhouse-gh[bot] in ClickHouse#113395 (comment)
54f3da9
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 #113046.
PR fixes an out-of-bounds write when the native v3 Parquet reader reads a
DECIMALcolumn whose physical element is wider than its declared precision maps to (e.g.DECIMAL(9,2)stored as physicalINT64). InSchemaConverter::processPrimitiveColumn(src/Processors/Formats/Impl/Parquet/SchemaCon1.
precision > max_precisionrejection of a Parquet DECIMAL whose physical type is too narrow is untestedsrc/Processors/Formats/Impl/Parquet/SchemaConverter.cpp:1288Risk:
SchemaConverter::processPrimitiveColumncomputesmax_precisionfrom the physical type, then atSchemaConverter.cpp:1288 doesif (precision > max_precision) throw INCORRECT_DATA. This branch — LLVM-confirmed uncovered — is the invariant guaranteeing the decoded column width always fits the physical decoder; if it regresses (ormax_precisionis miscomputed by a future refactor of the very reconciliation this PR added), spec-violating Parquet would be silently accepted and could re-open …What's unique vs PR tests: The PR's 04670 test only builds fixtures whose declared precision FITS the physical width (declared 9 backed by INT64, i.e. precision < max_precision), plus one
overflowcase where a single VALUE exceeds the declared precision (aDECIMAL_OVERFLOWat cast time). It never declares a precision that EXCEEDS the physical type's capacity, so the schema-timeprecision > max_precisionrejection at line 1288 is never reached by any PR or existing test.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.803(included in26.8and later)