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

Method Resolve

cpp/src/arrow/util/dispatch_internal.h:80–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 // Use the Implementation with the highest DispatchLevel
79 template <typename Range>
80 void Resolve(const Range& implementations) {
81 Implementation cur{DispatchLevel::NONE, {}};
82
83 for (const auto& impl : implementations) {
84 if (impl.first >= cur.first && IsSupported(impl.first)) {
85 // Higher (or same) level than current
86 cur = impl;
87 }
88 }
89
90 if (!cur.second) {
91 Status::Invalid("No appropriate implementation found").Abort();
92 }
93 func = cur.second;
94 }
95
96 private:
97 bool IsSupported(DispatchLevel level) const {

Callers

nothing calls this directly

Calls 2

InvalidFunction · 0.50
AbortMethod · 0.45

Tested by

no test coverage detected