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

Function FieldsFromArraysAndNames

cpp/src/arrow/type.cc:3294–3311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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