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

Function ParseDictionary

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

Source from the content-addressed store, hash-verified

1216}
1217
1218Status ParseDictionary(const RjObject& obj, int64_t* id, bool* is_ordered,
1219 std::shared_ptr<DataType>* index_type) {
1220 ARROW_ASSIGN_OR_RAISE(*id, GetMemberInt<int64_t>(obj, "id"));
1221 ARROW_ASSIGN_OR_RAISE(*is_ordered, GetMemberBool(obj, "isOrdered"));
1222
1223 ARROW_ASSIGN_OR_RAISE(const auto json_index_type, GetMemberObject(obj, "indexType"));
1224
1225 ARROW_ASSIGN_OR_RAISE(const auto type_name, GetMemberString(json_index_type, "name"));
1226 if (type_name != "int") {
1227 return Status::Invalid("Dictionary indices can only be integers");
1228 }
1229 return GetInteger(json_index_type).Value(index_type);
1230}
1231

Callers 1

ARROW_ASSIGN_OR_RAISEFunction · 0.85

Calls 2

GetMemberBoolFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70

Tested by

no test coverage detected