Skip to content

Commit d620a64

Browse files
authored
Fix building with arrow 20.0.0 (#9966)
1 parent 33be79a commit d620a64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rerun_cpp/src/rerun/time_column.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "c/rerun.h"
55

66
#include <arrow/array/array_base.h>
7+
#include <arrow/array/util.h>
78
#include <arrow/buffer.h>
89
#include <arrow/c/bridge.h>
910

@@ -20,7 +21,9 @@ namespace rerun {
2021
// which may or may not be another copy (if the collection already owns the data this is just a move).
2122
auto length = static_cast<int64_t>(times.size());
2223
auto buffer = arrow_buffer_from_vector(std::move(times).to_vector());
23-
array = std::make_shared<arrow::PrimitiveArray>(datatype, length, buffer);
24+
auto buffers = std::vector<std::shared_ptr<arrow::Buffer>>{nullptr, buffer};
25+
auto array_data = std::make_shared<arrow::ArrayData>(datatype, length, std::move(buffers));
26+
array = arrow::MakeArray(array_data);
2427
}
2528

2629
TimeColumn TimeColumn::from_seconds(

0 commit comments

Comments
 (0)