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

Function GetMemberArray

cpp/src/arrow/integration/json_internal.cc:908–918  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906}
907
908Result<const RjArray> GetMemberArray(const RjObject& obj, const std::string& key,
909 bool allow_absent = false) {
910 static const auto empty_array = rj::Value(rj::kArrayType);
911
912 const auto& it = obj.FindMember(key);
913 if (allow_absent && it == obj.MemberEnd()) {
914 return empty_array.GetArray();
915 }
916 RETURN_NOT_ARRAY(key, it, obj);
917 return it->value.GetArray();
918}
919
920Result<TimeUnit::type> GetMemberTimeUnit(const RjObject& obj, const std::string& key) {
921 ARROW_ASSIGN_OR_RAISE(const auto unit_str, GetMemberString(obj, key));

Callers 2

json_internal.ccFile · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.85

Calls 2

ValueFunction · 0.50
GetArrayMethod · 0.45

Tested by

no test coverage detected