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

Method Add

cpp/src/arrow/type.cc:2189–2202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2187 size_t size() const { return referents.size(); }
2188
2189 void Add(const FieldPath& prefix, const FieldPath& suffix,
2190 const FieldVector& fields) {
2191 auto maybe_field = suffix.Get(fields);
2192 DCHECK_OK(maybe_field);
2193 referents.push_back(std::move(maybe_field).ValueOrDie());
2194
2195 std::vector<int> concatenated_indices(prefix.indices().size() +
2196 suffix.indices().size());
2197 auto it = concatenated_indices.begin();
2198 for (auto path : {&prefix, &suffix}) {
2199 it = std::copy(path->indices().begin(), path->indices().end(), it);
2200 }
2201 prefixes.emplace_back(std::move(concatenated_indices));
2202 }
2203 };
2204
2205 std::vector<FieldPath> operator()(const std::vector<FieldRef>& refs) {

Callers 2

operator()Method · 0.45
device_typesMethod · 0.45

Calls 8

push_backMethod · 0.80
ValueOrDieMethod · 0.80
indicesMethod · 0.80
emplace_backMethod · 0.80
GetMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected