OmniSciDB  dfae7c3b14
ArrowUtil.h File Reference
#include <arrow/status.h>
#include <arrow/util/macros.h>
#include <stdexcept>
#include "DataMgr/BufferMgr/BufferMgr.h"
#include "Shared/likely.h"
+ Include dependency graph for ArrowUtil.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ARROW_THROW_NOT_OK(s)
 
#define ARROW_THROW_IF(condition, status)
 
#define ARROW_ASSIGN_OR_THROW_IMPL(result_name, lhs, rexpr)
 
#define ARROW_ASSIGN_OR_THROW_NAME(x, y)   ARROW_CONCAT(x, y)
 
#define ARROW_ASSIGN_OR_THROW(lhs, rexpr)
 

Functions

void arrow_status_throw (const ::arrow::Status &s)
 

Macro Definition Documentation

◆ ARROW_ASSIGN_OR_THROW

#define ARROW_ASSIGN_OR_THROW (   lhs,
  rexpr 
)

◆ ARROW_ASSIGN_OR_THROW_IMPL

#define ARROW_ASSIGN_OR_THROW_IMPL (   result_name,
  lhs,
  rexpr 
)
Value:
auto result_name = (rexpr); \
ARROW_THROW_NOT_OK((result_name).status()); \
lhs = std::move(result_name).MoveValueUnsafe();

Definition at line 53 of file ArrowUtil.h.

◆ ARROW_ASSIGN_OR_THROW_NAME

#define ARROW_ASSIGN_OR_THROW_NAME (   x,
 
)    ARROW_CONCAT(x, y)

Definition at line 58 of file ArrowUtil.h.

◆ ARROW_THROW_IF

#define ARROW_THROW_IF (   condition,
  status 
)
Value:
do { \
if (ARROW_PREDICT_FALSE(condition)) { \
ARROW_THROW_NOT_OK(status); \
} \
} while (0)

Definition at line 46 of file ArrowUtil.h.

◆ ARROW_THROW_NOT_OK

Function Documentation

◆ arrow_status_throw()

void arrow_status_throw ( const ::arrow::Status &  s)
inline

Definition at line 26 of file ArrowUtil.h.

26  {
27  std::string message = s.ToString();
28  switch (s.code()) {
29  case ::arrow::StatusCode::OutOfMemory:
30  throw OutOfMemory(message);
31  default:
32  throw std::runtime_error(message);
33  }
34 }