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

Function FieldsFromArraysAndNames

cpp/src/arrow/type.cc:3289–3306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3287namespace {
3288
3289FieldVector FieldsFromArraysAndNames(std::vector<std::string> names,
3290 const ArrayVector& arrays) {
3291 FieldVector fields(arrays.size());
3292 int i = 0;
3293 if (names.empty()) {
3294 for (const auto& array : arrays) {
3295 fields[i] = field(internal::ToChars(i), array->type());
3296 ++i;
3297 }
3298 } else {
3299 DCHECK_EQ(names.size(), arrays.size());
3300 for (const auto& array : arrays) {
3301 fields[i] = field(std::move(names[i]), array->type());
3302 ++i;
3303 }
3304 }
3305 return fields;
3306}
3307
3308} // namespace
3309

Callers 2

sparse_unionFunction · 0.85
dense_unionFunction · 0.85

Calls 5

ToCharsFunction · 0.85
fieldFunction · 0.70
sizeMethod · 0.45
emptyMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected