MCPcopy Create free account
hub / github.com/apache/arrow / CreateNameToIndexMap

Function CreateNameToIndexMap

cpp/src/arrow/type.cc:1333–1340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1331namespace {
1332
1333std::unordered_multimap<std::string_view, int> CreateNameToIndexMap(
1334 const FieldVector& fields) {
1335 std::unordered_multimap<std::string_view, int> name_to_index;
1336 for (size_t i = 0; i < fields.size(); ++i) {
1337 name_to_index.emplace(fields[i]->name(), static_cast<int>(i));
1338 }
1339 return name_to_index;
1340}
1341
1342template <int NotFoundValue = -1, int DuplicateFoundValue = -1>
1343int LookupNameIndex(const std::unordered_multimap<std::string_view, int>& name_to_index,

Callers 3

ImplMethod · 0.85
ImplMethod · 0.85
ImplMethod · 0.85

Calls 2

sizeMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected