How to reconstruct an arrow::Table from an arrow::Buffer object in C++?

2024-08-18 Thread Hung Dang
Hello, I use this code to serialize an arrow::Table to an arrow::Buffer. std::shared_ptr to_wire_format(const arrow::Table &table) { auto buffer = arrow::io::BufferOutputStream::Create().ValueOrDie(); auto writer = arrow::ipc::MakeStreamWriter(buffer, table.schema()).ValueOrDie(); validate_

Re: How to reconstruct an arrow::Table from an arrow::Buffer object in C++?

2024-08-18 Thread Sutou Kouhei
Hi, Does this work? std::shared_ptr from_wire_format(std::shared_ptr buffer) { arrow::io::BufferReader input(std::move(buffer)); auto reader = arrow::ipc::RecordBatchStreamReader::Open(&input).ValueOrDie(); return reader-.ToTable().ValueOrDie(); } Thanks, -- kou In "How to reconstru