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

Method UnionType

cpp/src/arrow/type.cc:1228–1238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1226}
1227
1228UnionType::UnionType(FieldVector fields, std::vector<int8_t> type_codes, Type::type id)
1229 : NestedType(id),
1230 type_codes_(std::move(type_codes)),
1231 child_ids_(kMaxTypeCode + 1, kInvalidChildId) {
1232 children_ = std::move(fields);
1233 DCHECK_OK(ValidateParameters(children_, type_codes_, mode()));
1234 for (int child_id = 0; child_id < static_cast<int>(type_codes_.size()); ++child_id) {
1235 const auto type_code = type_codes_[child_id];
1236 child_ids_[type_code] = child_id;
1237 }
1238}
1239
1240Status UnionType::ValidateParameters(const FieldVector& fields,
1241 const std::vector<int8_t>& type_codes,

Callers

nothing calls this directly

Calls 2

modeFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected