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

Function GetOneOrNone

cpp/src/arrow/type.h:2281–2287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2279 /// Return nullptr if none match, emit an error if multiple match.
2280 template <typename T>
2281 Result<GetType<T>> GetOneOrNone(const T& root) const {
2282 ARROW_ASSIGN_OR_RAISE(auto match, FindOneOrNone(root));
2283 if (match.empty()) {
2284 return static_cast<GetType<T>>(NULLPTR);
2285 }
2286 return match.Get(root).ValueOrDie();
2287 }
2288 /// \brief Get the single child matching this FieldRef.
2289 ///
2290 /// Return nullptr if none match, emit an error if multiple match.

Callers

nothing calls this directly

Calls 3

ValueOrDieMethod · 0.80
emptyMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected