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

Function DictionaryInt64Decode

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

Source from the content-addressed store, hash-verified

288}
289
290bool DictionaryInt64Decode(unordered_map<string, int64>* dictionary,
291 const string& encoded_str) {
292 vector<pair<string, string> > items;
293 if (!DictionaryParse(encoded_str, &items))
294 return false;
295
296 dictionary->clear();
297 for (const auto& item : items) {
298 char *error = nullptr;
299 const int64 value = strto64(item.second.c_str(), &error, 0);
300 if (error == item.second.c_str() || *error != '\0') {
301 // parsing error
302 return false;
303 }
304 (*dictionary)[item.first] = value;
305 }
306 return true;
307}
308
309
310bool DictionaryDoubleDecode(unordered_map<string, double>* dictionary,

Callers

nothing calls this directly

Calls 3

DictionaryParseFunction · 0.85
strto64Function · 0.85
clearMethod · 0.65

Tested by

no test coverage detected