17 #ifndef QUERYENGINE_ARROW_UTIL_H
18 #define QUERYENGINE_ARROW_UTIL_H
20 #include <arrow/status.h>
21 #include <arrow/util/macros.h>
27 std::string message = s.ToString();
29 case ::arrow::StatusCode::OutOfMemory:
32 throw std::runtime_error(message);
36 #define ARROW_THROW_NOT_OK(s) \
38 ::arrow::Status _s = (s); \
39 if (UNLIKELY(!_s.ok())) { \
40 arrow_status_throw(_s); \
46 #define ARROW_THROW_IF(condition, status) \
48 if (ARROW_PREDICT_FALSE(condition)) { \
49 ARROW_THROW_NOT_OK(status); \
53 #define ARROW_ASSIGN_OR_THROW_IMPL(result_name, lhs, rexpr) \
54 auto result_name = (rexpr); \
55 ARROW_THROW_NOT_OK((result_name).status()); \
56 lhs = std::move(result_name).MoveValueUnsafe();
58 #define ARROW_ASSIGN_OR_THROW_NAME(x, y) ARROW_CONCAT(x, y)
60 #define ARROW_ASSIGN_OR_THROW(lhs, rexpr) \
61 ARROW_ASSIGN_OR_THROW_IMPL( \
62 ARROW_ASSIGN_OR_THROW_NAME(_error_or_value, __COUNTER__), lhs, rexpr);
64 #endif // QUERYENGINE_ARROW_UTIL_H
This file includes the class specification for the buffer manager (BufferMgr), and related data struc...
void arrow_status_throw(const ::arrow::Status &s)