OmniSciDB
a5dc49c757
|
#include <Execute.h>
Classes | |
class | CgenStateManager |
struct | ExecutorMutexHolder |
class | FetchCacheAnchor |
struct | GroupColLLVMValue |
struct | JoinHashTableOrError |
Public Types | |
enum | ExtModuleKinds { ExtModuleKinds::template_module, ExtModuleKinds::udf_cpu_module, ExtModuleKinds::udf_gpu_module, ExtModuleKinds::rt_udf_cpu_module, ExtModuleKinds::rt_udf_gpu_module, ExtModuleKinds::rt_geos_module, ExtModuleKinds::rt_libdevice_module } |
using | ExecutorId = size_t |
using | CachedCardinality = std::pair< bool, size_t > |
Public Member Functions | |
Executor (const ExecutorId id, Data_Namespace::DataMgr *data_mgr, const size_t block_size_x, const size_t grid_size_x, const size_t max_gpu_slab_size, const std::string &debug_dir, const std::string &debug_file) | |
void | clearCaches (bool runtime_only=false) |
std::string | dumpCache () const |
void | reset (bool discard_runtime_modules_only=false) |
const std::unique_ptr < llvm::Module > & | get_rt_module () const |
const std::unique_ptr < llvm::Module > & | get_udf_module (bool is_gpu=false) const |
const std::unique_ptr < llvm::Module > & | get_rt_udf_module (bool is_gpu=false) const |
const std::unique_ptr < llvm::Module > & | get_geos_module () const |
const std::unique_ptr < llvm::Module > & | get_libdevice_module () const |
bool | has_rt_module () const |
bool | has_udf_module (bool is_gpu=false) const |
bool | has_rt_udf_module (bool is_gpu=false) const |
bool | has_geos_module () const |
bool | has_libdevice_module () const |
const TemporaryTables * | getTemporaryTables () |
StringDictionaryProxy * | getStringDictionaryProxy (const shared::StringDictKey &dict_key, const bool with_generation) const |
StringDictionaryProxy * | getStringDictionaryProxy (const shared::StringDictKey &dict_key, const std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const bool with_generation) const |
const StringDictionaryProxy::IdMap * | getStringProxyTranslationMap (const shared::StringDictKey &source_dict_key, const shared::StringDictKey &dest_dict_key, const RowSetMemoryOwner::StringTranslationType translation_type, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const bool with_generation) const |
const StringDictionaryProxy::IdMap * | getJoinIntersectionStringProxyTranslationMap (const StringDictionaryProxy *source_proxy, StringDictionaryProxy *dest_proxy, const std::vector< StringOps_Namespace::StringOpInfo > &source_string_op_infos, const std::vector< StringOps_Namespace::StringOpInfo > &dest_source_string_op_infos, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner) const |
const StringDictionaryProxy::TranslationMap < Datum > * | getStringProxyNumericTranslationMap (const shared::StringDictKey &source_dict_key, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const bool with_generation) const |
bool | isCPUOnly () const |
bool | isArchMaxwell (const ExecutorDeviceType dt) const |
bool | containsLeftDeepOuterJoin () const |
const ColumnDescriptor * | getColumnDescriptor (const Analyzer::ColumnVar *) const |
const ColumnDescriptor * | getPhysicalColumnDescriptor (const Analyzer::ColumnVar *, int) const |
Data_Namespace::DataMgr * | getDataMgr () const |
const std::shared_ptr < RowSetMemoryOwner > | getRowSetMemoryOwner () const |
const TemporaryTables * | getTemporaryTables () const |
Fragmenter_Namespace::TableInfo | getTableInfo (const shared::TableKey &table_key) const |
const TableGeneration & | getTableGeneration (const shared::TableKey &table_key) const |
ExpressionRange | getColRange (const PhysicalInput &) const |
size_t | getNumBytesForFetchedRow (const std::set< shared::TableKey > &table_keys_to_fetch) const |
std::map< shared::ColumnKey, size_t > | getColumnByteWidthMap (const std::set< shared::TableKey > &table_ids_to_fetch, const bool include_lazy_fetched_cols) const |
size_t | getNumBytesForFetchedRow (const std::set< int > &table_ids_to_fetch) const |
ExecutorResourceMgr_Namespace::ChunkRequestInfo | getChunkRequestInfo (const ExecutorDeviceType device_type, const std::vector< InputDescriptor > &input_descs, const std::vector< InputTableInfo > &query_infos, const std::vector< std::pair< int32_t, FragmentsList >> &device_fragment_lists) const |
Determines a unique list of chunks and their associated byte sizes for a given query plan. More... | |
bool | hasLazyFetchColumns (const std::vector< Analyzer::Expr * > &target_exprs) const |
std::vector< ColumnLazyFetchInfo > | getColLazyFetchInfo (const std::vector< Analyzer::Expr * > &target_exprs) const |
void | interrupt (const QuerySessionId &query_session="", const QuerySessionId &interrupt_session="") |
void | resetInterrupt () |
void | enableRuntimeQueryInterrupt (const double runtime_query_check_freq, const unsigned pending_query_check_freq) const |
int8_t | warpSize () const |
unsigned | gridSize () const |
void | setGridSize (unsigned grid_size) |
void | resetGridSize () |
unsigned | numBlocksPerMP () const |
unsigned | blockSize () const |
void | setBlockSize (unsigned block_size) |
void | resetBlockSize () |
size_t | maxGpuSlabSize () const |
ResultSetPtr | executeWorkUnit (size_t &max_groups_buffer_entry_guess, const bool is_agg, const std::vector< InputTableInfo > &, const RelAlgExecutionUnit &, const CompilationOptions &, const ExecutionOptions &options, RenderInfo *render_info, const bool has_cardinality_estimation, ColumnCacheMap &column_cache) |
TableUpdateMetadata | executeUpdate (const RelAlgExecutionUnit &ra_exe_unit, const std::vector< InputTableInfo > &table_infos, const TableDescriptor *updated_table_desc, const CompilationOptions &co, const ExecutionOptions &eo, const Catalog_Namespace::Catalog &cat, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const UpdateLogForFragment::Callback &cb, const bool is_agg) |
void | addTransientStringLiterals (const RelAlgExecutionUnit &ra_exe_unit, const std::shared_ptr< RowSetMemoryOwner > &row_set_mem_owner) |
int | deviceCount (const ExecutorDeviceType) const |
void | logSystemCPUMemoryStatus (std::string const &tag, size_t const thread_idx) const |
void | logSystemGPUMemoryStatus (std::string const &tag, size_t const thread_idx) const |
void | setupCaching (const std::unordered_set< PhysicalInput > &phys_inputs, const std::unordered_set< shared::TableKey > &phys_table_keys) |
void | setColRangeCache (const AggregatedColRange &aggregated_col_range) |
ExecutorId | getExecutorId () const |
QuerySessionId & | getCurrentQuerySession (heavyai::shared_lock< heavyai::shared_mutex > &read_lock) |
QuerySessionStatus::QueryStatus | getQuerySessionStatus (const QuerySessionId &candidate_query_session, heavyai::shared_lock< heavyai::shared_mutex > &read_lock) |
bool | checkCurrentQuerySession (const std::string &candidate_query_session, heavyai::shared_lock< heavyai::shared_mutex > &read_lock) |
void | invalidateRunningQuerySession (heavyai::unique_lock< heavyai::shared_mutex > &write_lock) |
bool | addToQuerySessionList (const QuerySessionId &query_session, const std::string &query_str, const std::string &submitted, const size_t executor_id, const QuerySessionStatus::QueryStatus query_status, heavyai::unique_lock< heavyai::shared_mutex > &write_lock) |
bool | removeFromQuerySessionList (const QuerySessionId &query_session, const std::string &submitted_time_str, heavyai::unique_lock< heavyai::shared_mutex > &write_lock) |
void | setQuerySessionAsInterrupted (const QuerySessionId &query_session, heavyai::unique_lock< heavyai::shared_mutex > &write_lock) |
bool | checkIsQuerySessionInterrupted (const std::string &query_session, heavyai::shared_lock< heavyai::shared_mutex > &read_lock) |
bool | checkIsQuerySessionEnrolled (const QuerySessionId &query_session, heavyai::shared_lock< heavyai::shared_mutex > &read_lock) |
bool | updateQuerySessionStatusWithLock (const QuerySessionId &query_session, const std::string &submitted_time_str, const QuerySessionStatus::QueryStatus updated_query_status, heavyai::unique_lock< heavyai::shared_mutex > &write_lock) |
bool | updateQuerySessionExecutorAssignment (const QuerySessionId &query_session, const std::string &submitted_time_str, const size_t executor_id, heavyai::unique_lock< heavyai::shared_mutex > &write_lock) |
std::vector< QuerySessionStatus > | getQuerySessionInfo (const QuerySessionId &query_session, heavyai::shared_lock< heavyai::shared_mutex > &read_lock) |
heavyai::shared_mutex & | getSessionLock () |
CurrentQueryStatus | attachExecutorToQuerySession (const QuerySessionId &query_session_id, const std::string &query_str, const std::string &query_submitted_time) |
void | checkPendingQueryStatus (const QuerySessionId &query_session) |
void | clearQuerySessionStatus (const QuerySessionId &query_session, const std::string &submitted_time_str) |
void | updateQuerySessionStatus (const QuerySessionId &query_session, const std::string &submitted_time_str, const QuerySessionStatus::QueryStatus new_query_status) |
void | enrollQuerySession (const QuerySessionId &query_session, const std::string &query_str, const std::string &submitted_time_str, const size_t executor_id, const QuerySessionStatus::QueryStatus query_session_status) |
size_t | getNumCurentSessionsEnrolled () const |
const std::vector< size_t > | getExecutorIdsRunningQuery (const QuerySessionId &interrupt_session) const |
bool | checkNonKernelTimeInterrupted () const |
void | registerExtractedQueryPlanDag (const QueryPlanDAG &query_plan_dag) |
const QueryPlanDAG | getLatestQueryPlanDagExtracted () const |
void | addToCardinalityCache (const CardinalityCacheKey &cache_key, const size_t cache_value) |
CachedCardinality | getCachedCardinality (const CardinalityCacheKey &cache_key) |
heavyai::shared_mutex & | getDataRecyclerLock () |
QueryPlanDagCache & | getQueryPlanDagCache () |
ResultSetRecyclerHolder & | getResultSetRecyclerHolder () |
CgenState * | getCgenStatePtr () const |
PlanState * | getPlanStatePtr () const |
llvm::LLVMContext & | getContext () |
void | update_extension_modules (bool update_runtime_modules_only=false) |
Static Public Member Functions | |
static void | clearExternalCaches (bool for_update, const TableDescriptor *td, const int current_db_id) |
template<typename F > | |
static void | registerExtensionFunctions (F register_extension_functions) |
static std::shared_ptr< Executor > | getExecutor (const ExecutorId id, const std::string &debug_dir="", const std::string &debug_file="", const SystemParameters &system_parameters=SystemParameters()) |
static void | nukeCacheOfExecutors () |
static void | clearMemory (const Data_Namespace::MemoryLevel memory_level) |
static size_t | getArenaBlockSize () |
static void | addUdfIrToModule (const std::string &udf_ir_filename, const bool is_cuda_ir) |
static void | initialize_extension_module_sources () |
static void | registerActiveModule (void *module, const int device_id) |
static void | unregisterActiveModule (const int device_id) |
static std::pair< int64_t, int32_t > | reduceResults (const SQLAgg agg, const SQLTypeInfo &ti, const int64_t agg_init_val, const int8_t out_byte_width, const int64_t *out_vec, const size_t out_vec_sz, const bool is_group_by, const bool float_argument_input) |
static void | clearCardinalityCache () |
static void | invalidateCardinalityCacheForTable (const shared::TableKey &table_key) |
static void | update_after_registration (bool update_runtime_modules_only=false) |
static void | init_resource_mgr (const size_t num_cpu_slots, const size_t num_gpu_slots, const size_t cpu_result_mem, const size_t cpu_buffer_pool_mem, const size_t gpu_buffer_pool_mem, const double per_query_max_cpu_slots_ratio, const double per_query_max_cpu_result_mem_ratio, const bool allow_cpu_kernel_concurrency, const bool allow_cpu_gpu_kernel_concurrency, const bool allow_cpu_slot_oversubscription_concurrency, const bool allow_cpu_result_mem_oversubscription, const double max_available_resource_use_ratio) |
static void | pause_executor_queue () |
static void | resume_executor_queue () |
static size_t | get_executor_resource_pool_total_resource_quantity (const ExecutorResourceMgr_Namespace::ResourceType resource_type) |
static ExecutorResourceMgr_Namespace::ResourcePoolInfo | get_executor_resource_pool_info () |
static void | set_executor_resource_pool_resource (const ExecutorResourceMgr_Namespace::ResourceType resource_type, const size_t resource_quantity) |
static size_t | getBaselineThreshold (bool for_count_distinct, ExecutorDeviceType device_type) |
static const ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy | get_concurrent_resource_grant_policy (const ExecutorResourceMgr_Namespace::ResourceType resource_type) |
static void | set_concurrent_resource_grant_policy (const ExecutorResourceMgr_Namespace::ConcurrentResourceGrantPolicy &concurrent_resource_grant_policy) |
Public Attributes | |
std::mutex | compilation_mutex_ |
Static Public Attributes | |
static constexpr ExecutorId | UNITARY_EXECUTOR_ID = 0 |
static constexpr ExecutorId | INVALID_EXECUTOR_ID = SIZE_MAX |
static std::map < ExtModuleKinds, std::string > | extension_module_sources |
static std::mutex | register_runtime_extension_functions_mutex_ |
static std::mutex | kernel_mutex_ |
static const size_t | auto_cpu_mem_bytes {size_t(0)} |
static std::shared_ptr < ExecutorResourceMgr_Namespace::ExecutorResourceMgr > | executor_resource_mgr_ = nullptr |
Private Types | |
using | PerFragmentCallBack = std::function< void(ResultSetPtr, const Fragmenter_Namespace::FragmentInfo &)> |
Private Member Functions | |
void | clearMetaInfoCache () |
int | deviceCountForMemoryLevel (const Data_Namespace::MemoryLevel memory_level) const |
llvm::Value * | codegenWindowFunction (const size_t target_index, const CompilationOptions &co) |
llvm::Value * | codegenConditionalAggregateCondValSelector (llvm::Value *cond_lv, SQLAgg const aggKind, CompilationOptions const &co) const |
llvm::Value * | codegenWindowFunctionAggregate (CodeGenerator *code_generator, const CompilationOptions &co) |
std::pair< llvm::BasicBlock *, llvm::Value * > | codegenWindowResetStateControlFlow (CodeGenerator *code_generator, const CompilationOptions &co) |
void | codegenWindowFunctionStateInit (CodeGenerator *code_generator, const CompilationOptions &co, llvm::Value *aggregate_state) |
llvm::Value * | codegenWindowFunctionAggregateCalls (llvm::Value *aggregate_state, const CompilationOptions &co) |
llvm::Value * | codegenWindowNavigationFunctionOnFrame (const CompilationOptions &co) |
llvm::Value * | codegenCurrentPartitionIndex (const WindowFunctionContext *window_func_context, CodeGenerator *code_generator, const CompilationOptions &co, llvm::Value *current_row_pos_lv) |
llvm::Value * | codegenFrameBoundExpr (const Analyzer::WindowFunction *window_func, const Analyzer::WindowFrame *frame_bound, CodeGenerator &code_generator, const CompilationOptions &co) |
llvm::Value * | codegenFrameBound (bool for_start_bound, bool for_range_mode, bool for_window_frame_naviation, const Analyzer::WindowFrame *frame_bound, bool is_timestamp_type_frame, llvm::Value *order_key_null_val, const WindowFrameBoundFuncArgs &args) |
std::pair< std::string, llvm::Value * > | codegenLoadOrderKeyBufPtr (WindowFunctionContext *window_func_context, CodeGenerator *code_generator, const CompilationOptions &co) const |
std::pair< llvm::Value *, llvm::Value * > | codegenFrameNullRange (WindowFunctionContext *window_func_context, CodeGenerator *code_generator, const CompilationOptions &co, llvm::Value *partition_index_lv) const |
WindowPartitionBufferPtrs | codegenLoadPartitionBuffers (WindowFunctionContext *window_func_context, CodeGenerator *code_generator, const CompilationOptions &co, llvm::Value *partition_index_lv) const |
std::pair< llvm::Value *, llvm::Value * > | codegenWindowFrameBounds (WindowFunctionContext *window_func_context, const Analyzer::WindowFrame *frame_start_bound, const Analyzer::WindowFrame *frame_end_bound, llvm::Value *order_key_col_null_val_lv, WindowFrameBoundFuncArgs &args, CodeGenerator &code_generator) |
std::pair< llvm::Value *, llvm::Value * > | codegenFrameBoundRange (const Analyzer::WindowFunction *window_func, CodeGenerator &code_generator, const CompilationOptions &co) |
std::vector< llvm::Value * > | prepareRowModeFuncArgs (bool for_start_bound, SqlWindowFrameBoundType bound_type, const WindowFrameBoundFuncArgs &args) const |
std::vector< llvm::Value * > | prepareRangeModeFuncArgs (bool for_start_bound, const Analyzer::WindowFrame *frame_bound, bool is_timestamp_type_frame, llvm::Value *order_key_null_val, const WindowFrameBoundFuncArgs &frame_args) const |
const std::string | getOrderKeyTypeName (WindowFunctionContext *window_func_context) const |
llvm::Value * | codegenLoadCurrentValueFromColBuf (WindowFunctionContext *window_func_context, CodeGenerator &code_generator, WindowFrameBoundFuncArgs &args) const |
size_t | getOrderKeySize (WindowFunctionContext *window_func_context) const |
const SQLTypeInfo | getFirstOrderColTypeInfo (WindowFunctionContext *window_func_context) const |
std::string | getFramingFuncName (const std::string &bound_type, const std::string &order_col_type, const std::string &op_type, bool for_timestamp_type) const |
void | codegenWindowAvgEpilogue (CodeGenerator *code_generator, const CompilationOptions &co, llvm::Value *crt_val, llvm::Value *window_func_null_val) |
llvm::Value * | codegenAggregateWindowState (CodeGenerator *code_generator, const CompilationOptions &co, llvm::Value *aggregate_state) |
llvm::Value * | aggregateWindowStatePtr (CodeGenerator *code_generator, const CompilationOptions &co) |
CudaMgr_Namespace::CudaMgr * | cudaMgr () const |
bool | isArchPascalOrLater (const ExecutorDeviceType dt) const |
bool | needFetchAllFragments (const InputColDescriptor &col_desc, const RelAlgExecutionUnit &ra_exe_unit, const FragmentsList &selected_fragments) const |
bool | needLinearizeAllFragments (const ColumnDescriptor *cd, const InputColDescriptor &inner_col_desc, const RelAlgExecutionUnit &ra_exe_unit, const FragmentsList &selected_fragments, const Data_Namespace::MemoryLevel memory_level) const |
void | executeWorkUnitPerFragment (const RelAlgExecutionUnit &ra_exe_unit, const InputTableInfo &table_info, const CompilationOptions &co, const ExecutionOptions &eo, const Catalog_Namespace::Catalog &cat, PerFragmentCallBack &cb, const std::set< size_t > &fragment_indexes_param) |
Compiles and dispatches a work unit per fragment processing results with the per fragment callback. Currently used for computing metrics over fragments (metadata). More... | |
ResultSetPtr | executeExplain (const QueryCompilationDescriptor &) |
ResultSetPtr | executeTableFunction (const TableFunctionExecutionUnit exe_unit, const std::vector< InputTableInfo > &table_infos, const CompilationOptions &co, const ExecutionOptions &eo) |
Compiles and dispatches a table function; that is, a function that takes as input one or more columns and returns a ResultSet, which can be parsed by subsequent execution steps. More... | |
ExecutorDeviceType | getDeviceTypeForTargets (const RelAlgExecutionUnit &ra_exe_unit, const ExecutorDeviceType requested_device_type) |
ResultSetPtr | collectAllDeviceResults (SharedKernelContext &shared_context, const RelAlgExecutionUnit &ra_exe_unit, const QueryMemoryDescriptor &query_mem_desc, const ExecutorDeviceType device_type, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner) |
ResultSetPtr | collectAllDeviceShardedTopResults (SharedKernelContext &shared_context, const RelAlgExecutionUnit &ra_exe_unit, const ExecutorDeviceType device_type) const |
std::unordered_map < shared::TableKey, const Analyzer::BinOper * > | getInnerTabIdToJoinCond () const |
std::vector< std::unique_ptr < ExecutionKernel > > | createKernels (SharedKernelContext &shared_context, const RelAlgExecutionUnit &ra_exe_unit, ColumnFetcher &column_fetcher, const std::vector< InputTableInfo > &table_infos, const ExecutionOptions &eo, const bool is_agg, const bool allow_single_frag_table_opt, const size_t context_count, const QueryCompilationDescriptor &query_comp_desc, const QueryMemoryDescriptor &query_mem_desc, RenderInfo *render_info, std::unordered_set< int > &available_gpus, int &available_cpus) |
void | launchKernelsImpl (SharedKernelContext &shared_context, std::vector< std::unique_ptr< ExecutionKernel >> &&kernels, const ExecutorDeviceType device_type, const size_t requested_num_threads) |
void | launchKernelsLocked (SharedKernelContext &shared_context, std::vector< std::unique_ptr< ExecutionKernel >> &&kernels, const ExecutorDeviceType device_type) |
void | launchKernelsViaResourceMgr (SharedKernelContext &shared_context, std::vector< std::unique_ptr< ExecutionKernel >> &&kernels, const ExecutorDeviceType device_type, const std::vector< InputDescriptor > &input_descs, const QueryMemoryDescriptor &query_mem_desc) |
Launches a vector of kernels for a given query step, gated/scheduled by ExecutorResourceMgr. More... | |
std::vector< size_t > | getTableFragmentIndices (const RelAlgExecutionUnit &ra_exe_unit, const ExecutorDeviceType device_type, const size_t table_idx, const size_t outer_frag_idx, std::map< shared::TableKey, const TableFragments * > &selected_tables_fragments, const std::unordered_map< shared::TableKey, const Analyzer::BinOper * > &inner_table_id_to_join_condition) |
bool | skipFragmentPair (const Fragmenter_Namespace::FragmentInfo &outer_fragment_info, const Fragmenter_Namespace::FragmentInfo &inner_fragment_info, const int inner_table_id, const std::unordered_map< shared::TableKey, const Analyzer::BinOper * > &inner_table_id_to_join_condition, const RelAlgExecutionUnit &ra_exe_unit, const ExecutorDeviceType device_type) |
FetchResult | fetchChunks (const ColumnFetcher &, const RelAlgExecutionUnit &ra_exe_unit, const int device_id, const Data_Namespace::MemoryLevel, const std::map< shared::TableKey, const TableFragments * > &, const FragmentsList &selected_fragments, std::list< ChunkIter > &, std::list< std::shared_ptr< Chunk_NS::Chunk >> &, DeviceAllocator *device_allocator, const size_t thread_idx, const bool allow_runtime_interrupt) |
FetchResult | fetchUnionChunks (const ColumnFetcher &, const RelAlgExecutionUnit &ra_exe_unit, const int device_id, const Data_Namespace::MemoryLevel, const std::map< shared::TableKey, const TableFragments * > &, const FragmentsList &selected_fragments, std::list< ChunkIter > &, std::list< std::shared_ptr< Chunk_NS::Chunk >> &, DeviceAllocator *device_allocator, const size_t thread_idx, const bool allow_runtime_interrupt) |
std::pair< std::vector < std::vector< int64_t > >, std::vector< std::vector < uint64_t > > > | getRowCountAndOffsetForAllFrags (const RelAlgExecutionUnit &ra_exe_unit, const CartesianProduct< std::vector< std::vector< size_t >>> &frag_ids_crossjoin, const std::vector< InputDescriptor > &input_descs, const std::map< shared::TableKey, const TableFragments * > &all_tables_fragments) |
void | buildSelectedFragsMapping (std::vector< std::vector< size_t >> &selected_fragments_crossjoin, std::vector< size_t > &local_col_to_frag_pos, const std::list< std::shared_ptr< const InputColDescriptor >> &col_global_ids, const FragmentsList &selected_fragments, const RelAlgExecutionUnit &ra_exe_unit) |
void | buildSelectedFragsMappingForUnion (std::vector< std::vector< size_t >> &selected_fragments_crossjoin, const FragmentsList &selected_fragments, const RelAlgExecutionUnit &ra_exe_unit) |
std::vector< size_t > | getFragmentCount (const FragmentsList &selected_fragments, const size_t scan_idx, const RelAlgExecutionUnit &ra_exe_unit) |
int32_t | executePlanWithGroupBy (const RelAlgExecutionUnit &ra_exe_unit, const CompilationResult &, const bool hoist_literals, ResultSetPtr *results, const ExecutorDeviceType device_type, std::vector< std::vector< const int8_t * >> &col_buffers, const std::vector< size_t > outer_tab_frag_ids, QueryExecutionContext *, const std::vector< std::vector< int64_t >> &num_rows, const std::vector< std::vector< uint64_t >> &frag_offsets, Data_Namespace::DataMgr *, const int device_id, const shared::TableKey &outer_table_key, const int64_t limit, const uint32_t start_rowid, const uint32_t num_tables, const bool allow_runtime_interrupt, RenderInfo *render_info, const bool optimize_cuda_block_and_grid_sizes, const int64_t rows_to_process=-1) |
int32_t | executePlanWithoutGroupBy (const RelAlgExecutionUnit &ra_exe_unit, const CompilationResult &, const bool hoist_literals, ResultSetPtr *results, const std::vector< Analyzer::Expr * > &target_exprs, const ExecutorDeviceType device_type, std::vector< std::vector< const int8_t * >> &col_buffers, QueryExecutionContext *query_exe_context, const std::vector< std::vector< int64_t >> &num_rows, const std::vector< std::vector< uint64_t >> &frag_offsets, Data_Namespace::DataMgr *data_mgr, const int device_id, const uint32_t start_rowid, const uint32_t num_tables, const bool allow_runtime_interrupt, RenderInfo *render_info, const bool optimize_cuda_block_and_grid_sizes, const int64_t rows_to_process=-1) |
ResultSetPtr | resultsUnion (SharedKernelContext &shared_context, const RelAlgExecutionUnit &ra_exe_unit) |
std::vector< int8_t * > | getJoinHashTablePtrs (const ExecutorDeviceType device_type, const int device_id) |
ResultSetPtr | reduceMultiDeviceResults (const RelAlgExecutionUnit &, std::vector< std::pair< ResultSetPtr, std::vector< size_t >>> &all_fragment_results, std::shared_ptr< RowSetMemoryOwner >, const QueryMemoryDescriptor &) const |
std::vector< std::pair < ResultSetPtr, std::vector < size_t > > > | getUniqueThreadSharedResultSets (const std::vector< std::pair< ResultSetPtr, std::vector< size_t >>> &results_per_device) const |
ResultSetPtr | reduceMultiDeviceResultSets (std::vector< std::pair< ResultSetPtr, std::vector< size_t >>> &all_fragment_results, std::shared_ptr< RowSetMemoryOwner >, const QueryMemoryDescriptor &) const |
ResultSetPtr | reduceSpeculativeTopN (const RelAlgExecutionUnit &, std::vector< std::pair< ResultSetPtr, std::vector< size_t >>> &all_fragment_results, std::shared_ptr< RowSetMemoryOwner >, const QueryMemoryDescriptor &) const |
ResultSetPtr | executeWorkUnitImpl (size_t &max_groups_buffer_entry_guess, const bool is_agg, const bool allow_single_frag_table_opt, const std::vector< InputTableInfo > &, const RelAlgExecutionUnit &, const CompilationOptions &, const ExecutionOptions &options, std::shared_ptr< RowSetMemoryOwner >, RenderInfo *render_info, const bool has_cardinality_estimation, ColumnCacheMap &column_cache) |
std::vector< llvm::Value * > | inlineHoistedLiterals () |
void | AutoTrackBuffersInRuntimeIR () |
std::tuple< CompilationResult, std::unique_ptr < QueryMemoryDescriptor > > | compileWorkUnit (const std::vector< InputTableInfo > &query_infos, const PlanState::DeletedColumnsMap &deleted_cols_map, const RelAlgExecutionUnit &ra_exe_unit, const CompilationOptions &co, const ExecutionOptions &eo, const CudaMgr_Namespace::CudaMgr *cuda_mgr, const bool allow_lazy_fetch, std::shared_ptr< RowSetMemoryOwner >, const size_t max_groups_buffer_entry_count, const int8_t crt_min_byte_width, const bool has_cardinality_estimation, ColumnCacheMap &column_cache, RenderInfo *render_info=nullptr) |
llvm::BasicBlock * | codegenSkipDeletedOuterTableRow (const RelAlgExecutionUnit &ra_exe_unit, const CompilationOptions &co) |
std::vector< JoinLoop > | buildJoinLoops (RelAlgExecutionUnit &ra_exe_unit, const CompilationOptions &co, const ExecutionOptions &eo, const std::vector< InputTableInfo > &query_infos, ColumnCacheMap &column_cache) |
JoinLoop::HoistedFiltersCallback | buildHoistLeftHandSideFiltersCb (const RelAlgExecutionUnit &ra_exe_unit, const size_t level_idx, const shared::TableKey &inner_table_key, const CompilationOptions &co) |
std::function< llvm::Value *(const std::vector < llvm::Value * > &, llvm::Value *)> | buildIsDeletedCb (const RelAlgExecutionUnit &ra_exe_unit, const size_t level_idx, const CompilationOptions &co) |
std::shared_ptr< HashJoin > | buildCurrentLevelHashTable (const JoinCondition ¤t_level_join_conditions, size_t level_idx, RelAlgExecutionUnit &ra_exe_unit, const CompilationOptions &co, const std::vector< InputTableInfo > &query_infos, ColumnCacheMap &column_cache, std::vector< std::string > &fail_reasons) |
void | redeclareFilterFunction () |
llvm::Value * | addJoinLoopIterator (const std::vector< llvm::Value * > &prev_iters, const size_t level_idx) |
void | codegenJoinLoops (const std::vector< JoinLoop > &join_loops, const RelAlgExecutionUnit &ra_exe_unit, GroupByAndAggregate &group_by_and_aggregate, llvm::Function *query_func, llvm::BasicBlock *entry_bb, QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const ExecutionOptions &eo) |
bool | compileBody (const RelAlgExecutionUnit &ra_exe_unit, GroupByAndAggregate &group_by_and_aggregate, QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const GpuSharedMemoryContext &gpu_smem_context={}) |
void | createErrorCheckControlFlow (llvm::Function *query_func, bool run_with_dynamic_watchdog, bool run_with_allowing_runtime_interrupt, const std::vector< JoinLoop > &join_loops, ExecutorDeviceType device_type, const std::vector< InputTableInfo > &input_table_infos) |
void | insertErrorCodeChecker (llvm::Function *query_func, unsigned const error_code_idx, bool hoist_literals, bool allow_runtime_query_interrupt) |
void | preloadFragOffsets (const std::vector< InputDescriptor > &input_descs, const std::vector< InputTableInfo > &query_infos) |
JoinHashTableOrError | buildHashTableForQualifier (const std::shared_ptr< Analyzer::BinOper > &qual_bin_oper, const std::vector< InputTableInfo > &query_infos, const MemoryLevel memory_level, const JoinType join_type, const HashType preferred_hash_type, ColumnCacheMap &column_cache, const HashTableBuildDagMap &hashtable_build_dag_map, const RegisteredQueryHint &query_hint, const TableIdToNodeMap &table_id_to_node_map) |
void | nukeOldState (const bool allow_lazy_fetch, const std::vector< InputTableInfo > &query_infos, const PlanState::DeletedColumnsMap &deleted_cols_map, const RelAlgExecutionUnit *ra_exe_unit) |
std::shared_ptr < CompilationContext > | optimizeAndCodegenCPU (llvm::Function *, llvm::Function *, const std::unordered_set< llvm::Function * > &, const CompilationOptions &) |
std::shared_ptr < CompilationContext > | optimizeAndCodegenGPU (llvm::Function *, llvm::Function *, std::unordered_set< llvm::Function * > &, const bool no_inline, const CudaMgr_Namespace::CudaMgr *cuda_mgr, const bool is_gpu_smem_used, const CompilationOptions &) |
std::string | generatePTX (const std::string &) const |
void | initializeNVPTXBackend () const |
int64_t | deviceCycles (int milliseconds) const |
GroupColLLVMValue | groupByColumnCodegen (Analyzer::Expr *group_by_col, const size_t col_width, const CompilationOptions &, const bool translate_null_val, const int64_t translated_null_val, DiamondCodegen &, std::stack< llvm::BasicBlock * > &, const bool thread_mem_shared) |
llvm::Value * | castToFP (llvm::Value *, SQLTypeInfo const &from_ti, SQLTypeInfo const &to_ti) |
llvm::Value * | castToIntPtrTyIn (llvm::Value *val, const size_t bit_width) |
std::tuple < RelAlgExecutionUnit, PlanState::DeletedColumnsMap > | addDeletedColumn (const RelAlgExecutionUnit &ra_exe_unit, const CompilationOptions &co) |
bool | isFragmentFullyDeleted (const InputDescriptor &table_desc, const Fragmenter_Namespace::FragmentInfo &fragment) |
FragmentSkipStatus | canSkipFragmentForFpQual (const Analyzer::BinOper *comp_expr, const Analyzer::ColumnVar *lhs_col, const Fragmenter_Namespace::FragmentInfo &fragment, const Analyzer::Constant *rhs_const) const |
std::pair< bool, int64_t > | skipFragment (const InputDescriptor &table_desc, const Fragmenter_Namespace::FragmentInfo &frag_info, const std::list< std::shared_ptr< Analyzer::Expr >> &simple_quals, const std::vector< uint64_t > &frag_offsets, const size_t frag_idx) |
std::pair< bool, int64_t > | skipFragmentInnerJoins (const InputDescriptor &table_desc, const RelAlgExecutionUnit &ra_exe_unit, const Fragmenter_Namespace::FragmentInfo &fragment, const std::vector< uint64_t > &frag_offsets, const size_t frag_idx) |
AggregatedColRange | computeColRangesCache (const std::unordered_set< PhysicalInput > &phys_inputs) |
StringDictionaryGenerations | computeStringDictionaryGenerations (const std::unordered_set< PhysicalInput > &phys_inputs) |
TableGenerations | computeTableGenerations (const std::unordered_set< shared::TableKey > &phys_table_keys) |
std::vector< int8_t > | serializeLiterals (const std::unordered_map< int, CgenState::LiteralValues > &literals, const int device_id) |
const std::unique_ptr < llvm::Module > & | get_extension_module (ExtModuleKinds kind) const |
bool | has_extension_module (ExtModuleKinds kind) const |
llvm::Value * | spillDoubleElement (llvm::Value *elem_val, llvm::Type *elem_ty) |
ExecutorMutexHolder | acquireExecuteMutex () |
Static Private Member Functions | |
static size_t | align (const size_t off_in, const size_t alignment) |
Static Private Attributes | |
static const int | max_gpu_count |
static const size_t | auto_num_threads {size_t(0)} |
static std::mutex | gpu_active_modules_mutex_ |
static uint32_t | gpu_active_modules_device_mask_ {0x0} |
static void * | gpu_active_modules_ [max_gpu_count] |
static const size_t | baseline_threshold |
static heavyai::shared_mutex | executor_session_mutex_ |
static InterruptFlagMap | queries_interrupt_flag_ |
static QuerySessionMap | queries_session_map_ |
static std::map< int, std::shared_ptr< Executor > > | executors_ |
static heavyai::shared_mutex | execute_mutex_ |
static heavyai::shared_mutex | executors_cache_mutex_ |
static QueryPlanDagCache | query_plan_dag_cache_ |
static heavyai::shared_mutex | recycler_mutex_ |
static std::unordered_map < CardinalityCacheKey, size_t > | cardinality_cache_ |
static ResultSetRecyclerHolder | resultset_recycler_holder_ |
static QueryPlanDAG | latest_query_plan_extracted_ {EMPTY_QUERY_PLAN} |
Friends | |
class | BaselineJoinHashTable |
class | CodeGenerator |
class | ColumnFetcher |
struct | DiamondCodegen |
class | ExecutionKernel |
class | KernelSubtask |
class | HashJoin |
class | BoundingBoxIntersectJoinHashTable |
class | RangeJoinHashTable |
class | GroupByAndAggregate |
class | QueryCompilationDescriptor |
class | QueryMemoryDescriptor |
class | QueryMemoryInitializer |
class | QueryFragmentDescriptor |
class | QueryExecutionContext |
class | ResultSet |
class | InValuesBitmap |
class | StringDictionaryTranslationMgr |
class | LeafAggregator |
class | PerfectJoinHashTable |
class | QueryRewriter |
class | PendingExecutionClosure |
class | RelAlgExecutor |
class | TableOptimizer |
class | TableFunctionCompilationContext |
class | TableFunctionExecutionContext |
struct | TargetExprCodegenBuilder |
struct | TargetExprCodegen |
class | WindowProjectNodeContext |
using Executor::CachedCardinality = std::pair<bool, size_t> |
using Executor::ExecutorId = size_t |
|
private |
|
strong |
Executor::Executor | ( | const ExecutorId | id, |
Data_Namespace::DataMgr * | data_mgr, | ||
const size_t | block_size_x, | ||
const size_t | grid_size_x, | ||
const size_t | max_gpu_slab_size, | ||
const std::string & | debug_dir, | ||
const std::string & | debug_file | ||
) |
Definition at line 276 of file Execute.cpp.
|
inlineprivate |
Definition at line 1591 of file Execute.h.
References execute_mutex_, executor_id_, Executor::ExecutorMutexHolder::shared_lock, Executor::ExecutorMutexHolder::unique_lock, and UNITARY_EXECUTOR_ID.
|
private |
Definition at line 4475 of file Execute.cpp.
References anonymous_namespace{Execute.cpp}::add_deleted_col_to_map(), CHECK, CompilationOptions::filter_on_deleted_column, Catalog_Namespace::SysCatalog::getCatalog(), Catalog_Namespace::SysCatalog::instance(), and TABLE.
Referenced by executeWorkUnitImpl(), and executeWorkUnitPerFragment().
|
private |
Definition at line 1186 of file IRCodegen.cpp.
References AUTOMATIC_IR_METADATA, and CHECK.
void Executor::addToCardinalityCache | ( | const CardinalityCacheKey & | cache_key, |
const size_t | cache_value | ||
) |
Definition at line 5289 of file Execute.cpp.
References cardinality_cache_, g_use_estimator_result_cache, recycler_mutex_, and VLOG.
bool Executor::addToQuerySessionList | ( | const QuerySessionId & | query_session, |
const std::string & | query_str, | ||
const std::string & | submitted, | ||
const size_t | executor_id, | ||
const QuerySessionStatus::QueryStatus | query_status, | ||
heavyai::unique_lock< heavyai::shared_mutex > & | write_lock | ||
) |
Definition at line 5120 of file Execute.cpp.
References queries_interrupt_flag_, and queries_session_map_.
Referenced by enrollQuerySession().
void Executor::addTransientStringLiterals | ( | const RelAlgExecutionUnit & | ra_exe_unit, |
const std::shared_ptr< RowSetMemoryOwner > & | row_set_mem_owner | ||
) |
Definition at line 2523 of file Execute.cpp.
References CHECK, getStringDictionaryProxy(), RelAlgExecutionUnit::groupby_exprs, kENCODING_DICT, kMODE, kSAMPLE, kSINGLE_VALUE, RelAlgExecutionUnit::quals, RelAlgExecutionUnit::simple_quals, RelAlgExecutionUnit::target_exprs, RelAlgExecutionUnit::target_exprs_union, and ScalarExprVisitor< T >::visit().
|
static |
Definition at line 1956 of file NativeCodegen.cpp.
Referenced by DBHandler::initialize().
|
private |
Definition at line 242 of file WindowFunctionIR.cpp.
References AUTOMATIC_IR_METADATA, CodegenUtil::createPtrWithHoistedMemoryAddr(), anonymous_namespace{WindowFunctionIR.cpp}::get_adjusted_window_type_info(), get_int_type(), WindowProjectNodeContext::getActiveWindowFunctionContext(), kFLOAT, and WindowFunctionContext::NUM_EXECUTION_DEVICES.
|
inlinestaticprivate |
Definition at line 1468 of file Execute.h.
Referenced by serializeLiterals().
CurrentQueryStatus Executor::attachExecutorToQuerySession | ( | const QuerySessionId & | query_session_id, |
const std::string & | query_str, | ||
const std::string & | query_submitted_time | ||
) |
Definition at line 5018 of file Execute.cpp.
References executor_id_, executor_session_mutex_, updateQuerySessionExecutorAssignment(), and updateQuerySessionStatusWithLock().
|
private |
Definition at line 2303 of file NativeCodegen.cpp.
unsigned Executor::blockSize | ( | ) | const |
Definition at line 4366 of file Execute.cpp.
References block_size_x_, CHECK, data_mgr_, CudaMgr_Namespace::CudaMgr::getAllDeviceProperties(), and Data_Namespace::DataMgr::getCudaMgr().
Referenced by collectAllDeviceShardedTopResults(), executePlanWithGroupBy(), executePlanWithoutGroupBy(), executeTableFunction(), executeWorkUnitImpl(), reduceMultiDeviceResults(), reduceMultiDeviceResultSets(), and resultsUnion().
|
private |
Definition at line 1027 of file IRCodegen.cpp.
References anonymous_namespace{IRCodegen.cpp}::add_qualifier_to_execution_unit(), AUTOMATIC_IR_METADATA, anonymous_namespace{IRCodegen.cpp}::check_valid_join_qual(), Data_Namespace::CPU_LEVEL, CompilationOptions::device_type, Executor::JoinHashTableOrError::fail_reason, GPU, Data_Namespace::GPU_LEVEL, Executor::JoinHashTableOrError::hash_table, RelAlgExecutionUnit::hash_table_build_plan_dag, IS_EQUIVALENCE, LEFT, OneToOne, JoinCondition::quals, RelAlgExecutionUnit::query_hint, RelAlgExecutionUnit::table_id_to_node_map, JoinCondition::type, and VLOG.
|
private |
Definition at line 4309 of file Execute.cpp.
References deviceCountForMemoryLevel(), g_enable_bbox_intersect_hashjoin, g_enable_dynamic_watchdog, HashJoin::getInstance(), and interrupted_.
|
private |
Definition at line 859 of file IRCodegen.cpp.
References AUTOMATIC_IR_METADATA, CHECK, CodeGenerator::codegen(), g_enable_left_join_filter_hoisting, RelAlgExecutionUnit::join_quals, LEFT, RelAlgExecutionUnit::quals, RelAlgExecutionUnit::simple_quals, CodeGenerator::toBool(), and VLOG.
|
private |
Definition at line 968 of file IRCodegen.cpp.
References AUTOMATIC_IR_METADATA, CHECK, CHECK_LT, CodeGenerator::codegen(), CompilationOptions::filter_on_deleted_column, RelAlgExecutionUnit::input_descs, TABLE, and CodeGenerator::toBool().
|
private |
Definition at line 610 of file IRCodegen.cpp.
References AUTOMATIC_IR_METADATA, CodeGenerator::cgen_state_, CHECK, CHECK_LT, CodeGenerator::codegen(), INJECT_TIMER, CgenState::ir_builder_, RelAlgExecutionUnit::join_quals, LEFT, PlanState::left_join_non_hashtable_quals_, CgenState::llBool(), MultiSet, OneToOne, CgenState::outer_join_match_found_per_level_, CodeGenerator::plan_state_, Set, Singleton, JoinLoopDomain::slot_lookup_result, CodeGenerator::toBool(), and JoinLoopDomain::values_buffer.
|
private |
Definition at line 3774 of file Execute.cpp.
References CHECK, CHECK_EQ, CHECK_LT, getFragmentCount(), RelAlgExecutionUnit::input_descs, and plan_state_.
Referenced by fetchChunks().
|
private |
Definition at line 3805 of file Execute.cpp.
References RelAlgExecutionUnit::input_descs.
Referenced by fetchUnionChunks().
|
private |
Definition at line 4598 of file Execute.cpp.
References CHECK, shared::ColumnKey::column_id, extract_max_stat_fp_type(), extract_min_stat_fp_type(), Analyzer::Constant::get_constval(), Analyzer::BinOper::get_optype(), SQLTypeInfo::get_type(), Analyzer::Expr::get_type_info(), Fragmenter_Namespace::FragmentInfo::getChunkMetadataMap(), Analyzer::ColumnVar::getColumnKey(), INVALID, kDOUBLE, kEQ, kFLOAT, kGE, kGT, kLE, kLT, NOT_SKIPPABLE, and SKIPPABLE.
Referenced by skipFragment().
|
private |
Definition at line 4401 of file Execute.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, exp_to_scale(), logger::FATAL, SQLTypeInfo::get_scale(), SQLTypeInfo::get_size(), SQLTypeInfo::is_fp(), SQLTypeInfo::is_number(), and LOG.
|
private |
Definition at line 4428 of file Execute.cpp.
References AUTOMATIC_IR_METADATA, cgen_state_, CHECK, CHECK_LT, and get_int_type().
bool Executor::checkCurrentQuerySession | ( | const std::string & | candidate_query_session, |
heavyai::shared_lock< heavyai::shared_mutex > & | read_lock | ||
) |
bool Executor::checkIsQuerySessionEnrolled | ( | const QuerySessionId & | query_session, |
heavyai::shared_lock< heavyai::shared_mutex > & | read_lock | ||
) |
Definition at line 5265 of file Execute.cpp.
References queries_session_map_.
Referenced by executeWorkUnitImpl().
bool Executor::checkIsQuerySessionInterrupted | ( | const std::string & | query_session, |
heavyai::shared_lock< heavyai::shared_mutex > & | read_lock | ||
) |
Definition at line 5254 of file Execute.cpp.
References queries_interrupt_flag_.
Referenced by executePlanWithGroupBy(), executePlanWithoutGroupBy(), fetchChunks(), and fetchUnionChunks().
bool Executor::checkNonKernelTimeInterrupted | ( | ) | const |
Definition at line 5363 of file Execute.cpp.
References current_query_session_, executor_id_, executor_session_mutex_, queries_interrupt_flag_, and UNITARY_EXECUTOR_ID.
void Executor::checkPendingQueryStatus | ( | const QuerySessionId & | query_session | ) |
Definition at line 5035 of file Execute.cpp.
References executor_session_mutex_, queries_interrupt_flag_, queries_session_map_, and VLOG.
void Executor::clearCaches | ( | bool | runtime_only = false | ) |
|
static |
Definition at line 5309 of file Execute.cpp.
References cardinality_cache_, g_use_estimator_result_cache, and recycler_mutex_.
Referenced by clearExternalCaches().
|
inlinestatic |
Definition at line 438 of file Execute.h.
References clearCardinalityCache(), TableDescriptor::getTableChunkKey(), hash_value(), CacheInvalidator< CACHE_HOLDING_TYPES >::invalidateCaches(), CacheInvalidator< CACHE_HOLDING_TYPES >::invalidateCachesByTable(), invalidateCardinalityCacheForTable(), and TableDescriptor::tableId.
Referenced by AlterTableAlterColumnCommand::clearInMemoryData(), clearMemory(), DropForeignTableCommand::execute(), Parser::InsertIntoTableAsSelectStmt::execute(), Parser::DropTableStmt::execute(), Parser::TruncateTableStmt::execute(), Parser::OptimizeTableStmt::execute(), Parser::AddColumnStmt::execute(), Parser::DropColumnStmt::execute(), Parser::AlterTableParamStmt::execute(), Parser::CopyTableStmt::execute(), RelAlgExecutor::executeDelete(), RelAlgExecutor::executeSimpleInsert(), RelAlgExecutor::executeUpdate(), Catalog_Namespace::Catalog::invalidateCachesForTable(), foreign_storage::refresh_foreign_table_unlocked(), DBHandler::set_table_epochs(), Catalog_Namespace::Catalog::setUncappedTableEpoch(), and DBHandler::shutdown().
|
static |
Definition at line 535 of file Execute.cpp.
References clearExternalCaches(), Data_Namespace::DataMgr::clearMemory(), Data_Namespace::CPU_LEVEL, execute_mutex_, Catalog_Namespace::SysCatalog::getDataMgr(), Data_Namespace::GPU_LEVEL, Catalog_Namespace::SysCatalog::instance(), and CacheInvalidator< CACHE_HOLDING_TYPES >::invalidateCaches().
Referenced by DBHandler::clear_cpu_memory(), DBHandler::clear_gpu_memory(), QueryRunner::QueryRunner::clearCpuMemory(), and QueryRunner::QueryRunner::clearGpuMemory().
|
private |
Definition at line 1054 of file Execute.cpp.
References agg_col_range_cache_, TableGenerations::clear(), AggregatedColRange::clear(), InputTableInfoCache::clear(), input_table_info_cache_, and table_generations_.
void Executor::clearQuerySessionStatus | ( | const QuerySessionId & | query_session, |
const std::string & | submitted_time_str | ||
) |
Definition at line 5061 of file Execute.cpp.
References current_query_session_, executor_session_mutex_, invalidateRunningQuerySession(), removeFromQuerySessionList(), and resetInterrupt().
|
private |
Definition at line 1510 of file WindowFunctionIR.cpp.
References AUTOMATIC_IR_METADATA, AVG, COUNT, CodegenUtil::createPtrWithHoistedMemoryAddr(), anonymous_namespace{WindowFunctionIR.cpp}::get_adjusted_window_type_info(), get_int_type(), WindowProjectNodeContext::getActiveWindowFunctionContext(), Analyzer::WindowFunction::getKind(), kDECIMAL, kDOUBLE, kFLOAT, and WindowFunctionContext::NUM_EXECUTION_DEVICES.
|
private |
Definition at line 1577 of file WindowFunctionIR.cpp.
References CHECK, and kSUM_IF.
|
private |
Definition at line 781 of file WindowFunctionIR.cpp.
References CodegenUtil::createPtrWithHoistedMemoryAddr(), WindowFunctionContext::elementCount(), get_int_type(), WindowFunctionContext::getWindowFunction(), Analyzer::WindowFunction::isFrameNavigateWindowFunction(), WindowFunctionContext::NUM_EXECUTION_DEVICES, WindowFunctionContext::partitionCount(), WindowFunctionContext::partitionNumCountBuf(), and WindowFunctionContext::payload().
|
private |
Definition at line 649 of file WindowFunctionIR.cpp.
References CHECK, CURRENT_ROW, WindowFrameBoundFuncArgs::current_row_pos_lv, EXPR_FOLLOWING, EXPR_PRECEDING, WindowFrameBoundFuncArgs::frame_end_bound_expr_lv, WindowFrameBoundFuncArgs::frame_start_bound_expr_lv, Analyzer::WindowFrame::getBoundType(), WindowFrameBoundFuncArgs::int64_t_one_val_lv, WindowFrameBoundFuncArgs::int64_t_zero_val_lv, WindowFrameBoundFuncArgs::num_elem_current_partition_lv, WindowFrameBoundFuncArgs::order_type_col_name, UNBOUNDED_FOLLOWING, and UNBOUNDED_PRECEDING.
|
private |
Definition at line 598 of file WindowFunctionIR.cpp.
References CHECK, CodeGenerator::codegen(), EXPR_FOLLOWING, EXPR_PRECEDING, g_cluster, SQLTypeInfo::get_size(), Analyzer::Expr::get_type_info(), Analyzer::WindowFrame::getBoundExpr(), Analyzer::WindowFunction::getOrderKeys(), Analyzer::WindowFunction::hasRangeModeFraming(), kBIGINT, kINT, and kSMALLINT.
|
private |
Definition at line 1065 of file WindowFunctionIR.cpp.
References CHECK, Analyzer::WindowFunction::getFrameEndBound(), and Analyzer::WindowFunction::getFrameStartBound().
|
private |
Definition at line 904 of file WindowFunctionIR.cpp.
References CodegenUtil::createPtrWithHoistedMemoryAddr(), get_int_type(), WindowFunctionContext::getNullValueEndPos(), WindowFunctionContext::getNullValueStartPos(), and WindowFunctionContext::NUM_EXECUTION_DEVICES.
|
private |
Definition at line 1204 of file IRCodegen.cpp.
References ExecutionOptions::allow_runtime_query_interrupt, anonymous_namespace{QueryMemoryDescriptor.cpp}::any_of(), AUTOMATIC_IR_METADATA, CHECK, CHECK_EQ, JoinLoop::codegen(), CompilationOptions::device_type, JoinLoopDomain::element_count, get_int_array_type(), get_int_type(), INNER, MultiSet, CodeGenerator::posArg(), GroupByAndAggregate::query_infos_, query_mem_desc, Set, and ExecutionOptions::with_dynamic_watchdog.
|
private |
Definition at line 753 of file WindowFunctionIR.cpp.
References CHECK, CodeGenerator::codegenWindowPosition(), WindowFrameBoundFuncArgs::current_row_pos_lv, get_fp_type(), get_int_type(), Analyzer::WindowFunction::getOrderKeys(), WindowFunctionContext::getWindowFunction(), Analyzer::WindowFunction::isFrameNavigateWindowFunction(), and WindowFrameBoundFuncArgs::order_key_buf_ptr_lv.
|
private |
Definition at line 948 of file WindowFunctionIR.cpp.
References CodegenUtil::createPtrWithHoistedMemoryAddr(), anonymous_namespace{WindowFunctionIR.cpp}::get_col_type_name_by_size(), get_fp_type(), get_int_type(), WindowFunctionContext::getOrderKeyColumnBuffers(), WindowFunctionContext::getOrderKeyColumnBufferTypes(), Analyzer::WindowFunction::getOrderKeys(), WindowFunctionContext::getWindowFunction(), and WindowFunctionContext::NUM_EXECUTION_DEVICES.
|
private |
Definition at line 976 of file WindowFunctionIR.cpp.
References WindowFunctionContext::counts(), CodegenUtil::createPtrWithHoistedMemoryAddr(), WindowPartitionBufferPtrs::current_partition_start_offset_lv, get_int_type(), WindowPartitionBufferPtrs::num_elem_current_partition_lv, WindowFunctionContext::NUM_EXECUTION_DEVICES, WindowFunctionContext::partitionStartOffset(), WindowFunctionContext::payload(), WindowFunctionContext::sortedPartition(), WindowPartitionBufferPtrs::target_partition_rowid_ptr_lv, and WindowPartitionBufferPtrs::target_partition_sorted_rowid_ptr_lv.
|
private |
Definition at line 3311 of file NativeCodegen.cpp.
|
private |
Definition at line 1466 of file WindowFunctionIR.cpp.
References AUTOMATIC_IR_METADATA, CodegenUtil::createPtrWithHoistedMemoryAddr(), anonymous_namespace{WindowFunctionIR.cpp}::get_adjusted_window_type_info(), get_int_type(), WindowProjectNodeContext::getActiveWindowFunctionContext(), kDOUBLE, kFLOAT, and WindowFunctionContext::NUM_EXECUTION_DEVICES.
|
private |
Definition at line 1080 of file WindowFunctionIR.cpp.
References run_benchmark_import::args, CHECK, WindowFrameBoundFuncArgs::current_col_value_lv, WindowFunctionContext::getOrderKeyColumnBuffers(), WindowFunctionContext::getWindowFunction(), Analyzer::WindowFrame::hasTimestampTypeFrameBound(), and WindowFrameBoundFuncArgs::order_type_col_name.
|
private |
Definition at line 22 of file WindowFunctionIR.cpp.
References WindowProjectNodeContext::activateWindowFunctionContext(), run_benchmark_import::args, AUTOMATIC_IR_METADATA, AVG, BACKWARD_FILL, CHECK, CHECK_EQ, CONDITIONAL_CHANGE_EVENT, COUNT, COUNT_IF, CUME_DIST, DENSE_RANK, logger::FATAL, FIRST_VALUE, FIRST_VALUE_IN_FRAME, FORWARD_FILL, WindowProjectNodeContext::get(), WindowFunctionContext::getWindowFunction(), LAG, LAG_IN_FRAME, LAST_VALUE, LAST_VALUE_IN_FRAME, LEAD, LEAD_IN_FRAME, LOG, MAX, MIN, NTH_VALUE, NTH_VALUE_IN_FRAME, NTILE, PERCENT_RANK, RANK, ROW_NUMBER, SUM, and SUM_IF.
|
private |
Definition at line 265 of file WindowFunctionIR.cpp.
References AUTOMATIC_IR_METADATA, AVG, CHECK, CodegenUtil::createPtrWithHoistedMemoryAddr(), WindowProjectNodeContext::get(), get_int_type(), WindowProjectNodeContext::getActiveWindowFunctionContext(), and WindowFunctionContext::NUM_EXECUTION_DEVICES.
|
private |
Definition at line 1129 of file WindowFunctionIR.cpp.
References run_benchmark_import::args, AUTOMATIC_IR_METADATA, AVG, CHECK, CHECK_EQ, CodeGenerator::codegen(), CodeGenerator::codegenCastBetweenIntTypes(), COUNT, COUNT_IF, CodegenUtil::createPtrWithHoistedMemoryAddr(), WindowFrameBoundFuncArgs::current_partition_start_offset_lv, anonymous_namespace{WindowFunctionIR.cpp}::get_adjusted_window_type_info(), anonymous_namespace{WindowFunctionIR.cpp}::get_col_type_name_by_size(), get_int_type(), anonymous_namespace{WindowFunctionIR.cpp}::get_null_value_by_size(), anonymous_namespace{WindowFunctionIR.cpp}::get_window_agg_name(), WindowProjectNodeContext::getActiveWindowFunctionContext(), inline_fixed_encoding_null_val(), kDATE, kDOUBLE, kENCODING_DATE_IN_DAYS, kENCODING_FIXED, kFLOAT, kSUM_IF, kTIME, kTIMESTAMP, kTINYINT, MAX, MIN, WindowFunctionContext::NUM_EXECUTION_DEVICES, CodeGenerator::posArg(), SUM, SUM_IF, and window_function_conditional_aggregate().
|
private |
Definition at line 339 of file WindowFunctionIR.cpp.
References AUTOMATIC_IR_METADATA, COUNT, COUNT_IF, anonymous_namespace{WindowFunctionIR.cpp}::get_adjusted_window_type_info(), get_int_type(), WindowProjectNodeContext::getActiveWindowFunctionContext(), kDOUBLE, and kFLOAT.
|
private |
Definition at line 392 of file WindowFunctionIR.cpp.
References run_benchmark_import::args, AUTOMATIC_IR_METADATA, CHECK, CodegenUtil::createPtrWithHoistedMemoryAddr(), WindowFrameBoundFuncArgs::current_partition_start_offset_lv, FIRST_VALUE_IN_FRAME, FORWARD_FILL, anonymous_namespace{WindowFunctionIR.cpp}::get_col_type_name_by_size(), get_fp_type(), get_int_type(), anonymous_namespace{WindowFunctionIR.cpp}::get_null_value_by_size(), anonymous_namespace{WindowFunctionIR.cpp}::get_null_value_by_size_with_encoding(), WindowProjectNodeContext::getActiveWindowFunctionContext(), kENCODING_DATE_IN_DAYS, kSecsPerDay, LAG_IN_FRAME, LAST_VALUE_IN_FRAME, LEAD_IN_FRAME, NTH_VALUE_IN_FRAME, WindowFunctionContext::NUM_EXECUTION_DEVICES, and UNREACHABLE.
|
private |
Definition at line 299 of file WindowFunctionIR.cpp.
References AUTOMATIC_IR_METADATA, CodegenUtil::createPtrWithHoistedMemoryAddr(), get_int_type(), WindowProjectNodeContext::getActiveWindowFunctionContext(), WindowFunctionContext::NUM_EXECUTION_DEVICES, CodeGenerator::posArg(), and CodeGenerator::toBool().
|
private |
Definition at line 2715 of file Execute.cpp.
References anonymous_namespace{Execute.cpp}::build_row_for_empty_input(), collectAllDeviceShardedTopResults(), DEBUG_TIMER, SharedKernelContext::getFragmentResults(), QueryMemoryDescriptor::getQueryDescriptionType(), GPU, heavyai::NonGroupedAggregate, reduceMultiDeviceResults(), reduceSpeculativeTopN(), GroupByAndAggregate::shard_count_for_top_groups(), RelAlgExecutionUnit::target_exprs, and use_speculative_top_n().
Referenced by executeWorkUnitImpl().
|
private |
Definition at line 2830 of file Execute.cpp.
References blockSize(), CHECK, CHECK_EQ, CHECK_LE, SharedKernelContext::getFragmentResults(), gridSize(), SortInfo::limit,