Creating ArrayBuilders in a Loop

  apache-arrow, c++

Is there any way to create a dynamic container of arrow::ArrayBuilder objects? Here is an example

int main(int argc, char** argv) {
  std::size_t rowCount = 5;
  arrow::MemoryPool* pool = arrow::default_memory_pool();  
  std::vector<arrow::Int64Builder> builders;
  for (std::size_t i = 0; i < 2; i++) {
    arrow::Int64Builder tmp(pool);
    tmp.Reserve(rowCount);
    builders.push_back(tmp);
  }

  return 0;
}

This yields error: variable ‘arrow::Int64Builder tmp’ has initializer but incomplete type

I am ideally trying to build a collection that will hold various builders and construct a table from row-wise data I am receiving. My guess is that this isn’t the intended use for builders, but I couldn’t find anything definitive in the Arrow documentation

Source: Windows Questions C++

LEAVE A COMMENT