OmniSciDB
a5dc49c757
|
#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, const bool explain_verbose, 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) |
bool | hasDeletedRowInQuery (std::vector< InputTableInfo > const &) const |
std::optional< size_t > | getFilteredCountAll (const RelAlgExecutionUnit &ra_exe_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, ColumnCacheMap &column_cache, const std::vector< TargetMetaInfo > &targets_meta, const bool is_agg, const CompilationOptions &co, const ExecutionOptions &eo, RenderInfo *render_info, const QueryExecutionError &e, 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) |
Private Member Functions inherited from StorageIOFacility | |
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 | |
Private Types inherited from StorageIOFacility | |
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 53 of file RelAlgExecutor.h.
using RelAlgExecutor::TargetInfoList = std::vector<TargetInfo> |
Definition at line 55 of file RelAlgExecutor.h.
|
inline |
Definition at line 57 of file RelAlgExecutor.h.
References initializeParallelismHints().
|
inline |
Definition at line 67 of file RelAlgExecutor.h.
References initializeParallelismHints().
|
inline |
Definition at line 79 of file RelAlgExecutor.h.
References initializeParallelismHints().
|
inline |
Definition at line 130 of file RelAlgExecutor.h.
References CHECK, and leaf_results_.
|
inlineprivate |
Definition at line 402 of file RelAlgExecutor.h.
References CHECK, CHECK_LT, and temporary_tables_.
Referenced by executeRelAlgSeq(), executeRelAlgStep(), executeSort(), executeTableFunction(), and handleNop().
|
private |
Definition at line 483 of file RelAlgExecutor.cpp.
References g_cluster, g_enable_data_recycler, g_use_query_resultset_cache, hasStepForUnion(), 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 776 of file RelAlgExecutor.cpp.
References CHECK, and executor_.
Referenced by executeRelAlgQueryNoRetry(), and getOuterFragmentCount().
AggregatedColRange RelAlgExecutor::computeColRangesCache | ( | ) |
Definition at line 756 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 762 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 767 of file RelAlgExecutor.cpp.
References executor_, get_physical_table_inputs(), and getRootRelAlgNode().
|
private |
Definition at line 2492 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 4849 of file RelAlgExecutor.cpp.
References QueryPlanDagExtractor::applyLimitClauseToCacheKey(), 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 4513 of file RelAlgExecutor.cpp.
References QueryPlanDagExtractor::applyLimitClauseToCacheKey(), CHECK_EQ, convert_bbox_intersect_join(), RegisteredQueryHint::defaults(), anonymous_namespace{RelAlgExecutor.cpp}::do_table_reordering(), executor_, ExecutionOptions::executor_type, 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(), 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(), ExecutionOptions::table_reordering, 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 5400 of file RelAlgExecutor.cpp.
References QueryPlanDagExtractor::applyLimitClauseToCacheKey(), 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 4914 of file RelAlgExecutor.cpp.
References QueryPlanDagExtractor::applyLimitClauseToCacheKey(), convert_bbox_intersect_join(), RegisteredQueryHint::defaults(), anonymous_namespace{RelAlgExecutor.cpp}::do_table_reordering(), executor_, ExecutionOptions::executor_type, 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(), 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_, shared::printContainer(), query_dag_, query_state_, RelAlgNode::setOutputMetainfo(), ExecutionOptions::table_reordering, target_exprs_owned_, anonymous_namespace{RelAlgExecutor.cpp}::translate_scalar_sources(), translateLeftDeepJoinFilter(), and VLOG.
Referenced by createWorkUnit(), executeDelete(), executeProject(), executeUpdate(), and getOuterFragmentCount().
|
private |
Definition at line 3394 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, RelAlgNode::setOutputMetainfo(), speculative_topn_blacklist_, SpeculativeTopN, and StreamingTopN.
Referenced by executeRelAlgQuerySingleStep(), and executeSort().
|
private |
Definition at line 5156 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(), IS_GEO, kENCODING_ARRAY, kENCODING_NONE, kINT, shared::StringDictKey::kTransientDictKey, 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 5049 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 2568 of file RelAlgExecutor.cpp.
References RegisteredQueryHint::aggregate_tree_fanout, QueryPlanDagExtractor::applyLimitClauseToCacheKey(), 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, hash_value(), Analyzer::WindowFunction::isFrameNavigateWindowFunction(), OneToMany, RelAlgExecutionUnit::query_hint, RelAlgExecutionUnit::sort_info, RelAlgExecutionUnit::table_id_to_node_map, VLOG, WINDOW_FUNCTION, and WINDOW_FUNCTION_FRAMING.
Referenced by computeWindow().
|
private |
Definition at line 4332 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 2302 of file RelAlgExecutor.cpp.
References createAggregateWorkUnit(), DEBUG_TIMER, executeWorkUnit(), RelAlgNode::getOutputMetainfo(), and ExecutionOptions::just_explain.
Referenced by executeRelAlgStep().
|
private |
Definition at line 2285 of file RelAlgExecutor.cpp.
References createCompoundWorkUnit(), DEBUG_TIMER, executeWorkUnit(), RelAlgNode::getOutputMetainfo(), and RelCompound::isAggregate().
Referenced by executeRelAlgStep().
|
private |
Definition at line 2180 of file RelAlgExecutor.cpp.
References CHECK, CHECK_EQ, Executor::clearExternalCaches(), createCompoundWorkUnit(), createProjectWorkUnit(), DEBUG_TIMER, 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 2707 of file RelAlgExecutor.cpp.
References createFilterWorkUnit(), DEBUG_TIMER, executeWorkUnit(), RelAlgNode::getOutputMetainfo(), and ExecutionOptions::just_explain.
Referenced by executeRelAlgStep().
|
private |
Definition at line 2760 of file RelAlgExecutor.cpp.
References CPU, DEBUG_TIMER, executor_, RelLogicalValues::getNumRows(), RelLogicalValues::getTupleType(), kBIGINT, kCOUNT, kNULLT, heavyai::Projection, query_mem_desc, and RelAlgNode::setOutputMetainfo().
Referenced by executeRelAlgStep().
|
private |
Definition at line 2850 of file RelAlgExecutor.cpp.
References CPU, DEBUG_TIMER, executor_, and ExecutionOptions::just_explain.
Referenced by executeRelAlgStep().
void RelAlgExecutor::executePostExecutionCallback | ( | ) |
Definition at line 4325 of file RelAlgExecutor.cpp.
References post_execution_callback_, and VLOG.
|
private |
Definition at line 2331 of file RelAlgExecutor.cpp.
References CHECK, CHECK_EQ, CPU, createProjectWorkUnit(), DEBUG_TIMER, CompilationOptions::device_type, 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, | ||
const bool | explain_verbose, | ||
RenderInfo * | render_info | ||
) |
Definition at line 564 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 608 of file RelAlgExecutor.cpp.
References ExecutionOptions::allow_runtime_query_interrupt, CHECK, cleanupPostExecution(), DEBUG_TIMER, executeRelAlgQueryWithFilterPushDown(), executeRelAlgSeq(), executor_, ExecutionOptions::find_push_down_candidates, g_enable_dynamic_watchdog, getGlobalQueryHint(), RelAlgDag::getNodes(), getParsedQueryHint(), getRelAlgDag(), getRootRelAlgNode(), getSubqueries(), RelAlgDagViewer::handleQueryEngineVector(), QueryExecutionError::hasErrorCode(), INJECT_TIMER, 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, RelAlgDag::setGlobalQueryHints(), setupCaching(), timer_start(), and timer_stop().
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 806 of file RelAlgExecutor.cpp.
References CHECK, CHECK_EQ, anonymous_namespace{RelAlgExecutor.cpp}::check_sort_node_source_constraint(), CPU, createSortInputWorkUnit(), CompilationOptions::device_type, executeRelAlgSubSeq(), 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 890 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 1154 of file RelAlgExecutor.cpp.
References addTemporaryTable(), QueryPlanDagExtractor::applyLimitClauseToCacheKey(), build_render_targets(), canUseResultsetCache(), CHECK, SortInfo::createFromSortNode(), DEBUG_TIMER, RelRexToStringConfig::defaults(), executeAggregate(), executeCompound(), executeDelete(), executeFilter(), executeLogicalValues(), executeModify(), executeProject(), executeSort(), executeTableFunction(), executeUnion(), executeUpdate(), executor_, logger::FATAL, g_cluster, g_skip_intermediate_count, RelAlgNode::getContextData(), RaExecutionSequence::getDescriptor(), RaExecutionSequence::getDescriptorByBodyId(), RelAlgNode::getId(), RelAlgNode::getInput(), getParsedQueryHint(), anonymous_namespace{RelAlgDag.cpp}::handle_query_hint(), handleNop(), anonymous_namespace{RelAlgExecutor.cpp}::has_valid_query_plan_dag(), RelAlgNode::hasContextData(), RaExecutionSequence::hasQueryStepForUnion(), INJECT_TIMER, LOG, ExecutionOptions::outer_fragment_indices, setHasStepForUnion(), gpu_enabled::sort(), VLOG, 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 991 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 2868 of file RelAlgExecutor.cpp.
References append_datum(), DataBlockPtr::arraysPtr, CHECK, CHECK_EQ, checked_malloc(), Executor::clearExternalCaches(), 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(), 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 3232 of file RelAlgExecutor.cpp.
References SpeculativeTopNBlacklist::add(), addTemporaryTable(), anonymous_namespace{QueryMemoryDescriptor.cpp}::any_of(), QueryPlanDagExtractor::applyLimitClauseToCacheKey(), build_render_targets(), canUseResultsetCache(), CHECK, CHECK_EQ, anonymous_namespace{RelAlgExecutor.cpp}::check_sort_node_source_constraint(), RelSort::collationCount(), CPU, createSortInputWorkUnit(), DEBUG_TIMER, CompilationOptions::device_type, executeWorkUnit(), executor_, anonymous_namespace{RelAlgExecutor.cpp}::first_oe_is_desc(), g_cluster, anonymous_namespace{RelAlgExecutor.cpp}::get_limit_value(), ExecutionResult::getDataPtr(), RelAlgNode::getId(), RelAlgNode::getInput(), RelSort::getLimit(), RelSort::getOffset(), RelSort::getOrderEntries(), GPU, anonymous_namespace{RelAlgExecutor.cpp}::has_valid_query_plan_dag(), hasStepForUnion(), anonymous_namespace{RelAlgExecutor.cpp}::is_none_encoded_text(), RelSort::isEmptyResult(), ExecutionOptions::just_validate, leaf_results_, anonymous_namespace{RelAlgExecutor.cpp}::node_is_aggregate(), run_benchmark_import::result, RelAlgNode::setOutputMetainfo(), gpu_enabled::sort(), speculative_topn_blacklist_, SpeculativeTopN, temporary_tables_, use_speculative_top_n(), and VLOG.
Referenced by executeRelAlgStep().
|
private |
Definition at line 2363 of file RelAlgExecutor.cpp.
References addTemporaryTable(), canUseResultsetCache(), CHECK, createTableFunctionWorkUnit(), DEBUG_TIMER, 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(), QueryExecutionError::hasErrorCode(), hasStepForUnion(), INJECT_TIMER, 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 2735 of file RelAlgExecutor.cpp.
References anonymous_namespace{QueryMemoryDescriptor.cpp}::any_of(), createUnionWorkUnit(), DEBUG_TIMER, executeWorkUnit(), RelLogicalUnion::getCompatibleMetainfoTypes(), RelAlgNode::getOutputMetainfo(), RelLogicalUnion::isAll(), isGeometry(), CompilationOptions::makeCpuOnly(), and RelAlgNode::setOutputMetainfo().
Referenced by executeRelAlgStep().
|
private |
Definition at line 2022 of file RelAlgExecutor.cpp.
References CompilationOptions::allow_lazy_fetch, CHECK, CHECK_EQ, Executor::clearExternalCaches(), computeWindow(), CPU, createCompoundWorkUnit(), createProjectWorkUnit(), DEBUG_TIMER, 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().