OmniSciDB  5ade3759e0
ArrowResultSet.cpp File Reference
#include "ArrowResultSet.h"
#include "ArrowUtil.h"
#include "Descriptors/RelAlgExecutionDescriptor.h"
#include <arrow/api.h>
#include <arrow/io/memory.h>
#include <arrow/ipc/api.h>
+ Include dependency graph for ArrowResultSet.cpp:

Go to the source code of this file.

Namespaces

 anonymous_namespace{ArrowResultSet.cpp}
 

Functions

SQLTypeInfo anonymous_namespace{ArrowResultSet.cpp}::type_from_arrow_field (const arrow::Field &field)
 
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)
 

Function Documentation

◆ result_set_arrow_loopback() [1/2]

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().

Referenced by anonymous_namespace{TopKTest.cpp}::SQLiteComparator::compare_arrow_output(), anonymous_namespace{ExecuteTest.cpp}::SQLiteComparator::compare_arrow_output(), and ArrowResultSetRowIterator::operator*().

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::shared_ptr< ResultSet > & getRows() const
const std::vector< TargetMetaInfo > & getTargetsMeta() const
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ result_set_arrow_loopback() [2/2]

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: