Apache Arrow Table to RecordBatch in c++

  apache-arrow, c++

I would like to obtain a std::shared_ptr<arrow::RecordBatch> from an std::shared_ptr<arrow::Table> as

std::shared_ptr<arrow:Table> table = ...
auto rb = std::RecordBatch::Make(table->schema(), table->num_rows(), table->columns()).ValueorDie();

However the compiler complains that there’s no known conversion from 'const vector<shared_ptr<arrow::ChunkedArray>>' to 'vector<shared_ptr<arrow::Array>>' since the table->columns() of course returns vector<shared_ptr<arrow::ChunkedArray>>. I can’t seem to convert the arrow::ChunkedArray into arrow::Array. I’ve poured over the documentation but I can’t, for the life of me figure out how to do this.

How do I go about it, and alternatively, is there another way to convert a arrow::Table into an arrow::RecordBatch?

Source: Windows Questions C++