2525#include " iceberg/error.h"
2626#include " iceberg/expected.h"
2727
28- namespace iceberg ::arrow::internal {
28+ namespace iceberg ::arrow {
2929
3030inline ErrorKind ToErrorKind (const ::arrow::Status& status) {
3131 switch (status.code ()) {
@@ -44,18 +44,17 @@ inline ErrorKind ToErrorKind(const ::arrow::Status& status) {
4444 } \
4545 lhs = std::move(result_name).ValueOrDie();
4646
47- #define ICEBERG_ARROW_ASSIGN_OR_RETURN (lhs, rexpr ) \
48- ICEBERG_ARROW_ASSIGN_OR_RETURN_IMPL ( \
49- ARROW_ASSIGN_OR_RAISE_NAME (_error_or_value, __COUNTER__), lhs, rexpr, \
50- internal::ToErrorKind)
51-
52- #define ICEBERG_ARROW_RETURN_NOT_OK (expr ) \
53- do { \
54- auto && _status = (expr); \
55- if (!_status.ok ()) { \
56- return unexpected<Error>{ \
57- {.kind = internal::ToErrorKind (_status), .message = _status.ToString ()}}; \
58- } \
47+ #define ICEBERG_ARROW_ASSIGN_OR_RETURN (lhs, rexpr ) \
48+ ICEBERG_ARROW_ASSIGN_OR_RETURN_IMPL ( \
49+ ARROW_ASSIGN_OR_RAISE_NAME (_error_or_value, __COUNTER__), lhs, rexpr, ToErrorKind)
50+
51+ #define ICEBERG_ARROW_RETURN_NOT_OK (expr ) \
52+ do { \
53+ auto && _status = (expr); \
54+ if (!_status.ok ()) { \
55+ return unexpected<Error>{ \
56+ {.kind = ToErrorKind (_status), .message = _status.ToString ()}}; \
57+ } \
5958 } while (0 )
6059
61- } // namespace iceberg::arrow::internal
60+ } // namespace iceberg::arrow
0 commit comments