| 249 | /// native types or support operator +=. |
| 250 | template<typename MAP_TYPE> |
| 251 | void 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 |
no test coverage detected