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

Function GetMemberArray

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

Source from the content-addressed store, hash-verified

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