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

Method ValidateParameters

cpp/src/arrow/type.cc:1240–1252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1238}
1239
1240Status UnionType::ValidateParameters(const FieldVector& fields,
1241 const std::vector<int8_t>& type_codes,
1242 UnionMode::type mode) {
1243 if (fields.size() != type_codes.size()) {
1244 return Status::Invalid("Union should get the same number of fields as type codes");
1245 }
1246 for (const auto type_code : type_codes) {
1247 if (type_code < 0 || type_code > kMaxTypeCode) {
1248 return Status::Invalid("Union type code out of bounds");
1249 }
1250 }
1251 return Status::OK();
1252}
1253
1254DataTypeLayout UnionType::layout() const {
1255 if (mode() == UnionMode::SPARSE) {

Callers

nothing calls this directly

Calls 7

InvalidFunction · 0.70
OKFunction · 0.70
is_integerFunction · 0.70
TypeErrorFunction · 0.70
sizeMethod · 0.45
idMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected