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

Method Load

cpp/src/parquet/thrift_internal.h:192–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190
191 template <typename ThriftType>
192 inline static ApiTypeEnum Load(const ThriftType* in) {
193 const auto raw_value = LoadRaw(in);
194 if constexpr (std::is_unsigned_v<ApiTypeRawEnum>) {
195 if (ARROW_PREDICT_FALSE(raw_value >=
196 static_cast<ApiTypeRawEnum>(ApiType::UNDEFINED))) {
197 return ApiType::UNDEFINED;
198 }
199 } else {
200 if (ARROW_PREDICT_FALSE(raw_value >=
201 static_cast<ApiTypeRawEnum>(ApiType::UNDEFINED) ||
202 raw_value < 0)) {
203 return ApiType::UNDEFINED;
204 }
205 }
206 return FromThriftUnsafe(static_cast<ThriftType>(raw_value));
207 }
208};
209
210} // namespace internal

Callers

nothing calls this directly

Calls 1

FromThriftUnsafeFunction · 0.85

Tested by

no test coverage detected