OmniSciDB  c0231cc57d
 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 118 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().

119  {
120  return {input_descs,
122  simple_quals,
124  join_quals,
125  {},
126  {replacement_target},
127  {},
128  nullptr,
129  SortInfo{{}, SortAlgorithm::Default, 0, 0, false},
130  0,
131  query_hint,
135  false,
136  union_all,
137  query_state,
138  {replacement_target}};
139 }
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 92 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().

93  {
94  const bool use_large_estimator =
95  range > g_large_ndv_threshold || groupby_exprs.size() > 1;
96  return {input_descs,
99  quals,
100  join_quals,
101  {},
102  {},
103  {},
104  use_large_estimator ? makeExpr<Analyzer::LargeNDVEstimator>(groupby_exprs)
105  : makeExpr<Analyzer::NDVEstimator>(groupby_exprs),
106  SortInfo{{}, SortAlgorithm::Default, 0, 0, false},
107  0,
108  query_hint,
112  false,
113  union_all,
114  query_state,
115  {}};
116 }
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{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_table_infos(), Executor::getFragmentCount(), Executor::getTableFragmentIndices(), anonymous_namespace{QueryFragmentDescriptor.cpp}::is_sample_query(), is_trivial_loop_join(), 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(), 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: