OmniSciDB
a5dc49c757
|
#include <ArrowResultSet.h>
Public Member Functions | |
ArrowResultSet (const std::shared_ptr< ResultSet > &rows, const std::vector< TargetMetaInfo > &targets_meta, const ExecutorDeviceType device_type=ExecutorDeviceType::CPU) | |
ArrowResultSet (const std::shared_ptr< ResultSet > &rows, const std::vector< TargetMetaInfo > &targets_meta, const ExecutorDeviceType device_type, const size_t min_result_size_for_bulk_dictionary_fetch, const double max_dictionary_to_result_size_ratio_for_bulk_dictionary_fetch) | |
ArrowResultSet (const std::shared_ptr< ResultSet > &rows, const ExecutorDeviceType device_type=ExecutorDeviceType::CPU) | |
std::vector< TargetValue > | getRowAt (const size_t index) const |
std::vector< TargetValue > | getNextRow (const bool translate_strings, const bool decimal_to_double) const |
size_t | colCount () const |
SQLTypeInfo | getColType (const size_t col_idx) const |
bool | definitelyHasNoRows () const |
size_t | rowCount () const |
size_t | entryCount () const |
bool | isEmpty () const |
Static Public Member Functions | |
static void | deallocateArrowResultBuffer (const ArrowResult &result, const ExecutorDeviceType device_type, const size_t device_id, std::shared_ptr< Data_Namespace::DataMgr > &data_mgr) |
Public Attributes | |
device_type | |
Private Member Functions | |
void | resultSetArrowLoopback (const ExecutorDeviceType device_type=ExecutorDeviceType::CPU) |
void | resultSetArrowLoopback (const ExecutorDeviceType device_type, const size_t min_result_size_for_bulk_dictionary_fetch, const double max_dictionary_to_result_size_ratio_for_bulk_dictionary_fetch) |
template<typename Type , typename ArrayType > | |
void | appendValue (std::vector< TargetValue > &row, const arrow::Array &column, const Type null_val, const size_t idx) const |
Private Attributes | |
std::shared_ptr< ArrowResult > | results_ |
std::shared_ptr< ResultSet > | rows_ |
std::vector< TargetMetaInfo > | targets_meta_ |
std::shared_ptr < arrow::RecordBatch > | record_batch_ |
arrow::ipc::DictionaryMemo | dictionary_memo_ |
std::vector< std::shared_ptr < arrow::Array > > | columns_ |
size_t | crt_row_idx_ |
std::vector< TargetMetaInfo > | column_metainfo_ |
Definition at line 108 of file ArrowResultSet.h.
ArrowResultSet::ArrowResultSet | ( | const std::shared_ptr< ResultSet > & | rows, |
const std::vector< TargetMetaInfo > & | targets_meta, | ||
const ExecutorDeviceType | device_type = ExecutorDeviceType::CPU |
||
) |
Definition at line 74 of file ArrowResultSet.cpp.
References column_metainfo_, columns_, field(), record_batch_, resultSetArrowLoopback(), and anonymous_namespace{ArrowResultSet.cpp}::type_from_arrow_field().
ArrowResultSet::ArrowResultSet | ( | const std::shared_ptr< ResultSet > & | rows, |
const std::vector< TargetMetaInfo > & | targets_meta, | ||
const ExecutorDeviceType | device_type, | ||
const size_t | min_result_size_for_bulk_dictionary_fetch, | ||
const double | max_dictionary_to_result_size_ratio_for_bulk_dictionary_fetch | ||
) |
Definition at line 88 of file ArrowResultSet.cpp.
References column_metainfo_, columns_, field(), record_batch_, resultSetArrowLoopback(), and anonymous_namespace{ArrowResultSet.cpp}::type_from_arrow_field().
|
inline |
Definition at line 121 of file ArrowResultSet.h.
|
private |
Definition at line 108 of file ArrowResultSet.cpp.
size_t ArrowResultSet::colCount | ( | ) | const |
Definition at line 245 of file ArrowResultSet.cpp.
References column_metainfo_.
|
static |
Definition at line 1212 of file ArrowResultSetConverter.cpp.
References CHECK_EQ, CPU, ArrowResult::df_handle, ArrowResult::df_size, ArrowResult::sm_handle, ArrowResult::sm_size, and to_string().
Referenced by DBHandler::deallocate_df().
bool ArrowResultSet::definitelyHasNoRows | ( | ) | const |
Definition at line 254 of file ArrowResultSet.cpp.
References rowCount().
size_t ArrowResultSet::entryCount | ( | ) | const |
Definition at line 264 of file ArrowResultSet.cpp.
References rowCount().
SQLTypeInfo ArrowResultSet::getColType | ( | const size_t | col_idx | ) | const |
Definition at line 249 of file ArrowResultSet.cpp.
References CHECK_LT, and column_metainfo_.
Referenced by getRowAt().
std::vector< TargetValue > ArrowResultSet::getNextRow | ( | const bool | translate_strings, |
const bool | decimal_to_double | ||
) | const |
Definition at line 234 of file ArrowResultSet.cpp.
References CHECK_LT, crt_row_idx_, getRowAt(), and rowCount().
std::vector< TargetValue > ArrowResultSet::getRowAt | ( | const size_t | index | ) | const |
Definition at line 142 of file ArrowResultSet.cpp.
References CHECK, CHECK_EQ, CHECK_LT, columns_, getColType(), inline_fp_null_value< double >(), inline_fp_null_value< float >(), inline_int_null_val(), kBIGINT, kDATE, kDOUBLE, kENCODING_DICT, kFLOAT, kINT, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, record_batch_, and rowCount().
Referenced by getNextRow(), and ArrowResultSetRowIterator::operator*().
bool ArrowResultSet::isEmpty | ( | ) | const |
Definition at line 270 of file ArrowResultSet.cpp.
References rowCount().
|
private |
Definition at line 274 of file ArrowResultSet.cpp.
References ArrowResultSetConverter::default_min_result_size_for_bulk_dictionary_fetch.
Referenced by ArrowResultSet().
|
private |
Definition at line 282 of file ArrowResultSet.cpp.
References ARROW_ASSIGN_OR_THROW, ARROW_THROW_NOT_OK, CHECK_EQ, device_type, dictionary_memo_, record_batch_, results_, rows_, targets_meta_, to_string(), and WIRE.
size_t ArrowResultSet::rowCount | ( | ) | const |
Definition at line 258 of file ArrowResultSet.cpp.
References record_batch_.
Referenced by definitelyHasNoRows(), entryCount(), getNextRow(), getRowAt(), and isEmpty().
|
private |
Definition at line 190 of file ArrowResultSet.h.
Referenced by ArrowResultSet(), colCount(), and getColType().
|
private |
Definition at line 188 of file ArrowResultSet.h.
Referenced by ArrowResultSet(), and getRowAt().
|
mutableprivate |
Definition at line 189 of file ArrowResultSet.h.
Referenced by getNextRow().
ArrowResultSet::device_type |
Definition at line 123 of file ArrowResultSet.h.
Referenced by resultSetArrowLoopback().
|
private |
Definition at line 184 of file ArrowResultSet.h.
Referenced by resultSetArrowLoopback().
|
private |
Definition at line 183 of file ArrowResultSet.h.
Referenced by ArrowResultSet(), getRowAt(), resultSetArrowLoopback(), and rowCount().
|
private |
Definition at line 180 of file ArrowResultSet.h.
Referenced by resultSetArrowLoopback().
|
private |
Definition at line 181 of file ArrowResultSet.h.
Referenced by resultSetArrowLoopback().
|
private |
Definition at line 182 of file ArrowResultSet.h.
Referenced by resultSetArrowLoopback().