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

Function DictionaryInt32Encode

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

Source from the content-addressed store, hash-verified

221// --------------------------------------------------------------------------
222
223string DictionaryInt32Encode(const unordered_map<string, int32>* dictionary) {
224 vector<string> entries;
225 for (const auto& entry : *dictionary) {
226 entries.push_back(StringPrintf("%s:%d", entry.first.c_str(), entry.second));
227 }
228
229 string result;
230 JoinStrings(entries, ",", &result);
231 return result;
232}
233
234string DictionaryInt64Encode(const unordered_map<string, int64>* dictionary) {
235 vector<string> entries;

Callers

nothing calls this directly

Calls 3

StringPrintfFunction · 0.85
JoinStringsFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected