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

Function MakeMapType

cpp/src/arrow/scalar.cc:679–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679inline std::shared_ptr<DataType> MakeMapType(const std::shared_ptr<DataType>& pair_type) {
680 ARROW_CHECK_EQ(pair_type->id(), Type::STRUCT);
681 ARROW_CHECK_EQ(pair_type->num_fields(), 2);
682 return map(pair_type->field(0)->type(), pair_type->field(1)->type());
683}
684
685MapScalar::MapScalar(std::shared_ptr<Array> value, bool is_valid)
686 : MapScalar(value, MakeMapType(value->type()), is_valid) {}

Callers 1

MapScalarMethod · 0.85

Calls 5

mapFunction · 0.85
idMethod · 0.45
num_fieldsMethod · 0.45
typeMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected