| 2223 | /// will be returned if none match. |
| 2224 | template <typename T> |
| 2225 | Result<FieldPath> FindOneOrNone(const T& root) const { |
| 2226 | auto matches = FindAll(root); |
| 2227 | ARROW_RETURN_NOT_OK(CheckNonMultiple(matches, root)); |
| 2228 | if (matches.empty()) { |
| 2229 | return FieldPath(); |
| 2230 | } |
| 2231 | return std::move(matches[0]); |
| 2232 | } |
| 2233 | |
| 2234 | template <typename T> |
| 2235 | using GetType = decltype(std::declval<FieldPath>().Get(std::declval<T>()).ValueOrDie()); |
nothing calls this directly
no test coverage detected