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

Method ToPair

be/src/gutil/strings/split_internal.h:366–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364 // will be empty strings if the iterator doesn't have a corresponding value.
365 template <typename First, typename Second>
366 std::pair<First, Second> ToPair() {
367 StringPieceTo<First> first_converter;
368 StringPieceTo<Second> second_converter;
369 StringPiece first, second;
370 Iterator it = begin();
371 if (it != end()) {
372 first = *it;
373 if (++it != end()) {
374 second = *it;
375 }
376 }
377 return std::make_pair(first_converter(first), second_converter(second));
378 }
379
380 // Overloaded InsertInMap() function. The first overload is the commonly used
381 // one for most map-like objects. The second overload is a special case for

Callers

nothing calls this directly

Calls 1

endFunction · 0.85

Tested by

no test coverage detected