| 1985 | } |
| 1986 | |
| 1987 | Status ReadDictionary(const JsonObject& obj, MemoryPool* pool, |
| 1988 | DictionaryMemo* dictionary_memo) { |
| 1989 | ARROW_ASSIGN_OR_RAISE(int64_t dictionary_id, GetMemberInt<int64_t>(obj, "id")); |
| 1990 | |
| 1991 | ARROW_ASSIGN_OR_RAISE(const auto batch_obj, GetMemberObject(obj, "data")); |
| 1992 | |
| 1993 | ARROW_ASSIGN_OR_RAISE(auto value_type, |
| 1994 | dictionary_memo->GetDictionaryType(dictionary_id)); |
| 1995 | |
| 1996 | ARROW_ASSIGN_OR_RAISE(const int64_t num_rows, |
| 1997 | GetMemberInt<int64_t>(batch_obj, "count")); |
| 1998 | ARROW_ASSIGN_OR_RAISE(const auto json_columns, GetMemberArray(batch_obj, "columns")); |
| 1999 | if (json_columns.size() != 1) { |
| 2000 | return Status::Invalid("Dictionary batch must contain only one column"); |
| 2001 | } |
| 2002 | |
| 2003 | ARROW_ASSIGN_OR_RAISE( |
| 2004 | auto column, internal::ResolveSimdjsonResult(json_columns.at(0), |
nothing calls this directly
no outgoing calls
no test coverage detected