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

Method ValidateDenseUnion

cpp/src/arrow/scalar.cc:458–467  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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