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

Method ValidateDenseUnion

cpp/src/arrow/scalar.cc:456–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454 }
455
456 Status ValidateDenseUnion(const DenseUnionScalar& s, int child_id) {
457 const auto& union_type = checked_cast<const DenseUnionType&>(*s.type);
458 const auto& field_type = *union_type.field(child_id)->type();
459 if (!field_type.Equals(*s.value->type)) {
460 return Status::Invalid(s.type->ToString(), " scalar with type code ", s.type_code,
461 " should have an underlying value of type ",
462 field_type.ToString(), ", got ", s.value->type->ToString());
463 }
464 return ValidateValue(s, *s.value);
465 }
466
467 Status ValidateSparseUnion(const SparseUnionScalar& s) {
468 const auto& union_type = checked_cast<const SparseUnionType&>(*s.type);

Callers

nothing calls this directly

Calls 5

InvalidFunction · 0.70
typeMethod · 0.45
fieldMethod · 0.45
EqualsMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected