OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ArrowResultSet.h File Reference
#include "CompilationOptions.h"
#include "DataMgr/DataMgr.h"
#include "Descriptors/RelAlgExecutionDescriptor.h"
#include "ResultSet.h"
#include "TargetMetaInfo.h"
#include "TargetValue.h"
#include <type_traits>
#include "arrow/api.h"
#include "arrow/ipc/api.h"
+ Include dependency graph for ArrowResultSet.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ArrowResultSetRowIterator
 
struct  ArrowResult
 
class  ArrowResultSet
 
class  ArrowResultSetConverter
 
struct  ArrowResultSetConverter::SerializedArrowOutput
 
struct  ArrowResultSetConverter::ColumnBuilder
 

Typedefs

using ValueArray = boost::variant< std::vector< bool >, std::vector< int8_t >, std::vector< int16_t >, std::vector< int32_t >, std::vector< int64_t >, std::vector< float >, std::vector< double >, std::vector< std::string >>
 

Functions

std::unique_ptr< ArrowResultSetresult_set_arrow_loopback (const ExecutionResult &results)
 
std::unique_ptr< ArrowResultSetresult_set_arrow_loopback (const ExecutionResult *results, const std::shared_ptr< ResultSet > &rows)
 
template<typename T >
constexpr auto scale_epoch_values ()
 

Typedef Documentation

using ValueArray = boost::variant<std::vector<bool>, std::vector<int8_t>, std::vector<int16_t>, std::vector<int32_t>, std::vector<int64_t>, std::vector<float>, std::vector<double>, std::vector<std::string>>

Definition at line 39 of file ArrowResultSet.h.

Function Documentation

std::unique_ptr<ArrowResultSet> result_set_arrow_loopback ( const ExecutionResult results)

Definition at line 234 of file ArrowResultSet.cpp.

References ExecutionResult::getRows(), and ExecutionResult::getTargetsMeta().

235  {
236  // NOTE(wesm): About memory ownership
237 
238  // After calling ReadRecordBatch, the buffers inside arrow::RecordBatch now
239  // share ownership of the memory in serialized_arrow_output.records (zero
240  // copy). Not necessary to retain these buffers. Same is true of any
241  // dictionaries contained in serialized_arrow_output.schema; the arrays
242  // reference that memory (zero copy).
243  return std::make_unique<ArrowResultSet>(results.getRows(), results.getTargetsMeta());
244 }
const std::vector< TargetMetaInfo > & getTargetsMeta() const
const std::shared_ptr< ResultSet > & getRows() const

+ Here is the call graph for this function:

std::unique_ptr<ArrowResultSet> result_set_arrow_loopback ( const ExecutionResult results,
const std::shared_ptr< ResultSet > &  rows 
)

Definition at line 246 of file ArrowResultSet.cpp.

References ExecutionResult::getTargetsMeta().

248  {
249  return results ? std::make_unique<ArrowResultSet>(rows, results->getTargetsMeta())
250  : std::make_unique<ArrowResultSet>(rows);
251 }
const std::vector< TargetMetaInfo > & getTargetsMeta() const

+ Here is the call graph for this function:

template<typename T >
constexpr auto scale_epoch_values ( )

Definition at line 242 of file ArrowResultSet.h.

242  {
243  return std::is_same<T, arrow::Date32Builder>::value ||
244  std::is_same<T, arrow::Date64Builder>::value;
245 }