OmniSciDB
a5dc49c757
|
Utility functions for easy access to the result set buffers. More...
#include "BufferCompaction.h"
#include "Shared/SqlTypesLayout.h"
#include "Shared/misc.h"
#include "TypePunning.h"
#include "Descriptors/QueryMemoryDescriptor.h"
#include <algorithm>
Go to the source code of this file.
Functions | |
bool | is_real_str_or_array (const TargetInfo &target_info) |
size_t | get_slots_for_geo_target (const TargetInfo &target_info, const bool separate_varlen_storage) |
size_t | get_slots_for_target (const TargetInfo &target_info, const bool separate_varlen_storage) |
size_t | advance_slot (const size_t j, const TargetInfo &target_info, const bool separate_varlen_storage) |
size_t | slot_offset_rowwise (const size_t entry_idx, const size_t slot_idx, const size_t key_count, const size_t slot_count) |
size_t | slot_offset_colwise (const size_t entry_idx, const size_t slot_idx, const size_t key_count, const size_t entry_count) |
size_t | key_offset_rowwise (const size_t entry_idx, const size_t key_count, const size_t slot_count) |
size_t | key_offset_colwise (const size_t entry_idx, const size_t key_idx, const size_t entry_count) |
template<class T > | |
T | advance_to_next_columnar_target_buff (T target_ptr, const QueryMemoryDescriptor &query_mem_desc, const size_t target_slot_idx) |
template<class T > | |
T | get_cols_ptr (T buff, const QueryMemoryDescriptor &query_mem_desc) |
size_t | get_key_bytes_rowwise (const QueryMemoryDescriptor &query_mem_desc) |
size_t | get_row_bytes (const QueryMemoryDescriptor &query_mem_desc) |
template<class T > | |
T | row_ptr_rowwise (T buff, const QueryMemoryDescriptor &query_mem_desc, const size_t entry_idx) |
template<class T > | |
T | advance_target_ptr_row_wise (T target_ptr, const TargetInfo &target_info, const size_t slot_idx, const QueryMemoryDescriptor &query_mem_desc, const bool separate_varlen_storage) |
template<class T > | |
T | advance_target_ptr_col_wise (T target_ptr, const TargetInfo &target_info, const size_t slot_idx, const QueryMemoryDescriptor &query_mem_desc, const bool separate_varlen_storage) |
size_t | get_slot_off_quad (const QueryMemoryDescriptor &query_mem_desc) |
double | pair_to_double (const std::pair< int64_t, int64_t > &fp_pair, const SQLTypeInfo &ti, const bool float_argument_input) |
int64_t | null_val_bit_pattern (const SQLTypeInfo &ti, const bool float_argument_input) |
int64_t | read_int_from_buff (const int8_t *ptr, const int8_t compact_sz) |
Utility functions for easy access to the result set buffers.
Definition in file ResultSetBufferAccessors.h.
|
inline |
Definition at line 75 of file ResultSetBufferAccessors.h.
References get_slots_for_geo_target(), get_slots_for_target(), SQLTypeInfo::is_geometry(), and TargetInfo::sql_type.
Referenced by anonymous_namespace{ResultSetIteration.cpp}::advance_col_buff_to_slot(), ResultSet::eachCellInColumn(), get_heap_key_slot_index(), ResultSet::getSlotIndicesForTargetIndices(), ResultSet::RowWiseTargetAccessor::initializeOffsetsForStorage(), ResultSet::ColumnWiseTargetAccessor::initializeOffsetsForStorage(), ResultSetReductionJIT::reduceOneEntryBaseline(), ResultSetStorage::reduceOneEntrySlotsBaseline(), and ResultSetStorage::rewriteAggregateBufferOffsets().
|
inline |
Definition at line 170 of file ResultSetBufferAccessors.h.
References advance_to_next_columnar_target_buff(), TargetInfo::agg_kind, SQLTypeInfo::get_physical_coord_cols(), TargetInfo::is_agg, SQLTypeInfo::is_geometry(), is_real_str_or_array(), kAVG, run_benchmark_import::result, and TargetInfo::sql_type.
|
inline |
Definition at line 148 of file ResultSetBufferAccessors.h.
References TargetInfo::agg_kind, SQLTypeInfo::get_physical_coord_cols(), QueryMemoryDescriptor::getPaddedSlotWidthBytes(), TargetInfo::is_agg, SQLTypeInfo::is_geometry(), is_real_str_or_array(), kAVG, run_benchmark_import::result, QueryMemoryDescriptor::slotIsVarlenOutput(), and TargetInfo::sql_type.
Referenced by ResultSet::RowWiseTargetAccessor::initializeOffsetsForStorage(), and ResultSetStorage::rewriteAggregateBufferOffsets().
|
inline |
Definition at line 111 of file ResultSetBufferAccessors.h.
References QueryMemoryDescriptor::getPaddedSlotBufferSize().
Referenced by anonymous_namespace{ResultSetIteration.cpp}::advance_col_buff_to_slot(), advance_target_ptr_col_wise(), ResultSet::eachCellInColumn(), ResultSet::getTargetValueFromBufferColwise(), ResultSet::ColumnWiseTargetAccessor::initializeOffsetsForStorage(), ResultSet::makeGeoTargetValue(), and ResultSetStorage::reduceEntriesNoCollisionsColWise().
|
inline |
Definition at line 120 of file ResultSetBufferAccessors.h.
References CHECK, QueryMemoryDescriptor::didOutputColumnar(), and QueryMemoryDescriptor::getColOffInBytes().
Referenced by anonymous_namespace{ResultSetIteration.cpp}::advance_col_buff_to_slot(), ResultSet::eachCellInColumn(), ResultSet::ColumnWiseTargetAccessor::initializeOffsetsForStorage(), and ResultSetStorage::reduceEntriesNoCollisionsColWise().
|
inline |
Definition at line 125 of file ResultSetBufferAccessors.h.
References CHECK, QueryMemoryDescriptor::getEffectiveKeyWidth(), QueryMemoryDescriptor::getGroupbyColCount(), and QueryMemoryDescriptor::hasKeylessHash().
Referenced by ResultSet::eachCellInColumn(), get_row_bytes(), get_slot_off_quad(), ResultSet::getOneColRow(), ResultSetStorage::initializeRowWise(), ResultSetReductionJIT::reduceOneEntryNoCollisions(), and ResultSetStorage::rewriteAggregateBufferOffsets().
|
inline |
Definition at line 134 of file ResultSetBufferAccessors.h.
References align_to_int64(), get_key_bytes_rowwise(), QueryMemoryDescriptor::getRowWidth(), and run_benchmark_import::result.
Referenced by anonymous_namespace{ResultSetReduction.cpp}::get_row_qw_count(), ResultSetStorage::initializeRowWise(), ResultSetReductionJIT::reduceOneEntryBaselineIdx(), ResultSetReductionJIT::reduceOneEntryNoCollisionsIdx(), and row_ptr_rowwise().
|
inline |
Definition at line 191 of file ResultSetBufferAccessors.h.
References align_to_int64(), and get_key_bytes_rowwise().
Referenced by anonymous_namespace{ResultSetReduction.cpp}::fill_slots(), anonymous_namespace{ResultSetReduction.cpp}::get_matching_group_value_reduction(), and ResultSetReductionJIT::reduceOneEntryBaselineIdx().
|
inline |
Definition at line 45 of file ResultSetBufferAccessors.h.
References SQLTypeInfo::get_physical_coord_cols(), TargetInfo::is_agg, TargetInfo::is_varlen_projection, and TargetInfo::sql_type.
Referenced by advance_slot().
|
inline |
Definition at line 58 of file ResultSetBufferAccessors.h.
References TargetInfo::agg_kind, TargetInfo::is_agg, is_real_str_or_array(), and kAVG.
Referenced by advance_slot().
|
inline |
Definition at line 37 of file ResultSetBufferAccessors.h.
References TargetInfo::agg_kind, SQLTypeInfo::get_compression(), TargetInfo::is_agg, SQLTypeInfo::is_array(), SQLTypeInfo::is_string(), kENCODING_NONE, kSAMPLE, TargetInfo::sql_type, and SQLTypeInfo::usesFlatBuffer().
Referenced by advance_target_ptr_col_wise(), advance_target_ptr_row_wise(), get_slots_for_target(), ResultSet::getTargetValueFromBufferColwise(), ResultSet::getTargetValueFromBufferRowwise(), ResultSet::RowWiseTargetAccessor::initializeOffsetsForStorage(), and ResultSet::ColumnWiseTargetAccessor::initializeOffsetsForStorage().
|
inline |
Definition at line 104 of file ResultSetBufferAccessors.h.
Referenced by ResultSetStorage::fillOneEntryColWise(), ResultSetStorage::initializeColWise(), ResultSetStorage::moveOneEntryToBuffer(), and ResultSetStorage::reduceOneEntryBaseline().
|
inline |
Definition at line 98 of file ResultSetBufferAccessors.h.
Referenced by ResultSetStorage::fillOneEntryRowWise().
|
inline |
Definition at line 229 of file ResultSetBufferAccessors.h.
References SQLTypeInfo::get_compression(), SQLTypeInfo::get_type(), inline_fp_null_val(), inline_int_null_val(), SQLTypeInfo::is_array(), SQLTypeInfo::is_fp(), SQLTypeInfo::is_geometry(), SQLTypeInfo::is_string(), kENCODING_NONE, kFLOAT, and NULL_FLOAT.
Referenced by anonymous_namespace{ResultSetSortImpl.cu}::baseline_sort_fp(), anonymous_namespace{ResultSetSortImpl.cu}::baseline_sort_int(), WindowFunctionContext::computeNullRangeOfSortedPartition(), anonymous_namespace{WindowContext.cpp}::fp_comparator_asc(), anonymous_namespace{WindowContext.cpp}::fp_comparator_desc(), result_set::initialize_target_values_for_storage(), ResultSet::isNull(), and pop_n_rows_from_merged_heaps_gpu().
|
inline |
Definition at line 197 of file ResultSetBufferAccessors.h.
References CHECK, exp_to_scale(), logger::FATAL, SQLTypeInfo::get_scale(), SQLTypeInfo::get_type(), SQLTypeInfo::get_type_name(), SQLTypeInfo::is_decimal(), SQLTypeInfo::is_integer(), kDOUBLE, kFLOAT, LOG_IF, and NULL_DOUBLE.
Referenced by anonymous_namespace{ResultSetIteration.cpp}::make_avg_target_value(), and ResultSet::ResultSetComparator< BUFFER_ITERATOR_TYPE >::operator()().
|
inline |
Definition at line 246 of file ResultSetBufferAccessors.h.
References UNREACHABLE.
Referenced by ResultSet::eachCellInColumn(), ResultSet::RowWiseTargetAccessor::getColumnInternal(), ResultSet::ColumnWiseTargetAccessor::getColumnInternal(), ResultSetStorage::isEmptyEntry(), ResultSetStorage::isEmptyEntryColumnar(), anonymous_namespace{ResultSetIteration.cpp}::make_avg_target_value(), ResultSet::makeGeoTargetValue(), ResultSet::makeTargetValue(), and ResultSet::makeVarlenTargetValue().
|
inline |
Definition at line 140 of file ResultSetBufferAccessors.h.
References get_row_bytes().
Referenced by ResultSetStorage::binSearchRowCount(), ResultSet::eachCellInColumn(), ResultSet::getOneColRow(), ResultSet::getRowWiseBaselineEntryAt(), ResultSetStorage::isEmptyEntry(), and ResultSetStorage::rewriteAggregateBufferOffsets().
|
inline |
Definition at line 91 of file ResultSetBufferAccessors.h.
Referenced by anonymous_namespace{ResultSetReduction.cpp}::fill_slots(), ResultSetStorage::fillOneEntryColWise(), ResultSetStorage::initializeColWise(), and ResultSetStorage::reduceOneEntrySlotsBaseline().
|
inline |
Definition at line 84 of file ResultSetBufferAccessors.h.
Referenced by ResultSetStorage::fillOneEntryRowWise().