Skip to content

Commit c28d88c

Browse files
committed
[BugFix] Fix parquet Int96 timestamp write for Arrow 24
parquet::Int96::value changed from a C array (uint32_t[3]) to std::array<uint32_t, 3> in the Arrow 24 bundled Parquet headers, so pointer arithmetic and reinterpret_cast on it no longer compile. Use .data() to get the underlying pointer in level_builder's INT96 timestamp encoding path.
1 parent 6b86626 commit c28d88c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

be/src/formats/parquet/level_builder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ Status LevelBuilder::_write_datetime_column_chunk(const LevelBuilderContext& ctx
394394
: data_col[i]._timestamp;
395395

396396
if constexpr (use_int96_timestamp_encoding) {
397-
auto date = reinterpret_cast<int32_t*>(values[i].value + 2);
398-
auto nanosecond = reinterpret_cast<int64_t*>(values[i].value);
397+
auto date = reinterpret_cast<int32_t*>(values[i].value.data() + 2);
398+
auto nanosecond = reinterpret_cast<int64_t*>(values[i].value.data());
399399
*date = timestamp::to_julian(timestamp);
400400
*nanosecond = timestamp::to_time(timestamp) * 1000;
401401
} else {

0 commit comments

Comments
 (0)