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

Function ValidateEnumValue

cpp/src/arrow/compute/function_internal.h:69–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68template <typename Enum, typename CType = typename std::underlying_type<Enum>::type>
69Result<Enum> ValidateEnumValue(CType raw) {
70 for (auto valid : EnumTraits<Enum>::values()) {
71 if (raw == static_cast<CType>(valid)) {
72 return static_cast<Enum>(raw);
73 }
74 }
75 return Status::Invalid("Invalid value for ", EnumTraits<Enum>::name(), ": ", raw);
76}
77
78class ARROW_EXPORT GenericOptionsType : public FunctionOptionsType {
79 public:

Callers

nothing calls this directly

Calls 3

valuesFunction · 0.50
InvalidFunction · 0.50
nameFunction · 0.50

Tested by

no test coverage detected