MCPcopy Create free account
hub / github.com/apache/arrow / vec_to_arrow_Array

Function vec_to_arrow_Array

r/src/r_to_arrow.cpp:1336–1344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1334}
1335
1336std::shared_ptr<arrow::Array> vec_to_arrow_Array(
1337 SEXP x, const std::shared_ptr<arrow::DataType>& type, bool type_inferred) {
1338 auto chunked_array = vec_to_arrow_ChunkedArray(x, type, type_inferred);
1339 if (chunked_array->num_chunks() == 1) {
1340 return chunked_array->chunk(0);
1341 }
1342
1343 return ValueOrStop(arrow::Concatenate(chunked_array->chunks()));
1344}
1345
1346// TODO: most of this is very similar to MakeSimpleArray, just adapted to
1347// leverage concurrency. Maybe some refactoring needed.

Callers 3

CollectRecordBatchArraysFunction · 0.85
vec_to_ArrayFunction · 0.85

Calls 5

ValueOrStopFunction · 0.85
ConcatenateFunction · 0.85
num_chunksMethod · 0.45
chunksMethod · 0.45

Tested by

no test coverage detected