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

Function MergeMapValues

be/src/util/container-util.h:251–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249/// native types or support operator +=.
250template<typename MAP_TYPE>
251void MergeMapValues(const MAP_TYPE& src, MAP_TYPE* dst) {
252 for (typename MAP_TYPE::const_iterator src_it = src.begin();
253 src_it != src.end(); ++src_it) {
254 typename MAP_TYPE::iterator dst_it = dst->find(src_it->first);
255 if (dst_it == dst->end()) {
256 (*dst)[src_it->first] = src_it->second;
257 } else {
258 dst_it->second += src_it->second;
259 }
260 }
261}
262
263} // end namespace impala
264

Callers 3

MergeDmlStatsMethod · 0.85
ConstructReportMethod · 0.85
MergeMethod · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected