OmniSciDB
a5dc49c757
|
#include <RelAlgExecutionUnit.h>
Public Member Functions | |
RelAlgExecutionUnit | createNdvExecutionUnit (const int64_t range) const |
RelAlgExecutionUnit | createCountAllExecutionUnit (Analyzer::Expr *replacement_target) const |
template<SQLAgg AggType> | |
void | eachAggTarget (std::function< void(Analyzer::AggExpr const *, size_t target_idx)> lambda) const |
Definition at line 165 of file RelAlgExecutionUnit.h.
RelAlgExecutionUnit RelAlgExecutionUnit::createCountAllExecutionUnit | ( | Analyzer::Expr * | replacement_target | ) | const |
Definition at line 117 of file CardinalityEstimator.cpp.
References hash_table_build_plan_dag, input_col_descs, input_descs, join_quals, quals, query_hint, query_plan_dag_hash, query_state, simple_quals, strip_join_covered_filter_quals(), table_id_to_node_map, and union_all.
Referenced by RelAlgExecutor::getFilteredCountAll().
RelAlgExecutionUnit RelAlgExecutionUnit::createNdvExecutionUnit | ( | const int64_t | range | ) | const |
Definition at line 91 of file CardinalityEstimator.cpp.
References g_large_ndv_threshold, groupby_exprs, hash_table_build_plan_dag, input_col_descs, input_descs, join_quals, quals, query_hint, query_plan_dag_hash, query_state, simple_quals, table_id_to_node_map, and union_all.
Referenced by RelAlgExecutor::getNDVEstimation().
|
inline |
Definition at line 194 of file RelAlgExecutionUnit.h.
References target_exprs.
Referenced by QueryMemoryInitializer::allocateModeBuffer(), QueryMemoryInitializer::allocateTDigestsBuffer(), GroupByAndAggregate::initApproxQuantileDescriptors(), QueryMemoryInitializer::initializeModeIndexSet(), and QueryMemoryInitializer::initializeQuantileParams().
const std::shared_ptr<Analyzer::Estimator> RelAlgExecutionUnit::estimator |
Definition at line 174 of file RelAlgExecutionUnit.h.
Referenced by CardinalityCacheKey::CardinalityCacheKey(), GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenEstimator(), Executor::executePlanWithoutGroupBy(), QueryExecutionContext::launchCpuCode(), QueryExecutionContext::launchGpuCode(), Executor::launchKernelsImpl(), operator<<(), QueryMemoryInitializer::QueryMemoryInitializer(), reduce_estimator_results(), Executor::reduceMultiDeviceResults(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), and ExecutionKernel::runImpl().
const std::list<std::shared_ptr<Analyzer::Expr> > RelAlgExecutionUnit::groupby_exprs |
Definition at line 171 of file RelAlgExecutionUnit.h.
Referenced by Executor::addTransientStringLiterals(), CardinalityCacheKey::CardinalityCacheKey(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenGroupBy(), GroupByAndAggregate::codegenOutputSlot(), GroupByAndAggregate::codegenPerfectHashFunction(), createNdvExecutionUnit(), Executor::executePlanWithGroupBy(), get_count_distinct_sub_bitmap_count(), get_text_cast_counts(), GroupByAndAggregate::getColRangeInfo(), Executor::getDeviceTypeForTargets(), anonymous_namespace{SerializeToSql.cpp}::group_by_to_string(), GroupByAndAggregate::GroupByAndAggregate(), QueryMemoryDescriptor::init(), GroupByAndAggregate::initQueryMemoryDescriptorImpl(), anonymous_namespace{RelAlgExecutor.cpp}::is_projection(), anonymous_namespace{QueryFragmentDescriptor.cpp}::is_sample_query(), operator<<(), anonymous_namespace{QueryMemoryDescriptor.cpp}::pick_baseline_key_width(), QueryMemoryDescriptor::pick_target_compact_width(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByIn(), QueryRewriter::rewriteConstrainedByInImpl(), ExecutionKernel::runImpl(), GroupByAndAggregate::shard_count_for_top_groups(), and ScalarExprToSql::visitVar().
HashTableBuildDagMap RelAlgExecutionUnit::hash_table_build_plan_dag {} |
Definition at line 179 of file RelAlgExecutionUnit.h.
Referenced by Executor::buildCurrentLevelHashTable(), createCountAllExecutionUnit(), createNdvExecutionUnit(), RelAlgExecutor::createWindowFunctionContext(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), and QueryRewriter::rewriteConstrainedByInImpl().
std::list<std::shared_ptr<const InputColDescriptor> > RelAlgExecutionUnit::input_col_descs |
Definition at line 167 of file RelAlgExecutionUnit.h.
Referenced by CardinalityCacheKey::CardinalityCacheKey(), createCountAllExecutionUnit(), createNdvExecutionUnit(), Executor::executePlanWithGroupBy(), Executor::fetchChunks(), Executor::fetchUnionChunks(), operator<<(), QueryMemoryDescriptor::pick_target_compact_width(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), and QueryRewriter::rewriteConstrainedByInImpl().
std::vector<InputDescriptor> RelAlgExecutionUnit::input_descs |
Definition at line 166 of file RelAlgExecutionUnit.h.
Referenced by QueryFragmentDescriptor::buildFragmentKernelMap(), QueryFragmentDescriptor::buildFragmentPerKernelForTable(), QueryFragmentDescriptor::buildFragmentPerKernelMap(), QueryFragmentDescriptor::buildFragmentPerKernelMapForUnion(), Executor::buildIsDeletedCb(), QueryFragmentDescriptor::buildMultifragKernelMap(), Executor::buildSelectedFragsMapping(), Executor::buildSelectedFragsMappingForUnion(), anonymous_namespace{IRCodegen.cpp}::check_if_loop_join_is_allowed(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), QueryFragmentDescriptor::computeAllTablesFragments(), RelAlgExecutor::computeWindow(), createCountAllExecutionUnit(), Executor::createKernels(), createNdvExecutionUnit(), RelAlgExecutor::createSortInputWorkUnit(), Executor::executePlanWithGroupBy(), RelAlgExecutor::executeWorkUnit(), Executor::fetchChunks(), Executor::fetchUnionChunks(), find_push_down_filters(), anonymous_namespace{SerializeToSql.cpp}::from_to_string(), anonymous_namespace{QueryMemoryInitializer.cpp}::get_input_idx(), get_loop_join_size(), get_table_infos(), Executor::getFragmentCount(), Executor::getTableFragmentIndices(), anonymous_namespace{QueryFragmentDescriptor.cpp}::is_sample_query(), RelAlgExecutor::isRowidLookup(), Executor::needFetchAllFragments(), QueryFragmentDescriptor::QueryFragmentDescriptor(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByInImpl(), ExecutionKernel::runImpl(), RelAlgExecutor::selectFiltersToBePushedDown(), Executor::skipFragmentPair(), and anonymous_namespace{QueryMemoryDescriptor.cpp}::target_expr_proj_indices().
const JoinQualsPerNestingLevel RelAlgExecutionUnit::join_quals |
Definition at line 170 of file RelAlgExecutionUnit.h.
Referenced by Executor::buildHoistLeftHandSideFiltersCb(), Executor::buildJoinLoops(), QueryMemoryDescriptor::canUsePerDeviceCardinality(), CardinalityCacheKey::CardinalityCacheKey(), anonymous_namespace{IRCodegen.cpp}::check_if_loop_join_is_allowed(), GroupByAndAggregate::codegen(), createCountAllExecutionUnit(), createNdvExecutionUnit(), anonymous_namespace{RelAlgExecutor.cpp}::exe_unit_has_quals(), find_push_down_filters(), get_text_cast_counts(), RelAlgExecutor::getFilteredCountAll(), Executor::getFragmentCount(), Executor::getRowCountAndOffsetForAllFrags(), anonymous_namespace{SerializeToSql.cpp}::join_condition_to_string(), Executor::needFetchAllFragments(), Executor::nukeOldState(), operator<<(), anonymous_namespace{ExecutionKernel.cpp}::query_has_inner_join(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByInImpl(), Executor::skipFragmentInnerJoins(), and Executor::skipFragmentPair().
|
mutable |
Definition at line 186 of file RelAlgExecutionUnit.h.
Referenced by Executor::executeWorkUnitImpl(), RelAlgExecutor::getFilteredCountAll(), and QueryMemoryDescriptor::getMaxPerDeviceCardinality().
std::list<std::shared_ptr<Analyzer::Expr> > RelAlgExecutionUnit::quals |
Definition at line 169 of file RelAlgExecutionUnit.h.
Referenced by anonymous_namespace{IRCodegen.cpp}::add_qualifier_to_execution_unit(), Executor::addTransientStringLiterals(), Executor::buildHoistLeftHandSideFiltersCb(), CardinalityCacheKey::CardinalityCacheKey(), createCountAllExecutionUnit(), createNdvExecutionUnit(), anonymous_namespace{RelAlgExecutor.cpp}::exe_unit_has_quals(), anonymous_namespace{GroupByAndAggregate.cpp}::get_keyless_info(), get_text_cast_counts(), GroupByAndAggregate::getColRangeInfo(), RelAlgExecutor::getFilteredCountAll(), anonymous_namespace{QueryFragmentDescriptor.cpp}::is_sample_query(), operator<<(), CodeGenerator::prioritizeQuals(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByIn(), QueryRewriter::rewriteConstrainedByInImpl(), anonymous_namespace{QueryMemoryDescriptor.cpp}::target_expr_proj_indices(), and anonymous_namespace{SerializeToSql.cpp}::where_to_string().
RegisteredQueryHint RelAlgExecutionUnit::query_hint |
Definition at line 177 of file RelAlgExecutionUnit.h.
Referenced by Executor::buildCurrentLevelHashTable(), anonymous_namespace{IRCodegen.cpp}::check_if_loop_join_is_allowed(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), anonymous_namespace{RelAlgExecutor.cpp}::compute_output_buffer_size(), createCountAllExecutionUnit(), createNdvExecutionUnit(), RelAlgExecutor::createWindowFunctionContext(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), and QueryRewriter::rewriteConstrainedByInImpl().
QueryPlanHash RelAlgExecutionUnit::query_plan_dag_hash {EMPTY_HASHED_PLAN_DAG_KEY} |
Definition at line 178 of file RelAlgExecutionUnit.h.
Referenced by createCountAllExecutionUnit(), createNdvExecutionUnit(), operator<<(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), and QueryRewriter::rewriteConstrainedByInImpl().
std::shared_ptr<const query_state::QueryState> RelAlgExecutionUnit::query_state |
Definition at line 184 of file RelAlgExecutionUnit.h.
Referenced by createCountAllExecutionUnit(), createNdvExecutionUnit(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), and QueryRewriter::rewriteColumnarUpdate().
size_t RelAlgExecutionUnit::scan_limit |
Definition at line 176 of file RelAlgExecutionUnit.h.
Referenced by CardinalityCacheKey::CardinalityCacheKey(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), anonymous_namespace{Execute.cpp}::compute_buffer_entry_guess(), anonymous_namespace{RelAlgExecutor.cpp}::compute_output_buffer_size(), Executor::executePlanWithGroupBy(), anonymous_namespace{QueryFragmentDescriptor.cpp}::is_sample_query(), operator<<(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByInImpl(), ExecutionKernel::runImpl(), and anonymous_namespace{RelAlgExecutor.cpp}::should_output_columnar().
std::list<std::shared_ptr<Analyzer::Expr> > RelAlgExecutionUnit::simple_quals |
Definition at line 168 of file RelAlgExecutionUnit.h.
Referenced by anonymous_namespace{IRCodegen.cpp}::add_qualifier_to_execution_unit(), Executor::addTransientStringLiterals(), QueryFragmentDescriptor::buildFragmentPerKernelForTable(), Executor::buildHoistLeftHandSideFiltersCb(), QueryFragmentDescriptor::buildMultifragKernelMap(), CardinalityCacheKey::CardinalityCacheKey(), RelAlgExecutor::createCompoundWorkUnit(), createCountAllExecutionUnit(), createNdvExecutionUnit(), anonymous_namespace{RelAlgExecutor.cpp}::exe_unit_has_quals(), anonymous_namespace{GroupByAndAggregate.cpp}::get_expr_range_info(), get_text_cast_counts(), GroupByAndAggregate::getColRangeInfo(), RelAlgExecutor::getFilteredCountAll(), anonymous_namespace{QueryFragmentDescriptor.cpp}::is_sample_query(), operator<<(), CodeGenerator::prioritizeQuals(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByIn(), QueryRewriter::rewriteConstrainedByInImpl(), anonymous_namespace{QueryMemoryDescriptor.cpp}::target_expr_proj_indices(), and anonymous_namespace{SerializeToSql.cpp}::where_to_string().
const SortInfo RelAlgExecutionUnit::sort_info |
Definition at line 175 of file RelAlgExecutionUnit.h.
Referenced by QueryMemoryInitializer::applyStreamingTopNOffsetCpu(), anonymous_namespace{RelAlgExecutor.cpp}::can_output_columnar(), anonymous_namespace{RelAlgExecutor.cpp}::can_use_bump_allocator(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), GroupByAndAggregate::codegenOutputSlot(), Executor::collectAllDeviceShardedTopResults(), QueryMemoryInitializer::copyGroupByBuffersFromGpu(), QueryMemoryInitializer::createAndInitializeGroupByBufferGpu(), RelAlgExecutor::createWindowFunctionContext(), QueryMemoryDescriptor::getBufferSizeBytes(), GroupByAndAggregate::getColRangeInfo(), QueryMemoryInitializer::initGroupByBuffer(), GroupByAndAggregate::initQueryMemoryDescriptor(), anonymous_namespace{QueryFragmentDescriptor.cpp}::is_sample_query(), QueryExecutionContext::launchGpuCode(), operator<<(), Executor::reduceSpeculativeTopN(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByInImpl(), GroupByAndAggregate::shard_count_for_top_groups(), anonymous_namespace{QueryMemoryDescriptor.cpp}::target_expr_proj_indices(), QueryFragmentDescriptor::terminateDispatchMaybe(), use_speculative_top_n(), and anonymous_namespace{QueryMemoryDescriptor.cpp}::use_streaming_top_n().
TableIdToNodeMap RelAlgExecutionUnit::table_id_to_node_map {} |
Definition at line 180 of file RelAlgExecutionUnit.h.
Referenced by Executor::buildCurrentLevelHashTable(), createCountAllExecutionUnit(), createNdvExecutionUnit(), RelAlgExecutor::createWindowFunctionContext(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), and QueryRewriter::rewriteConstrainedByInImpl().
std::vector<Analyzer::Expr*> RelAlgExecutionUnit::target_exprs |
Definition at line 172 of file RelAlgExecutionUnit.h.
Referenced by Executor::addTransientStringLiterals(), QueryMemoryInitializer::allocateCountDistinctBuffers(), QueryMemoryInitializer::allocateModeBuffer(), QueryMemoryInitializer::allocateTDigestsBuffer(), SpeculativeTopNMap::asRows(), QueryMemoryInitializer::calculateCountDistinctBufferSize(), anonymous_namespace{RelAlgExecutor.cpp}::can_output_columnar(), CardinalityCacheKey::CardinalityCacheKey(), anonymous_namespace{QueryMemoryInitializer.cpp}::check_count_distinct_expr_metadata(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenAggCalls(), GroupByAndAggregate::codegenOutputSlot(), anonymous_namespace{QueryMemoryInitializer.cpp}::collect_target_expr_metadata(), Executor::collectAllDeviceResults(), anonymous_namespace{RelAlgExecutor.cpp}::compute_output_buffer_size(), RelAlgExecutor::computeWindow(), Executor::createKernels(), anonymous_namespace{RelAlgExecutor.cpp}::decide_approx_count_distinct_implementation(), eachAggTarget(), RelAlgExecutor::executeWorkUnit(), anonymous_namespace{GroupByAndAggregate.cpp}::get_keyless_info(), get_text_cast_counts(), GroupByAndAggregate::getColRangeInfo(), Executor::getDeviceTypeForTargets(), RowFunctionManager::getDictDbId(), RowFunctionManager::getDictId(), GroupByAndAggregate::gpuCanHandleOrderEntries(), anonymous_namespace{GroupByAndAggregate.cpp}::has_count_distinct(), QueryMemoryDescriptor::init(), anonymous_namespace{GroupByAndAggregate.cpp}::init_count_distinct_descriptors(), QueryMemoryInitializer::initColumnarGroups(), QueryMemoryInitializer::initializeModeIndexSet(), QueryMemoryInitializer::initializeQuantileParams(), anonymous_namespace{RelAlgExecutor.cpp}::is_window_execution_unit(), anonymous_namespace{ExecutionKernel.cpp}::need_to_hold_chunk(), operator<<(), QueryMemoryDescriptor::pick_target_compact_width(), QueryMemoryDescriptor::QueryMemoryDescriptor(), QueryMemoryInitializer::QueryMemoryInitializer(), Executor::reduceMultiDeviceResults(), Executor::reduceSpeculativeTopN(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), Executor::resultsUnion(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByInImpl(), ExecutionKernel::runImpl(), anonymous_namespace{RelAlgExecutor.cpp}::should_output_columnar(), anonymous_namespace{QueryMemoryDescriptor.cpp}::target_expr_proj_indices(), anonymous_namespace{SerializeToSql.cpp}::targets_to_string(), use_speculative_top_n(), and anonymous_namespace{QueryMemoryDescriptor.cpp}::use_streaming_top_n().
std::unordered_map<size_t, SQLTypeInfo> RelAlgExecutionUnit::target_exprs_original_type_infos |
Definition at line 173 of file RelAlgExecutionUnit.h.
Referenced by anonymous_namespace{GroupByAndAggregate.cpp}::init_count_distinct_descriptors(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), and QueryRewriter::rewriteConstrainedByInImpl().
std::vector<Analyzer::Expr*> RelAlgExecutionUnit::target_exprs_union |
Definition at line 185 of file RelAlgExecutionUnit.h.
Referenced by Executor::addTransientStringLiterals(), QueryMemoryDescriptor::canUsePerDeviceCardinality(), and QueryMemoryInitializer::QueryMemoryInitializer().
const std::optional<bool> RelAlgExecutionUnit::union_all |
Definition at line 183 of file RelAlgExecutionUnit.h.
Referenced by QueryFragmentDescriptor::buildFragmentKernelMap(), createCountAllExecutionUnit(), createNdvExecutionUnit(), Executor::executePlanWithGroupBy(), Executor::getRowCountAndOffsetForAllFrags(), operator<<(), QueryMemoryInitializer::QueryMemoryInitializer(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), and ExecutionKernel::runImpl().
bool RelAlgExecutionUnit::use_bump_allocator {false} |
Definition at line 181 of file RelAlgExecutionUnit.h.
Referenced by anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), QueryMemoryInitializer::createAndInitializeGroupByBufferGpu(), Executor::createKernels(), RelAlgExecutor::handleOutOfMemoryRetry(), QueryExecutionContext::launchGpuCode(), operator<<(), QueryMemoryDescriptor::QueryMemoryDescriptor(), QueryMemoryInitializer::QueryMemoryInitializer(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), and QueryRewriter::rewriteColumnarUpdate().