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

Function ChunkedArrayFromVector

cpp/src/arrow/testing/builder.h:132–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130
131template <typename TYPE, typename C_TYPE = typename TYPE::c_type>
132void ChunkedArrayFromVector(const std::shared_ptr<DataType>& type,
133 const std::vector<std::vector<bool>>& is_valid,
134 const std::vector<std::vector<C_TYPE>>& values,
135 std::shared_ptr<ChunkedArray>* out) {
136 ArrayVector chunks;
137 ASSERT_EQ(is_valid.size(), values.size());
138 for (size_t i = 0; i < values.size(); ++i) {
139 std::shared_ptr<Array> array;
140 ArrayFromVector<TYPE, C_TYPE>(type, is_valid[i], values[i], &array);
141 chunks.push_back(array);
142 }
143 *out = std::make_shared<ChunkedArray>(chunks);
144}
145
146template <typename TYPE, typename C_TYPE = typename TYPE::c_type>
147void ChunkedArrayFromVector(const std::shared_ptr<DataType>& type,

Callers

nothing calls this directly

Calls 3

push_backMethod · 0.80
type_singletonFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected