Repository navigation
Fix int96 overflow in parquet reader - #127401
Conversation
…mestamps `Int96Converter::convertColumn` threw unconditionally when a timestamp did not fit into `Int64` nanoseconds, ignoring `date_time_overflow_behavior`. Databricks writes `0001-01-01` (julian day 1721426) as a default value, so tables with such columns were unreadable through `DataLakeCatalog` even with `date_time_overflow_behavior = 'saturate'`. With `saturate`, values are now clamped to the `DateTime64(9)` range. `throw` and `ignore` keep the previous behavior. Related: ClickHouse/support-escalation#8450 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [15d6a9e] Summary: ✅
AI ReviewSummaryThe PR makes Parquet Missing context / blind spots
Final VerdictStatus: ✅ Approve. No code changes requested; the added Parquet regressions still need successful CI execution. |
`DateTime64(9)` covers the whole `Int64` range, so in-range values need no clamping and an overflowing value saturates to the `Int64` minimum or maximum. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units19 translation units recompiled, 184 s compile time in total, 19 of them have a recent master baseline. |
…ower boundary day `00900_long_parquet_load_2` reads every file in `data_parquet` with default settings, and `05443_int96_out_of_range.parquet` intentionally throws `VALUE_IS_OUT_OF_RANGE_OF_DATA_TYPE` then, so the test failed with "having exception in stdout" in every `arm_binary` stateless job. Add `05444_parquet_int96_lower_boundary`: an `INT96` value of `1677-09-21 12:00:00` (julian day 2333836, time of day 43200000000000 ns). Midnight of that day does not fit into `Int64` nanoseconds, but the full value -9223329600000000000 does, so it must be read exactly with both `saturate` and `throw`. Before the `Int128` computation it was saturated to the `Int64` minimum or rejected. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127401&sha=0c99f04f738aa24ba8d71873d4f0a62bd6ea6511&name_0=PR&name_1=Stateless%20tests%20%28arm_binary%2C%20parallel%29 PR: #127401 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
@grantholly-clickhouse thanks for the fixes |
|
I tried to get the sync PR to re-run by closing the PR and deleting the branch, but it looks like that didn't fix it: https://github.com/ClickHouse/clickhouse-private/pull/83162 Could I get some help getting this unblocked @scanhex12 ? CI is otherwise green. |
Backport #127401 to 26.10: Fix int96 overflow in parquet reader
Cherry pick #127401 to 26.9: Fix int96 overflow in parquet reader
Cherry pick #127401 to 26.8: Fix int96 overflow in parquet reader
Cherry pick #127401 to 26.3: Fix int96 overflow in parquet reader
Backport #127401 to 26.8: Fix int96 overflow in parquet reader
Backport #127401 to 26.9: Fix int96 overflow in parquet reader
Backport #127401 to 26.3: Fix int96 overflow in parquet reader
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix int96 overflow in parquet reader.
Workflow [PR]
Sync PR [sync-upstream/pr/127401]
Version info
26.11.1.981-master(included in26.11and later)