Repository navigation
Read Arrow interval types - #126206
Read Arrow interval types#126206
Conversation
|
Workflow [PR], commit [c1ceeb9] Summary: ✅
AI ReviewSummaryPR #126206 adds native decoding of Arrow interval types into Missing context / blind spots
Final Verdict✅ Approve — no actionable findings. No inline comments posted. |
…docs to the generator
…enabled by default Master made `Nullable(Tuple)` GA, so `DAY_TIME` and `MONTH_DAY_NANO` interval columns are now inferred as `Nullable(Tuple(...))` and the null rows read as `NULL`. Update the reference, and check the previous behavior (null rows read as zero intervals) with `enable_nullable_tuple_type = 0` instead. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126206&sha=caed1f25c64a938b759d0ace6b2f6dd2daddac82&name_0=PR PR: ClickHouse#126206 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 units9 translation units recompiled, 25 s compile time in total, 9 of them have a recent master baseline. |
|
🕵 @groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126206&sha=adc31c7366d&name_0=PR&name_1=Integration%20tests%20(arm_binary%2C%202%2F4) and provide a fix in a separate PR. If the fix is already in progress, link it here.
|
|
No fix PR exists yet; I'm working on it and will link it here. From the logs of all three failed runs:
|
|
The fix is in #126746: the drain loop now asks |
|
🕵 Merged |
The test from master used `month_day_nano_interval` as an Arrow type the native reader does not support, to check the error when `input_format_arrow_skip_columns_with_unsupported_types_in_schema_inference` skips every column. This PR adds support for Arrow intervals, so the column is inferred and the test failed. The reader now maps every type that `pyarrow` can write, so use a schema-only stream whose field has an undefined type id instead. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=126206&sha=latest&name_0=PR&name_1=Stateless%20tests%20(arm_binary%2C%20parallel) PR: ClickHouse#126206 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 Fixed the CI failure in |
Closes: #125143
The native Arrow IPC reader now reads the three Arrow interval types instead of failing with
Native Arrow IPC reader does not support this type yet:INTERVAL(YEAR_MONTH)(Int32months)IntervalMonthINTERVAL(DAY_TIME)(Int32days,Int32milliseconds)Tuple(days IntervalDay, milliseconds IntervalMillisecond)INTERVAL(MONTH_DAY_NANO)(Int32months,Int32days,Int64nanoseconds)Tuple(months IntervalMonth, days IntervalDay, nanoseconds IntervalNanosecond)The composite types keep their counts apart in a
Tupleof intervals, as the issue suggests, because months, days and smaller units cannot be converted into each other (the elements are named, sodt.daysworks and they can be added to dates directly). The ArrowDurationtype is already read as anInterval, so this follows the same convention.fieldToCHTypemaps the types. TheTupleones follow the rule for structs: they areNullable(Tuple)only withenable_nullable_tuple_type, andRecordBatchDecoder::wrapsInNullableapplies the same rule to them.decodeInnerreads each count withmemcpy(the values are packed structs) and widens it to theInt64of the interval columns; invisible rows are zero.The test files were written with nanoarrow and pyarrow (pyarrow cannot build month and day-time interval arrays from Python) and have a null row in every column. The test checks the inferred types, the values, date arithmetic with them, and
Nullable(Tuple)withenable_nullable_tuple_type.The data type mapping table in the Arrow format documentation is autogenerated, so it is left to the generator. The Apache Arrow library based reader (Arrow Flight, Delta Lake) is not changed.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The
ArrowandArrowStreaminput formats can read the Arrow interval types:YEAR_MONTHasIntervalMonth, andDAY_TIMEandMONTH_DAY_NANOas aTupleof intervals.Workflow [PR]
Sync PR [sync-upstream/pr/126206]
Version info
26.11.1.682-master(included in26.11and later)