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

Function vec_to_arrow_Array

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

Source from the content-addressed store, hash-verified

1342}
1343
1344std::shared_ptr<arrow::Array> vec_to_arrow_Array(
1345 SEXP x, const std::shared_ptr<arrow::DataType>& type, bool type_inferred) {
1346 auto chunked_array = vec_to_arrow_ChunkedArray(x, type, type_inferred);
1347 if (chunked_array->num_chunks() == 1) {
1348 return chunked_array->chunk(0);
1349 }
1350
1351 return ValueOrStop(arrow::Concatenate(chunked_array->chunks()));
1352}
1353
1354// TODO: most of this is very similar to MakeSimpleArray, just adapted to
1355// 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