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

Function DictExtensionFromJSON

cpp/src/arrow/array/array_dict_test.cc:59–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59std::shared_ptr<Array> DictExtensionFromJSON(const std::shared_ptr<DataType>& type,
60 const std::string& json) {
61 auto ext_type = checked_pointer_cast<ExtensionType>(type);
62 auto storage = ArrayFromJSON(ext_type->storage_type(), json);
63 auto ext_data = storage->data()->Copy();
64 ext_data->type = ext_type;
65 return MakeArray(ext_data);
66}
67
68// ----------------------------------------------------------------------
69// Dictionary tests

Callers 1

TESTFunction · 0.85

Calls 5

ArrayFromJSONFunction · 0.85
storage_typeMethod · 0.80
MakeArrayFunction · 0.70
CopyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected