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

Method Add

cpp/src/arrow/type.cc:2192–2205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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