OmniSciDB
c1a53651b2
|
#include <RelAlgExecutor.h>
Classes | |
struct | TableFunctionWorkUnit |
struct | WorkUnit |
Public Types | |
using | TargetInfoList = std::vector< TargetInfo > |
Static Public Member Functions | |
static std::string | getErrorMessageFromCode (const int32_t error_code) |
Private Member Functions | |
void | initializeParallelismHints () |
ExecutionResult | executeRelAlgQueryNoRetry (const CompilationOptions &co, const ExecutionOptions &eo, const bool just_explain_plan, RenderInfo *render_info) |
void | executeRelAlgStep (const RaExecutionSequence &seq, const size_t step_idx, const CompilationOptions &, const ExecutionOptions &, RenderInfo *, const int64_t queue_time_ms) |
void | executeUpdate (const RelAlgNode *node, const CompilationOptions &co, const ExecutionOptions &eo, const int64_t queue_time_ms) |
void | executeDelete (const RelAlgNode *node, const CompilationOptions &co, const ExecutionOptions &eo_in, const int64_t queue_time_ms) |
ExecutionResult | executeCompound (const RelCompound *, const CompilationOptions &, const ExecutionOptions &, RenderInfo *, const int64_t queue_time_ms) |
ExecutionResult | executeAggregate (const RelAggregate *aggregate, const CompilationOptions &co, const ExecutionOptions &eo, RenderInfo *render_info, const int64_t queue_time_ms) |
ExecutionResult | executeProject (const RelProject *, const CompilationOptions &, const ExecutionOptions &, RenderInfo *, const int64_t queue_time_ms, const std::optional< size_t > previous_count) |
ExecutionResult | executeTableFunction (const RelTableFunction *, const CompilationOptions &, const ExecutionOptions &, const int64_t queue_time_ms) |
ExecutionResult | executeFilter (const RelFilter *, const CompilationOptions &, const ExecutionOptions &, RenderInfo *, const int64_t queue_time_ms) |
ExecutionResult | executeSort (const RelSort *, const CompilationOptions &, const ExecutionOptions &, RenderInfo *, const int64_t queue_time_ms) |
ExecutionResult | executeLogicalValues (const RelLogicalValues *, const ExecutionOptions &) |
ExecutionResult | executeModify (const RelModify *modify, const ExecutionOptions &eo) |
ExecutionResult | executeUnion (const RelLogicalUnion *, const RaExecutionSequence &, const CompilationOptions &, const ExecutionOptions &, RenderInfo *, const int64_t queue_time_ms) |
WorkUnit | createSortInputWorkUnit (const RelSort *, std::list< Analyzer::OrderEntry > &order_entries, const ExecutionOptions &eo) |
ExecutionResult | executeWorkUnit (const WorkUnit &work_unit, const std::vector< TargetMetaInfo > &targets_meta, const bool is_agg, const CompilationOptions &co_in, const ExecutionOptions &eo_in, RenderInfo *, const int64_t queue_time_ms, const std::optional< size_t > previous_count=std::nullopt) |
void | computeWindow (const WorkUnit &work_unit, const CompilationOptions &co, const ExecutionOptions &eo, ColumnCacheMap &column_cache_map, const int64_t queue_time_ms) |
std::unique_ptr < WindowFunctionContext > | createWindowFunctionContext (const Analyzer::WindowFunction *window_func, const std::shared_ptr< Analyzer::BinOper > &partition_key_cond, std::unordered_map< QueryPlanHash, std::shared_ptr< HashJoin >> &partition_cache, std::unordered_map< QueryPlanHash, size_t > &sorted_partition_key_ref_count_map, const WorkUnit &work_unit, const std::vector< InputTableInfo > &query_infos, const CompilationOptions &co, ColumnCacheMap &column_cache_map, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner) |
size_t | getNDVEstimation (const WorkUnit &work_unit, const int64_t range, const bool is_agg, const CompilationOptions &co, const ExecutionOptions &eo) |
std::optional< size_t > | getFilteredCountAll (const WorkUnit &work_unit, const bool is_agg, const CompilationOptions &co, const ExecutionOptions &eo) |
FilterSelectivity | getFilterSelectivity (const std::vector< std::shared_ptr< Analyzer::Expr >> &filter_expressions, const CompilationOptions &co, const ExecutionOptions &eo) |
std::vector< PushedDownFilterInfo > | selectFiltersToBePushedDown (const RelAlgExecutor::WorkUnit &work_unit, const CompilationOptions &co, const ExecutionOptions &eo) |
bool | isRowidLookup (const WorkUnit &work_unit) |
ExecutionResult | handleOutOfMemoryRetry (const RelAlgExecutor::WorkUnit &work_unit, const std::vector< TargetMetaInfo > &targets_meta, const bool is_agg, const CompilationOptions &co, const ExecutionOptions &eo, RenderInfo *render_info, const bool was_multifrag_kernel_launch, const int64_t queue_time_ms) |
WorkUnit | createWorkUnit (const RelAlgNode *, const SortInfo &, const ExecutionOptions &eo) |
WorkUnit | createCompoundWorkUnit (const RelCompound *, const SortInfo &, const ExecutionOptions &eo) |
WorkUnit | createAggregateWorkUnit (const RelAggregate *, const SortInfo &, const bool just_explain) |
WorkUnit | createProjectWorkUnit (const RelProject *, const SortInfo &, const ExecutionOptions &eo) |
WorkUnit | createFilterWorkUnit (const RelFilter *, const SortInfo &, const bool just_explain) |
WorkUnit | createJoinWorkUnit (const RelJoin *, const SortInfo &, const bool just_explain) |
WorkUnit | createUnionWorkUnit (const RelLogicalUnion *, const SortInfo &, const ExecutionOptions &eo) |
TableFunctionWorkUnit | createTableFunctionWorkUnit (const RelTableFunction *table_func, const bool just_explain, const bool is_gpu) |
void | addTemporaryTable (const int table_id, const ResultSetPtr &result) |
void | eraseFromTemporaryTables (const int table_id) |
void | handleNop (RaExecutionDesc &ed) |
std::unordered_map< unsigned, JoinQualsPerNestingLevel > & | getLeftDeepJoinTreesInfo () |
JoinQualsPerNestingLevel | translateLeftDeepJoinFilter (const RelLeftDeepInnerJoin *join, const std::vector< InputDescriptor > &input_descs, const std::unordered_map< const RelAlgNode *, int > &input_to_nest_level, const bool just_explain) |
std::list< std::shared_ptr < Analyzer::Expr > > | makeJoinQuals (const RexScalar *join_condition, const std::vector< JoinType > &join_types, const std::unordered_map< const RelAlgNode *, int > &input_to_nest_level, const bool just_explain) const |
void | setHasStepForUnion (bool flag) |
bool | hasStepForUnion () const |
bool | canUseResultsetCache (const ExecutionOptions &eo, RenderInfo *render_info) const |
void | setupCaching (const RelAlgNode *ra) |
![]() | |
StorageIOFacility (Executor *executor) | |
StorageIOFacility::UpdateCallback | yieldUpdateCallback (UpdateTransactionParameters &update_parameters) |
StorageIOFacility::UpdateCallback | yieldDeleteCallback (DeleteTransactionParameters &delete_parameters) |
Static Private Member Functions | |
static void | handlePersistentError (const int32_t error_code) |
Private Attributes | |
Executor * | executor_ |
std::unique_ptr< RelAlgDag > | query_dag_ |
std::shared_ptr< const query_state::QueryState > | query_state_ |
TemporaryTables | temporary_tables_ |
time_t | now_ |
std::unordered_map< unsigned, JoinQualsPerNestingLevel > | left_deep_join_info_ |
std::vector< std::shared_ptr < Analyzer::Expr > > | target_exprs_owned_ |
std::unordered_map< unsigned, AggregatedResult > | leaf_results_ |
int64_t | queue_time_ms_ |
bool | has_step_for_union_ |
std::unique_ptr < TransactionParameters > | dml_transaction_parameters_ |
std::optional< std::function < void()> > | post_execution_callback_ |
Static Private Attributes | |
static SpeculativeTopNBlacklist | speculative_topn_blacklist_ |
Friends | |
class | PendingExecutionClosure |
Additional Inherited Members | |
![]() | |
using | UpdateCallback = UpdateLogForFragment::Callback |
using | TableDescriptorType = TableDescriptor |
using | DeleteVictimOffsetList = std::vector< uint64_t > |
using | UpdateTargetOffsetList = std::vector< uint64_t > |
using | UpdateTargetTypeList = std::vector< TargetMetaInfo > |
using | UpdateTargetColumnNamesList = std::vector< std::string > |
using | TransactionLog = Fragmenter_Namespace::InsertOrderFragmenter::ModifyTransactionTracker |
using | TransactionLogPtr = std::unique_ptr< TransactionLog > |
using | ColumnValidationFunction = std::function< bool(std::string const &)> |
Definition at line 52 of file RelAlgExecutor.h.
using RelAlgExecutor::TargetInfoList = std::vector<TargetInfo> |
Definition at line 54 of file RelAlgExecutor.h.
|
inline |
Definition at line 56 of file RelAlgExecutor.h.
References initializeParallelismHints().
|
inline |
Definition at line 66 of file RelAlgExecutor.h.
References initializeParallelismHints().
|
inline |
Definition at line 78 of file RelAlgExecutor.h.
References initializeParallelismHints().
|
inline |
Definition at line 128 of file RelAlgExecutor.h.
References CHECK, and leaf_results_.
|
inlineprivate |
Definition at line 396 of file RelAlgExecutor.h.
References CHECK, CHECK_LT, and temporary_tables_.
Referenced by executeRelAlgSeq(), executeRelAlgStep(), executeSort(), executeTableFunction(), and handleNop().
|
private |
Definition at line 490 of file RelAlgExecutor.cpp.
References g_cluster, g_enable_data_recycler, g_use_query_resultset_cache, hasStepForUnion(), anonymous_namespace{RelAlgExecutor.cpp}::is_validate_or_explain_query(), heavyai::InSituFlagsOwnerInterface::isInSitu(), and ExecutionOptions::outer_fragment_indices.
Referenced by executeRelAlgStep(), executeSort(), executeTableFunction(), and executeWorkUnit().
void RelAlgExecutor::cleanupPostExecution | ( | ) |
Definition at line 811 of file RelAlgExecutor.cpp.
References CHECK, and executor_.
Referenced by executeRelAlgQueryNoRetry(), and getOuterFragmentCount().
AggregatedColRange RelAlgExecutor::computeColRangesCache | ( | ) |
Definition at line 791 of file RelAlgExecutor.cpp.
References executor_, anonymous_namespace{RelAlgExecutor.cpp}::get_physical_inputs_with_spi_col_id(), and getRootRelAlgNode().
StringDictionaryGenerations RelAlgExecutor::computeStringDictionaryGenerations | ( | ) |
Definition at line 797 of file RelAlgExecutor.cpp.
References executor_, anonymous_namespace{RelAlgExecutor.cpp}::get_physical_inputs_with_spi_col_id(), and getRootRelAlgNode().
TableGenerations RelAlgExecutor::computeTableGenerations | ( | ) |
Definition at line 802 of file RelAlgExecutor.cpp.
References executor_, get_physical_table_inputs(), and getRootRelAlgNode().
|
private |
Definition at line 2528 of file RelAlgExecutor.cpp.
References CHECK, CHECK_EQ, WindowProjectNodeContext::create(), createWindowFunctionContext(), RelAlgExecutor::WorkUnit::exe_unit, executor_, ExecutionOptions::executor_type, Extern, get_table_infos(), Analyzer::WindowFunction::getPartitionKeys(), RelAlgExecutionUnit::input_descs, kBOOLEAN, kBW_EQ, kONE, RelAlgExecutionUnit::target_exprs, and anonymous_namespace{RelAlgExecutor.cpp}::transform_to_inner().
Referenced by executeUpdate(), and executeWorkUnit().
|
private |
Definition at line 4792 of file RelAlgExecutor.cpp.
References CHECK_EQ, RegisteredQueryHint::defaults(), executor_, QueryPlanDagExtractor::extractJoinInfo(), g_default_max_groups_buffer_entry_guess, anonymous_namespace{RelAlgExecutor.cpp}::get_input_desc(), anonymous_namespace{RelAlgExecutor.cpp}::get_input_nest_levels(), anonymous_namespace{RelAlgExecutor.cpp}::get_join_type(), get_table_infos(), anonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta(), RelAlgNode::getInput(), getLeftDeepJoinTreesInfo(), RelAlgNode::getOutputMetainfo(), RelAlgNode::getQueryPlanDagHash(), RelAlgNode::inputCount(), now_, query_dag_, query_state_, RelAlgNode::setOutputMetainfo(), anonymous_namespace{RelAlgExecutor.cpp}::synthesize_inputs(), target_exprs_owned_, anonymous_namespace{RelAlgExecutor.cpp}::translate_groupby_exprs(), and anonymous_namespace{RelAlgExecutor.cpp}::translate_targets().
Referenced by createWorkUnit(), and executeAggregate().
|
private |
Definition at line 4473 of file RelAlgExecutor.cpp.
References CHECK_EQ, RegisteredQueryHint::defaults(), anonymous_namespace{RelAlgExecutor.cpp}::do_table_reordering(), executor_, ExecutionOptions::executor_type, QueryPlanDagExtractor::extractJoinInfo(), g_default_max_groups_buffer_entry_guess, g_from_table_reordering, anonymous_namespace{RelAlgExecutor.cpp}::get_input_desc(), anonymous_namespace{RelAlgExecutor.cpp}::get_input_nest_levels(), anonymous_namespace{RelAlgExecutor.cpp}::get_join_type(), anonymous_namespace{RelAlgExecutor.cpp}::get_left_deep_join_input_sizes(), get_table_infos(), anonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta(), RelAlgNode::getInput(), getLeftDeepJoinTreesInfo(), RelAlgNode::getQueryPlanDagHash(), anonymous_namespace{RelAlgExecutor.cpp}::has_valid_query_plan_dag(), RelAlgNode::inputCount(), ExecutionOptions::just_explain, LEFT, anonymous_namespace{RelAlgExecutor.cpp}::left_deep_join_types(), now_, shared::printContainer(), query_dag_, query_state_, anonymous_namespace{RelAlgExecutor.cpp}::rewrite_quals(), RelAlgNode::setOutputMetainfo(), RelAlgExecutionUnit::simple_quals, RelCompound::size(), target_exprs_owned_, anonymous_namespace{RelAlgExecutor.cpp}::translate_groupby_exprs(), anonymous_namespace{RelAlgExecutor.cpp}::translate_quals(), anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources(), anonymous_namespace{RelAlgExecutor.cpp}::translate_targets(), translateLeftDeepJoinFilter(), and VLOG.
Referenced by createWorkUnit(), executeCompound(), executeDelete(), executeUpdate(), and getOuterFragmentCount().
|
private |
Definition at line 5306 of file RelAlgExecutor.cpp.
References CHECK_EQ, RegisteredQueryHint::defaults(), executor_, QueryPlanDagExtractor::extractJoinInfo(), fold_expr(), g_default_max_groups_buffer_entry_guess, anonymous_namespace{RelAlgExecutor.cpp}::get_input_desc(), anonymous_namespace{RelAlgExecutor.cpp}::get_input_nest_levels(), anonymous_namespace{RelAlgExecutor.cpp}::get_inputs_meta(), anonymous_namespace{RelAlgExecutor.cpp}::get_join_type(), anonymous_namespace{RelAlgExecutor.cpp}::get_raw_pointers(), get_table_infos(), RelFilter::getCondition(), getLeftDeepJoinTreesInfo(), RelAlgNode::getQueryPlanDagHash(), RelAlgNode::inputCount(), now_, query_dag_, query_state_, rewrite_expr(), RelAlgNode::setOutputMetainfo(), and target_exprs_owned_.
Referenced by createWorkUnit(), and executeFilter().
|
private |
|
private |
Definition at line 4856 of file RelAlgExecutor.cpp.
References RegisteredQueryHint::defaults(), anonymous_namespace{RelAlgExecutor.cpp}::do_table_reordering(), executor_, ExecutionOptions::executor_type, QueryPlanDagExtractor::extractJoinInfo(), g_default_max_groups_buffer_entry_guess, g_from_table_reordering, anonymous_namespace{RelAlgExecutor.cpp}::get_input_desc(), anonymous_namespace{RelAlgExecutor.cpp}::get_input_nest_levels(), anonymous_namespace{RelAlgExecutor.cpp}::get_join_type(), anonymous_namespace{RelAlgExecutor.cpp}::get_left_deep_join_input_sizes(), anonymous_namespace{RelAlgExecutor.cpp}::get_raw_pointers(), get_table_infos(), anonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta(), RelAlgNode::getInput(), getLeftDeepJoinTreesInfo(), RelAlgNode::getQueryPlanDagHash(), anonymous_namespace{RelAlgExecutor.cpp}::has_valid_query_plan_dag(), ExecutionOptions::just_explain, anonymous_namespace{RelAlgExecutor.cpp}::left_deep_join_types(), now_, query_dag_, query_state_, RelAlgNode::setOutputMetainfo(), target_exprs_owned_, anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources(), and translateLeftDeepJoinFilter().
Referenced by createWorkUnit(), executeDelete(), executeProject(), executeUpdate(), and getOuterFragmentCount().
|
private |
Definition at line 3430 of file RelAlgExecutor.cpp.
References CHECK_GT, RelSort::collationCount(), SpeculativeTopNBlacklist::contains(), createWorkUnit(), Default, anonymous_namespace{RelAlgExecutor.cpp}::first_oe_is_desc(), g_default_max_groups_buffer_entry_guess, anonymous_namespace{RelAlgExecutor.cpp}::get_scan_limit(), get_target_info(), RelAlgNode::getInput(), RelSort::getLimit(), RelSort::getOffset(), RelAlgExecutionUnit::input_descs, RelSort::isLimitDelivered(), RelAlgNode::setOutputMetainfo(), speculative_topn_blacklist_, SpeculativeTopN, and StreamingTopN.
Referenced by executeRelAlgQuerySingleStep(), and executeSort().
|
private |
Definition at line 5084 of file RelAlgExecutor.cpp.
References bind_table_function(), CHECK, CHECK_EQ, CHECK_GT, CHECK_LT, RelTableFunction::countRexLiteralArgs(), DEFAULT_ROW_MULTIPLIER_VALUE, executor_, ext_arg_type_to_type_info(), anonymous_namespace{RelAlgExecutor.cpp}::get_input_desc(), anonymous_namespace{RelAlgExecutor.cpp}::get_input_nest_levels(), anonymous_namespace{RelAlgExecutor.cpp}::get_raw_pointers(), get_table_infos(), anonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta(), RelTableFunction::getColInputsSize(), RelTableFunction::getFunctionName(), RelTableFunction::getTableFuncInputAt(), kENCODING_ARRAY, kINT, LOG, now_, query_state_, RelAlgNode::setOutputMetainfo(), TableFunctions, TableFunctionExecutionUnit::target_exprs, target_exprs_owned_, to_string(), TRANSIENT_DICT_ID, anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources(), UNREACHABLE, and logger::WARNING.
Referenced by executeTableFunction().
|
private |
Definition at line 4977 of file RelAlgExecutor.cpp.
References gpu_enabled::accumulate(), shared::append_move(), CHECK, RelRexToStringConfig::defaults(), RegisteredQueryHint::defaults(), EMPTY_HASHED_PLAN_DAG_KEY, executor_, g_default_max_groups_buffer_entry_guess, anonymous_namespace{RelAlgExecutor.cpp}::get_input_desc(), anonymous_namespace{RelAlgExecutor.cpp}::get_input_nest_levels(), anonymous_namespace{RelAlgExecutor.cpp}::get_raw_pointers(), get_table_infos(), anonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta(), RelAlgNode::getInput(), RelAlgNode::getOutputMetainfo(), RelLogicalUnion::isAll(), shared::printContainer(), query_state_, RelAlgNode::setOutputMetainfo(), anonymous_namespace{RelAlgExecutor.cpp}::target_exprs_for_union(), target_exprs_owned_, RelAlgNode::toString(), and VLOG.
Referenced by executeUnion().
|
private |
Definition at line 2604 of file RelAlgExecutor.cpp.
References RegisteredQueryHint::aggregate_tree_fanout, RelAlgExecutor::WorkUnit::body, CHECK, CHECK_EQ, Data_Namespace::CPU_LEVEL, CompilationOptions::device_type, RelAlgExecutor::WorkUnit::exe_unit, executor_, g_window_function_aggregation_tree_fanout, Analyzer::WindowFunction::getArgs(), Analyzer::WindowFunction::getCollation(), ColumnFetcher::getOneColumnFragment(), Analyzer::WindowFunction::getOrderKeys(), RelAlgNode::getQueryPlanDagHash(), GPU, Data_Namespace::GPU_LEVEL, RelAlgExecutionUnit::hash_table_build_plan_dag, Analyzer::WindowFunction::isFrameNavigateWindowFunction(), OneToMany, RelAlgExecutionUnit::query_hint, RelAlgExecutionUnit::table_id_to_node_map, VLOG, WINDOW_FUNCTION, and WINDOW_FUNCTION_FRAMING.
Referenced by computeWindow().
|
private |
Definition at line 4297 of file RelAlgExecutor.cpp.
References createAggregateWorkUnit(), createCompoundWorkUnit(), createFilterWorkUnit(), createProjectWorkUnit(), RelRexToStringConfig::defaults(), logger::FATAL, ExecutionOptions::just_explain, LOG, and RelAlgNode::toString().
Referenced by createSortInputWorkUnit(), and getJoinInfo().
|
inlineprivate |
|
private |
Definition at line 2340 of file RelAlgExecutor.cpp.
References createAggregateWorkUnit(), DEBUG_TIMER, Default, executeWorkUnit(), RelAlgNode::getOutputMetainfo(), and ExecutionOptions::just_explain.
Referenced by executeRelAlgStep().
|
private |
Definition at line 2322 of file RelAlgExecutor.cpp.
References createCompoundWorkUnit(), DEBUG_TIMER, Default, executeWorkUnit(), RelAlgNode::getOutputMetainfo(), and RelCompound::isAggregate().
Referenced by executeRelAlgStep().
|
private |
Definition at line 2215 of file RelAlgExecutor.cpp.
References CHECK, CHECK_EQ, Executor::clearExternalCaches(), createCompoundWorkUnit(), createProjectWorkUnit(), DEBUG_TIMER, Default, RelRexToStringConfig::defaults(), dml_transaction_parameters_, executor_, CompilationOptions::filter_on_deleted_column, get_table_infos(), get_temporary_table(), QueryExecutionError::getErrorCode(), getErrorMessageFromCode(), CompilationOptions::makeCpuOnly(), post_execution_callback_, table_is_temporary(), temporary_tables_, and StorageIOFacility::yieldDeleteCallback().
Referenced by executeRelAlgStep().
|
private |
Definition at line 2740 of file RelAlgExecutor.cpp.
References createFilterWorkUnit(), DEBUG_TIMER, Default, executeWorkUnit(), RelAlgNode::getOutputMetainfo(), and ExecutionOptions::just_explain.
Referenced by executeRelAlgStep().
|
private |
Definition at line 2795 of file RelAlgExecutor.cpp.
References CPU, DEBUG_TIMER, executor_, RelLogicalValues::getNumRows(), RelLogicalValues::getTupleType(), kBIGINT, kCOUNT, kNULLT, Projection, query_mem_desc, and RelAlgNode::setOutputMetainfo().
Referenced by executeRelAlgStep().
|
private |
Definition at line 2888 of file RelAlgExecutor.cpp.
References CPU, DEBUG_TIMER, executor_, and ExecutionOptions::just_explain.
Referenced by executeRelAlgStep().
void RelAlgExecutor::executePostExecutionCallback | ( | ) |
Definition at line 4290 of file RelAlgExecutor.cpp.
References post_execution_callback_, and VLOG.
|
private |
Definition at line 2370 of file RelAlgExecutor.cpp.
References CHECK, CHECK_EQ, CPU, createProjectWorkUnit(), DEBUG_TIMER, Default, executeWorkUnit(), get_temporary_table(), RelAlgNode::getInput(), RelAlgNode::getOutputMetainfo(), RelAlgNode::inputCount(), RelProject::isSimple(), and temporary_tables_.
Referenced by executeRelAlgStep().
ExecutionResult RelAlgExecutor::executeRelAlgQuery | ( | const CompilationOptions & | co, |
const ExecutionOptions & | eo, | ||
const bool | just_explain_plan, | ||
RenderInfo * | render_info | ||
) |
Definition at line 573 of file RelAlgExecutor.cpp.
References CHECK, DEBUG_TIMER, executeRelAlgQueryNoRetry(), RenderInfo::forceNonInSitu(), g_allow_cpu_retry, logger::INFO, INJECT_TIMER, RelAlgDag::kBuiltOptimized, LOG, CompilationOptions::makeCpuOnly(), post_execution_callback_, query_dag_, run_benchmark::run_query(), and VLOG.
|
private |
Definition at line 616 of file RelAlgExecutor.cpp.
References ExecutionOptions::allow_runtime_query_interrupt, CHECK, cleanupPostExecution(), DEBUG_TIMER, Executor::ERR_INTERRUPTED, executeRelAlgQueryWithFilterPushDown(), executeRelAlgSeq(), executor_, ExecutionOptions::find_push_down_candidates, g_enable_dynamic_watchdog, QueryExecutionError::getErrorCode(), getGlobalQueryHint(), getParsedQueryHint(), getRelAlgDag(), getSubqueries(), INJECT_TIMER, join(), ExecutionOptions::just_calcite_explain, ExecutionOptions::just_explain, ExecutionOptions::just_validate, anonymous_namespace{RelAlgExecutor.cpp}::prepare_for_system_table_execution(), anonymous_namespace{RelAlgExecutor.cpp}::prepare_foreign_table_for_execution(), query_dag_, query_state_, run_benchmark_import::result, gpu_enabled::reverse(), RelAlgDag::setGlobalQueryHints(), setupCaching(), RelRexToStringConfig::skip_input_nodes, gpu_enabled::sort(), timer_start(), timer_stop(), and to_string().
Referenced by executeRelAlgQuery().
QueryStepExecutionResult RelAlgExecutor::executeRelAlgQuerySingleStep | ( | const RaExecutionSequence & | seq, |
const size_t | step_idx, | ||
const CompilationOptions & | co, | ||
const ExecutionOptions & | eo, | ||
RenderInfo * | render_info | ||
) |
Definition at line 841 of file RelAlgExecutor.cpp.
References CHECK, CHECK_EQ, anonymous_namespace{RelAlgExecutor.cpp}::check_sort_node_source_constraint(), CPU, createSortInputWorkUnit(), CompilationOptions::device_type, executeRelAlgSubSeq(), anonymous_namespace{RelAlgExecutor.cpp}::get_order_entries(), RaExecutionSequence::getDescriptor(), GPU, logger::INFO, INJECT_TIMER, ExecutionOptions::just_validate, LOG, anonymous_namespace{RelAlgExecutor.cpp}::node_is_aggregate(), post_execution_callback_, queue_time_ms_, Reduce, GroupByAndAggregate::shard_count_for_top_groups(), gpu_enabled::sort(), Union, and VLOG.
ExecutionResult RelAlgExecutor::executeRelAlgQueryWithFilterPushDown | ( | const RaExecutionSequence & | seq, |
const CompilationOptions & | co, | ||
const ExecutionOptions & | eo, | ||
RenderInfo * | render_info, | ||
const int64_t | queue_time_ms | ||
) |
Definition at line 148 of file JoinFilterPushDown.cpp.
References CHECK, executeRelAlgSeq(), executor_, ExecutionOptions::find_push_down_candidates, getSubqueries(), ExecutionOptions::just_calcite_explain, run_benchmark_import::result, and RaExecutionSequence::size().
Referenced by executeRelAlgQueryNoRetry().
ExecutionResult RelAlgExecutor::executeRelAlgSeq | ( | const RaExecutionSequence & | seq, |
const CompilationOptions & | co, | ||
const ExecutionOptions & | eo, | ||
RenderInfo * | render_info, | ||
const int64_t | queue_time_ms, | ||
const bool | with_existing_temp_tables = false |
||
) |
Definition at line 925 of file RelAlgExecutor.cpp.
References addTemporaryTable(), CHECK, CHECK_GE, DEBUG_TIMER, CompilationOptions::device_type, RaExecutionSequence::empty(), executeRelAlgStep(), executor_, RenderInfo::forceNonInSitu(), g_allow_query_step_cpu_retry, g_allow_query_step_skipping, g_cluster, g_enable_interop, RaExecutionDesc::getBody(), RaExecutionSequence::getDescriptor(), RaExecutionSequence::getSkippedQueryStepCacheKeys(), GPU, RaExecutionSequence::hasQueryStepForUnion(), logger::INFO, INJECT_TIMER, ExecutionOptions::just_explain, ExecutionOptions::keep_result, left_deep_join_info_, LOG, CompilationOptions::makeCpuOnly(), now_, RaExecutionSequence::size(), gpu_enabled::swap(), target_exprs_owned_, temporary_tables_, and VLOG.
Referenced by executeRelAlgQueryNoRetry(), and executeRelAlgQueryWithFilterPushDown().
|
private |
Definition at line 1071 of file RelAlgExecutor.cpp.
References addTemporaryTable(), ExecutionOptions::allow_loop_joins, anonymous_namespace{RelAlgExecutor.cpp}::build_render_targets(), canUseResultsetCache(), CHECK, CPU, DEBUG_TIMER, RelRexToStringConfig::defaults(), CompilationOptions::device_type, ExecutionOptions::dynamic_watchdog_time_limit, executeAggregate(), executeCompound(), executeDelete(), executeFilter(), executeLogicalValues(), executeModify(), executeProject(), executeSort(), executeTableFunction(), executeUnion(), executeUpdate(), executor_, logger::FATAL, g_cluster, g_enable_data_recycler, g_skip_intermediate_count, g_use_query_resultset_cache, RelAlgNode::getContextData(), RaExecutionSequence::getDescriptor(), RaExecutionSequence::getDescriptorByBodyId(), RelAlgNode::getId(), RelAlgNode::getInput(), getParsedQueryHint(), handleNop(), anonymous_namespace{RelAlgExecutor.cpp}::has_valid_query_plan_dag(), RelAlgNode::hasContextData(), RaExecutionSequence::hasQueryStepForUnion(), logger::INFO, INJECT_TIMER, kAllowLoopJoin, kColumnarOutput, kCpuMode, kCudaBlockSize, kCudaGridSize, kDisableLoopJoin, kDynamicWatchdog, kDynamicWatchdogOff, ExecutionOptions::keep_result, kKeepResult, kKeepTableFuncResult, kMaxJoinHashTableSize, kOptCudaBlockAndGridSizes, kQueryTimeLimit, kRowwiseOutput, kWatchdog, kWatchdogOff, LOG, ExecutionOptions::max_join_hash_table_size, ExecutionOptions::optimize_cuda_block_and_grid_sizes, ExecutionOptions::outer_fragment_indices, ExecutionOptions::output_columnar_hint, setHasStepForUnion(), gpu_enabled::sort(), VLOG, ExecutionOptions::with_dynamic_watchdog, and ExecutionOptions::with_watchdog.
Referenced by executeRelAlgSeq(), and executeRelAlgSubSeq().
ExecutionResult RelAlgExecutor::executeRelAlgSubSeq | ( | const RaExecutionSequence & | seq, |
const std::pair< size_t, size_t > | interval, | ||
const CompilationOptions & | co, | ||
const ExecutionOptions & | eo, | ||
RenderInfo * | render_info, | ||
const int64_t | queue_time_ms | ||
) |
Definition at line 1026 of file RelAlgExecutor.cpp.
References CHECK, CompilationOptions::device_type, executeRelAlgStep(), executor_, RenderInfo::forceNonInSitu(), g_allow_query_step_cpu_retry, g_cluster, RaExecutionSequence::getDescriptor(), GPU, logger::INFO, INJECT_TIMER, left_deep_join_info_, LOG, CompilationOptions::makeCpuOnly(), now_, gpu_enabled::swap(), and temporary_tables_.
Referenced by executeRelAlgQuerySingleStep().
ExecutionResult RelAlgExecutor::executeSimpleInsert | ( | const Analyzer::Query & | insert_query, |
Fragmenter_Namespace::InsertDataLoader & | inserter, | ||
const Catalog_Namespace::SessionInfo & | session | ||
) |
Definition at line 2906 of file RelAlgExecutor.cpp.
References append_datum(), DataBlockPtr::arraysPtr, CHECK, CHECK_EQ, checked_malloc(), Fragmenter_Namespace::InsertData::columnIds, ColumnDescriptor::columnType, CPU, Fragmenter_Namespace::InsertData::data, Fragmenter_Namespace::InsertData::databaseId, executor_, import_export::fill_missing_columns(), get_column_descriptor(), SQLTypeInfo::get_compression(), SQLTypeInfo::get_elem_type(), Analyzer::Query::get_result_col_list(), Analyzer::Query::get_result_table_id(), SQLTypeInfo::get_size(), SQLTypeInfo::get_type(), Analyzer::Query::get_values_lists(), Catalog_Namespace::SessionInfo::getCatalog(), Fragmenter_Namespace::InsertDataLoader::getLeafCount(), Catalog_Namespace::Catalog::getMetadataForTable(), inline_fixed_encoding_null_val(), anonymous_namespace{RelAlgExecutor.cpp}::insert_one_dict_str(), Fragmenter_Namespace::InsertDataLoader::insertData(), CacheInvalidator< CACHE_HOLDING_TYPES >::invalidateCachesByTable(), is_null(), SQLTypeInfo::is_string(), kARRAY, kBIGINT, kBOOLEAN, kCAST, kCHAR, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kENCODING_NONE, kFLOAT, kINT, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNUMERIC, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, kVARCHAR, DataBlockPtr::numbersPtr, Fragmenter_Namespace::InsertData::numRows, anonymous_namespace{TypedDataAccessors.h}::put_null(), anonymous_namespace{TypedDataAccessors.h}::put_null_array(), DataBlockPtr::stringsPtr, Fragmenter_Namespace::InsertData::tableId, and to_string().
|
private |
Definition at line 3260 of file RelAlgExecutor.cpp.
References SpeculativeTopNBlacklist::add(), addTemporaryTable(), anonymous_namespace{RelAlgExecutor.cpp}::build_render_targets(), canUseResultsetCache(), CHECK, CHECK_EQ, anonymous_namespace{RelAlgExecutor.cpp}::check_sort_node_source_constraint(), RelSort::collationCount(), createSortInputWorkUnit(), DEBUG_TIMER, executeWorkUnit(), executor_, anonymous_namespace{RelAlgExecutor.cpp}::first_oe_is_desc(), g_cluster, anonymous_namespace{RelAlgExecutor.cpp}::get_order_entries(), ExecutionResult::getDataPtr(), RelAlgNode::getId(), RelAlgNode::getInput(), RelSort::getLimit(), RelSort::getOffset(), GPU, anonymous_namespace{RelAlgExecutor.cpp}::has_valid_query_plan_dag(), RelSort::isEmptyResult(), leaf_results_, anonymous_namespace{RelAlgExecutor.cpp}::node_is_aggregate(), ExecutionOptions::output_columnar_hint, run_benchmark_import::result, RelAlgNode::setOutputMetainfo(), gpu_enabled::sort(), speculative_topn_blacklist_, temporary_tables_, use_speculative_top_n(), and VLOG.
Referenced by executeRelAlgStep().
|
private |
Definition at line 2402 of file RelAlgExecutor.cpp.
References addTemporaryTable(), canUseResultsetCache(), CHECK, createTableFunctionWorkUnit(), DEBUG_TIMER, Executor::ERR_OUT_OF_GPU_MEM, executor_, g_allow_auto_resultset_caching, g_auto_resultset_caching_threshold, g_cluster, g_enable_table_functions, get_table_infos(), QueryExecutionError::getErrorCode(), getGlobalQueryHint(), RelAlgNode::getQueryPlanDagHash(), RelAlgNode::getRelNodeDagId(), ScanNodeTableKeyCollector::getScanNodeTableKey(), GPU, handlePersistentError(), anonymous_namespace{RelAlgExecutor.cpp}::has_valid_query_plan_dag(), hasStepForUnion(), INJECT_TIMER, anonymous_namespace{RelAlgExecutor.cpp}::is_validate_or_explain_query(), ExecutionOptions::just_explain, ExecutionOptions::keep_result, kKeepTableFuncResult, run_benchmark_import::result, target_exprs_owned_, timer_start(), timer_stop(), and VLOG.
Referenced by executeRelAlgStep().
|
private |
Definition at line 2769 of file RelAlgExecutor.cpp.
References anonymous_namespace{QueryMemoryDescriptor.cpp}::any_of(), createUnionWorkUnit(), DEBUG_TIMER, Default, executeWorkUnit(), RelLogicalUnion::getCompatibleMetainfoTypes(), RelAlgNode::getOutputMetainfo(), RelLogicalUnion::isAll(), isGeometry(), CompilationOptions::makeCpuOnly(), and RelAlgNode::setOutputMetainfo().
Referenced by executeRelAlgStep().
|
private |
Definition at line 2055 of file RelAlgExecutor.cpp.
References CompilationOptions::allow_lazy_fetch, CHECK, CHECK_EQ, Executor::clearExternalCaches(), computeWindow(), CPU, createCompoundWorkUnit(), createProjectWorkUnit(), DEBUG_TIMER, Default, RelRexToStringConfig::defaults(), dml_transaction_parameters_, executor_, CompilationOptions::filter_on_deleted_column, get_table_infos(), get_temporary_table(), QueryExecutionError::getErrorCode(), getErrorMessageFromCode(), CompilationOptions::hoist_literals, leaf_results_, CompilationOptions::makeCpuOnly(), post_execution_callback_, StorageIOFacility::TransactionParameters::setInputSourceNode(), temporary_tables_, and StorageIOFacility::yieldUpdateCallback().
Referenced by executeRelAlgStep().