MCPcopy Create free account
hub / github.com/apache/impala / DictionaryParse

Function DictionaryParse

be/src/gutil/strings/serialize.cc:257–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257bool DictionaryParse(const string& encoded_str,
258 vector<pair<string, string> >* items) {
259 vector<string> entries;
260 SplitStringUsing(encoded_str, ",", &entries);
261 for (const auto& entry : entries) {
262 vector<string> fields;
263 SplitStringAllowEmpty(entry, ":", &fields);
264 if (fields.size() != 2) // parsing error
265 return false;
266 items->push_back(make_pair(fields[0], fields[1]));
267 }
268 return true;
269}
270
271bool DictionaryInt32Decode(unordered_map<string, int32>* dictionary,
272 const string& encoded_str) {

Callers 3

DictionaryInt32DecodeFunction · 0.85
DictionaryInt64DecodeFunction · 0.85
DictionaryDoubleDecodeFunction · 0.85

Calls 4

SplitStringUsingFunction · 0.85
SplitStringAllowEmptyFunction · 0.85
push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected