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

Function ToChunkedArray

cpp/src/arrow/compute/exec.cc:688–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686};
687
688std::shared_ptr<ChunkedArray> ToChunkedArray(const std::vector<Datum>& values,
689 const TypeHolder& type) {
690 std::vector<std::shared_ptr<Array>> arrays;
691 arrays.reserve(values.size());
692 for (const Datum& val : values) {
693 if (val.length() == 0) {
694 // Skip empty chunks
695 continue;
696 }
697 arrays.emplace_back(val.make_array());
698 }
699 return std::make_shared<ChunkedArray>(std::move(arrays), type.GetSharedPtr());
700}
701
702bool HaveChunkedArray(const std::vector<Datum>& values) {
703 for (const auto& value : values) {

Callers 2

WrapResultsMethod · 0.85
WrapResultsMethod · 0.85

Calls 5

emplace_backMethod · 0.80
make_arrayMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected