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

Function JoinKeysAndValuesIterator

be/src/gutil/strings/join.h:139–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137// Join the keys and values of a map using the specified delimiters.
138template<typename ITERATOR>
139void JoinKeysAndValuesIterator(const ITERATOR& start,
140 const ITERATOR& end,
141 const StringPiece& intra_delim,
142 const StringPiece& inter_delim,
143 string *result) {
144 result->clear();
145 for (ITERATOR iter = start; iter != end; ++iter) {
146 if (iter == start) {
147 StrAppend(result, iter->first, intra_delim, iter->second);
148 } else {
149 StrAppend(result, inter_delim, iter->first, intra_delim, iter->second);
150 }
151 }
152}
153
154template <typename ITERATOR>
155string JoinKeysAndValuesIterator(const ITERATOR& start,

Callers 3

JoinMapKeysAndValuesFunction · 0.85
JoinVectorKeysAndValuesFunction · 0.85
JoinHashMapKeysAndValuesFunction · 0.85

Calls 2

StrAppendFunction · 0.85
clearMethod · 0.65

Tested by

no test coverage detected