OmniSciDB  bf83d84833
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

#define ARROW_ASSIGN_OR_THROW (   lhs,
  rexpr 
)
Value:
ARROW_ASSIGN_OR_THROW_NAME(_error_or_value, __COUNTER__), lhs, rexpr);
#define ARROW_ASSIGN_OR_THROW_IMPL(result_name, lhs, rexpr)
Definition: ArrowUtil.h:53
#define ARROW_ASSIGN_OR_THROW_NAME(x, y)
Definition: ArrowUtil.h:58

Definition at line 60 of file ArrowUtil.h.

Referenced by ArrowResultSetConverter::getArrowResult(), ArrowResultSetConverter::getSerializedArrowOutput(), anonymous_namespace{DBHandler.cpp}::loadArrowStream(), and ArrowResultSet::resultSetArrowLoopback().

#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();
#define ARROW_THROW_NOT_OK(s)
Definition: ArrowUtil.h:36

Definition at line 53 of file ArrowUtil.h.

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

Definition at line 58 of file ArrowUtil.h.

#define ARROW_THROW_IF (   condition,
  status 
)
Value:
do { \
if (ARROW_PREDICT_FALSE(condition)) { \
} \
} while (0)
#define ARROW_THROW_NOT_OK(s)
Definition: ArrowUtil.h:36

Definition at line 46 of file ArrowUtil.h.

Function Documentation

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 }