OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RelAlgExecutionUnit Struct Reference

#include <RelAlgExecutionUnit.h>

+ Collaboration diagram for RelAlgExecutionUnit:

Public Member Functions

RelAlgExecutionUnit createNdvExecutionUnit (const int64_t range) const
 
RelAlgExecutionUnit createCountAllExecutionUnit (Analyzer::Expr *replacement_target) const
 

Public Attributes

std::vector< InputDescriptorinput_descs
 
std::list< std::shared_ptr
< const InputColDescriptor > > 
input_col_descs
 
std::list< std::shared_ptr
< Analyzer::Expr > > 
simple_quals
 
std::list< std::shared_ptr
< Analyzer::Expr > > 
quals
 
const JoinQualsPerNestingLevel join_quals
 
const std::list
< std::shared_ptr
< Analyzer::Expr > > 
groupby_exprs
 
std::vector< Analyzer::Expr * > target_exprs
 
std::unordered_map< size_t,
SQLTypeInfo
target_exprs_original_type_infos
 
const std::shared_ptr
< Analyzer::Estimator
estimator
 
const SortInfo sort_info
 
size_t scan_limit
 
RegisteredQueryHint query_hint
 
QueryPlanHash query_plan_dag_hash {EMPTY_HASHED_PLAN_DAG_KEY}
 
HashTableBuildDagMap hash_table_build_plan_dag {}
 
TableIdToNodeMap table_id_to_node_map {}
 
bool use_bump_allocator {false}
 
const std::optional< bool > union_all
 
std::shared_ptr< const
query_state::QueryState
query_state
 
std::vector< Analyzer::Expr * > target_exprs_union
 

Detailed Description

Definition at line 131 of file RelAlgExecutionUnit.h.

Member Function Documentation

RelAlgExecutionUnit RelAlgExecutionUnit::createCountAllExecutionUnit ( Analyzer::Expr replacement_target) const

Definition at line 117 of file CardinalityEstimator.cpp.

References Default, 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().

118  {
119  return {input_descs,
121  simple_quals,
123  join_quals,
124  {},
125  {replacement_target},
126  {},
127  nullptr,
128  SortInfo{{}, SortAlgorithm::Default, 0, 0, false},
129  0,
130  query_hint,
134  false,
135  union_all,
136  query_state,
137  {replacement_target}};
138 }
QueryPlanHash query_plan_dag_hash
const std::optional< bool > union_all
std::vector< InputDescriptor > input_descs
std::list< std::shared_ptr< Analyzer::Expr > > strip_join_covered_filter_quals(const std::list< std::shared_ptr< Analyzer::Expr >> &quals, const JoinQualsPerNestingLevel &join_quals)
const JoinQualsPerNestingLevel join_quals
TableIdToNodeMap table_id_to_node_map
std::list< std::shared_ptr< Analyzer::Expr > > quals
RegisteredQueryHint query_hint
std::shared_ptr< const query_state::QueryState > query_state
std::list< std::shared_ptr< const InputColDescriptor > > input_col_descs
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals
HashTableBuildDagMap hash_table_build_plan_dag

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

RelAlgExecutionUnit RelAlgExecutionUnit::createNdvExecutionUnit ( const int64_t  range) const

Definition at line 91 of file CardinalityEstimator.cpp.

References Default, 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().

92  {
93  const bool use_large_estimator =
94  range > g_large_ndv_threshold || groupby_exprs.size() > 1;
95  return {input_descs,
98  quals,
99  join_quals,
100  {},
101  {},
102  {},
103  use_large_estimator ? makeExpr<Analyzer::LargeNDVEstimator>(groupby_exprs)
104  : makeExpr<Analyzer::NDVEstimator>(groupby_exprs),
105  SortInfo{{}, SortAlgorithm::Default, 0, 0, false},
106  0,
107  query_hint,
111  false,
112  union_all,
113  query_state,
114  {}};
115 }
int64_t g_large_ndv_threshold
QueryPlanHash query_plan_dag_hash
const std::optional< bool > union_all
std::vector< InputDescriptor > input_descs
const std::list< std::shared_ptr< Analyzer::Expr > > groupby_exprs
const JoinQualsPerNestingLevel join_quals
TableIdToNodeMap table_id_to_node_map
std::list< std::shared_ptr< Analyzer::Expr > > quals
RegisteredQueryHint query_hint
std::shared_ptr< const query_state::QueryState > query_state
std::list< std::shared_ptr< const InputColDescriptor > > input_col_descs
std::list< std::shared_ptr< Analyzer::Expr > > simple_quals
HashTableBuildDagMap hash_table_build_plan_dag

+ Here is the caller graph for this function:

Member Data Documentation

const std::list<std::shared_ptr<Analyzer::Expr> > RelAlgExecutionUnit::groupby_exprs

Definition at line 137 of file RelAlgExecutionUnit.h.

Referenced by Executor::addTransientStringLiterals(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenGroupBy(), GroupByAndAggregate::codegenOutputSlot(), GroupByAndAggregate::codegenPerfectHashFunction(), anonymous_namespace{RelAlgExecutor.cpp}::compute_output_buffer_size(), createNdvExecutionUnit(), Executor::executePlanWithGroupBy(), get_count_distinct_sub_bitmap_count(), anonymous_namespace{RelAlgExecutor.cpp}::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(), ra_exec_unit_desc_for_caching(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByIn(), QueryRewriter::rewriteConstrainedByInImpl(), QueryRewriter::rewriteOverlapsJoin(), ExecutionKernel::runImpl(), GroupByAndAggregate::shard_count_for_top_groups(), and ScalarExprToSql::visitVar().

std::vector<InputDescriptor> RelAlgExecutionUnit::input_descs

Definition at line 132 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(), QueryRewriter::rewriteOverlapsJoin(), ExecutionKernel::runImpl(), RelAlgExecutor::selectFiltersToBePushedDown(), Executor::skipFragmentPair(), and anonymous_namespace{QueryMemoryDescriptor.cpp}::target_expr_proj_indices().

std::vector<Analyzer::Expr*> RelAlgExecutionUnit::target_exprs

Definition at line 138 of file RelAlgExecutionUnit.h.

Referenced by Executor::addTransientStringLiterals(), SpeculativeTopNMap::asRows(), anonymous_namespace{RelAlgExecutor.cpp}::can_output_columnar(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), GroupByAndAggregate::codegen(), GroupByAndAggregate::codegenAggCalls(), GroupByAndAggregate::codegenOutputSlot(), Executor::collectAllDeviceResults(), anonymous_namespace{RelAlgExecutor.cpp}::compute_output_buffer_size(), RelAlgExecutor::computeWindow(), Executor::createKernels(), anonymous_namespace{RelAlgExecutor.cpp}::decide_approx_count_distinct_implementation(), RelAlgExecutor::executeWorkUnit(), anonymous_namespace{GroupByAndAggregate.cpp}::get_keyless_info(), anonymous_namespace{RelAlgExecutor.cpp}::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(), 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(), ra_exec_unit_desc_for_caching(), Executor::reduceMultiDeviceResults(), Executor::reduceSpeculativeTopN(), anonymous_namespace{Execute.cpp}::replace_scan_limit(), Executor::resultsUnion(), QueryRewriter::rewriteAggregateOnGroupByColumn(), QueryRewriter::rewriteColumnarDelete(), QueryRewriter::rewriteColumnarUpdate(), QueryRewriter::rewriteConstrainedByInImpl(), QueryRewriter::rewriteOverlapsJoin(), ExecutionKernel::runImpl(), 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::vector<Analyzer::Expr*> RelAlgExecutionUnit::target_exprs_union

The documentation for this struct was generated from the following files: