| 319 | } |
| 320 | |
| 321 | Result<std::shared_ptr<Table>> ReadTableFromBuffer(const std::shared_ptr<Buffer>& data) { |
| 322 | FileReaderBuilder builder; |
| 323 | std::unique_ptr<FileReader> reader; |
| 324 | auto props = default_arrow_reader_properties(); |
| 325 | props.set_arrow_extensions_enabled(true); |
| 326 | |
| 327 | RETURN_NOT_OK(builder.Open(std::make_shared<BufferReader>(data))); |
| 328 | RETURN_NOT_OK(builder.memory_pool(::arrow::default_memory_pool()) |
| 329 | ->properties(props) |
| 330 | ->Build(&reader)); |
| 331 | ARROW_ASSIGN_OR_RAISE(auto result, reader->ReadTable()); |
| 332 | return result; |
| 333 | } |
| 334 | |
| 335 | Result<std::shared_ptr<Buffer>> WriteTableToBuffer( |
| 336 | const std::shared_ptr<Table>& table, int64_t min_chunk_size, int64_t max_chunk_size, |
nothing calls this directly
no test coverage detected