OmniSciDB
c1a53651b2
|
#include <RelAlgDag.h>
Public Member Functions | |
RelAlgNode (RelAlgInputs inputs={}) | |
virtual | ~RelAlgNode () |
void | resetQueryExecutionState () |
void | setContextData (const RaExecutionDesc *context_data) const |
void | setOutputMetainfo (std::vector< TargetMetaInfo > targets_metainfo) const |
void | setQueryPlanDag (const std::string &extracted_query_plan_dag) const |
std::string | getQueryPlanDag () const |
size_t | getQueryPlanDagHash () const |
const std::vector < TargetMetaInfo > & | getOutputMetainfo () const |
unsigned | getId () const |
void | setIdInPlanTree (size_t id) const |
std::optional< size_t > | getIdInPlanTree () const |
bool | hasContextData () const |
const RaExecutionDesc * | getContextData () const |
const size_t | inputCount () const |
const RelAlgNode * | getInput (const size_t idx) const |
std::shared_ptr< const RelAlgNode > | getAndOwnInput (const size_t idx) const |
void | addManagedInput (std::shared_ptr< const RelAlgNode > input) |
bool | hasInput (const RelAlgNode *needle) const |
virtual void | replaceInput (std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input) |
void | setRelNodeDagId (const size_t id) const |
size_t | getRelNodeDagId () const |
bool | isNop () const |
void | markAsNop () |
virtual std::string | toString (RelRexToStringConfig config) const =0 |
virtual size_t | toHash () const =0 |
virtual size_t | size () const =0 |
virtual std::shared_ptr < RelAlgNode > | deepCopy () const =0 |
void | clearContextData () const |
Static Public Member Functions | |
static void | resetRelAlgFirstId () noexcept |
Protected Attributes | |
RelAlgInputs | inputs_ |
unsigned | id_ |
std::optional< size_t > | id_in_plan_tree_ |
std::optional< size_t > | hash_ |
Private Attributes | |
const RaExecutionDesc * | context_data_ |
bool | is_nop_ |
std::vector< TargetMetaInfo > | targets_metainfo_ |
size_t | dag_node_id_ |
std::string | query_plan_dag_ |
size_t | query_plan_dag_hash_ |
Static Private Attributes | |
static thread_local unsigned | crt_id_ = FIRST_RA_NODE_ID |
Friends | |
struct | RelAlgDagSerializer |
Definition at line 838 of file RelAlgDag.h.
|
inline |
Definition at line 840 of file RelAlgDag.h.
|
inlinevirtual |
Definition at line 849 of file RelAlgDag.h.
|
inline |
|
inline |
Clears the ptr to the result for this descriptor. Is only used for overriding step results in distributed mode.
Definition at line 949 of file RelAlgDag.h.
References context_data_.
|
pure virtual |
Implemented in RelLogicalUnion, RelLogicalValues, RelTableFunction, RelModify, RelSort, RelCompound, RelLeftDeepInnerJoin, RelFilter, RelTranslatedJoin, RelJoin, RelAggregate, RelProject, and RelScan.
|
inline |
Definition at line 897 of file RelAlgDag.h.
References CHECK_LT, and inputs_.
Referenced by get_left_deep_join_root().
|
inline |
Definition at line 888 of file RelAlgDag.h.
References context_data_.
Referenced by RelAlgExecutor::executeRelAlgStep().
|
inline |
Definition at line 880 of file RelAlgDag.h.
References id_.
Referenced by RelAlgExecutor::executeRelAlgStep(), RelAlgExecutor::executeSort(), RelAlgDag::getQueryHint(), QueryPlanDagExtractor::handleLeftDeepJoinTree(), RaExecutionSequence::next(), RelAlgDag::registerQueryHint(), anonymous_namespace{RelAlgExecutor.cpp}::table_key_from_ra(), anonymous_namespace{RelAlgExecutor.cpp}::target_exprs_for_union(), RexInput::toString(), and anonymous_namespace{RelAlgExecutor.cpp}::RelLeftDeepTreeIdsCollector::visitLeftDeepInnerJoin().
|
inline |
Definition at line 884 of file RelAlgDag.h.
References id_in_plan_tree_.
Referenced by RexInput::toString().
|
inline |
Definition at line 892 of file RelAlgDag.h.
References CHECK_LT, and inputs_.
Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::add_new_indices_for(), anonymous_namespace{RelAlgExecutor.cpp}::check_sort_node_source_constraint(), RelLogicalUnion::copyAndRedirectSource(), RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createProjectWorkUnit(), RelAlgExecutor::createSortInputWorkUnit(), RelAlgExecutor::createUnionWorkUnit(), RelAlgExecutor::executeProject(), RelAlgExecutor::executeRelAlgStep(), RelAlgExecutor::executeSort(), QueryPlanDagExtractor::extractQueryPlanDagImpl(), anonymous_namespace{RelAlgOptimizer.cpp}::get_actual_source_size(), anonymous_namespace{RelAlgExecutor.cpp}::get_data_sink(), anonymous_namespace{RelAlgOptimizer.cpp}::get_field_name(), anonymous_namespace{QueryPlanDagExtractor.cpp}::get_input_idx(), anonymous_namespace{RelAlgExecutor.cpp}::get_left_deep_join_input_sizes(), anonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgOptimizer.cpp}::get_visible_projects(), RelAlgExecutor::getRelAlgTranslator(), QueryPlanDagExtractor::handleLeftDeepJoinTree(), anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::hasAllSrcReady(), hoist_filter_cond_to_cross_join(), anonymous_namespace{RelAlgOptimizer.cpp}::is_distinct(), RelProject::isIdentity(), anonymous_namespace{RelAlgDag.cpp}::isRenamedInput(), project_separates_sort(), anonymous_namespace{RelAlgOptimizer.cpp}::propagate_rex_input_renumber(), anonymous_namespace{RelLeftDeepInnerJoin.cpp}::RebindRexInputsFromLeftDeepJoin::RebindRexInputsFromLeftDeepJoin(), QueryPlanDagExtractor::register_and_visit(), anonymous_namespace{RelAlgExecutor.cpp}::synthesize_inputs(), tree_string(), RelAlgVisitor< std::vector< unsigned > >::visit(), RelRexDagVisitor::visit(), JoinTargetRebaser::visitInput(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitSort().
|
inline |
Definition at line 876 of file RelAlgDag.h.
References targets_metainfo_.
Referenced by RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createUnionWorkUnit(), RelAlgExecutor::executeAggregate(), RelAlgExecutor::executeCompound(), RelAlgExecutor::executeFilter(), RelAlgExecutor::executeProject(), RelAlgExecutor::executeUnion(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgExecutor.cpp}::target_exprs_for_union(), and RelAlgTranslator::translateInput().
|
inline |
|
inline |
Definition at line 874 of file RelAlgDag.h.
References query_plan_dag_hash_.
Referenced by RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createFilterWorkUnit(), RelAlgExecutor::createProjectWorkUnit(), RelAlgExecutor::createWindowFunctionContext(), RelAlgExecutor::executeTableFunction(), QueryPlanDagExtractor::extractJoinInfo(), anonymous_namespace{RelAlgExecutor.cpp}::has_valid_query_plan_dag(), and RaExecutionSequence::next().
|
inline |
Definition at line 928 of file RelAlgDag.h.
References dag_node_id_.
Referenced by RelAlgExecutor::executeTableFunction(), and QueryPlanDagExtractor::registerNodeToDagCache().
|
inline |
Definition at line 886 of file RelAlgDag.h.
References context_data_.
Referenced by RelAlgExecutor::executeRelAlgStep().
|
inline |
|
inline |
Definition at line 890 of file RelAlgDag.h.
References inputs_.
Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::add_new_indices_for(), anonymous_namespace{RelAlgExecutor.cpp}::check_sort_node_source_constraint(), RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createFilterWorkUnit(), RelAlgExecutor::executeProject(), QueryPlanDagExtractor::extractQueryPlanDagImpl(), anonymous_namespace{RelAlgExecutor.cpp}::get_data_sink(), anonymous_namespace{QueryPlanDagExtractor.cpp}::get_input_idx(), anonymous_namespace{RelAlgExecutor.cpp}::get_join_source_used_inputs(), anonymous_namespace{RelAlgExecutor.cpp}::get_left_deep_join_input_sizes(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::hasAllSrcReady(), anonymous_namespace{RelAlgOptimizer.cpp}::is_distinct(), RelProject::isIdentity(), anonymous_namespace{RelAlgExecutor.cpp}::left_deep_join_types(), project_separates_sort(), anonymous_namespace{RelLeftDeepInnerJoin.cpp}::RebindRexInputsFromLeftDeepJoin::RebindRexInputsFromLeftDeepJoin(), QueryPlanDagExtractor::register_and_visit(), anonymous_namespace{RelAlgExecutor.cpp}::synthesize_inputs(), tree_string(), RelAlgVisitor< std::vector< unsigned > >::visit(), RelRexDagVisitor::visit(), anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitLeftDeepInnerJoin(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitSort().
|
inline |
|
inline |
Definition at line 932 of file RelAlgDag.h.
References is_nop_.
Referenced by anonymous_namespace{RelAlgDag.cpp}::mark_nops().
|
inlinevirtual |
Reimplemented in RelTableFunction, RelCompound, RelFilter, RelTranslatedJoin, RelJoin, and RelProject.
Definition at line 915 of file RelAlgDag.h.
References inputs_.
Referenced by RelProject::replaceInput(), RelJoin::replaceInput(), RelFilter::replaceInput(), RelCompound::replaceInput(), RelTableFunction::replaceInput(), and anonymous_namespace{RelAlgOptimizer.cpp}::try_insert_coalesceable_proj().
|
inline |
Definition at line 851 of file RelAlgDag.h.
References context_data_, and targets_metainfo_.
|
staticnoexcept |
Definition at line 46 of file RelAlgDag.cpp.
References crt_id_, and anonymous_namespace{RelAlgDag.cpp}::FIRST_RA_NODE_ID.
Referenced by RelAlgDagBuilder::buildDag().
|
inline |
|
inline |
|
inline |
Definition at line 861 of file RelAlgDag.h.
References targets_metainfo_.
Referenced by RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createFilterWorkUnit(), RelAlgExecutor::createProjectWorkUnit(), RelAlgExecutor::createSortInputWorkUnit(), RelAlgExecutor::createTableFunctionWorkUnit(), RelAlgExecutor::createUnionWorkUnit(), RelAlgExecutor::executeLogicalValues(), RelAlgExecutor::executeSort(), RelAlgExecutor::executeUnion(), and RaExecutionSequence::next().
|
inline |
Definition at line 865 of file RelAlgDag.h.
References query_plan_dag_, and query_plan_dag_hash_.
Referenced by QueryPlanDagExtractor::extractQueryPlanDag().
|
inline |
Definition at line 926 of file RelAlgDag.h.
References dag_node_id_.
Referenced by QueryPlanDagExtractor::extractQueryPlanDagImpl(), and QueryPlanDagExtractor::validateNodeId().
|
pure virtual |
Implemented in RelLogicalUnion, RelLogicalValues, RelTableFunction, RelModify, RelSort, RelCompound, RelLeftDeepInnerJoin, RelFilter, RelTranslatedJoin, RelJoin, RelAggregate, RelProject, and RelScan.
Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::add_new_indices_for(), anonymous_namespace{RelAlgOptimizer.cpp}::any_dead_col_in(), anonymous_namespace{RelAlgOptimizer.cpp}::get_actual_source_size(), anonymous_namespace{RelAlgOptimizer.cpp}::get_field_name(), anonymous_namespace{RelAlgDag.cpp}::isRenamedInput(), anonymous_namespace{RelAlgOptimizer.cpp}::pick_always_live_col_idx(), and anonymous_namespace{RelLeftDeepInnerJoin.cpp}::RebindRexInputsFromLeftDeepJoin::RebindRexInputsFromLeftDeepJoin().
|
pure virtual |
Implemented in RelLogicalUnion, RelLogicalValues, RelTableFunction, RelModify, RelSort, RelCompound, RelLeftDeepInnerJoin, RelFilter, RelTranslatedJoin, RelJoin, RelAggregate, RelProject, and RelScan.
Referenced by QueryPlanDagCache::addNodeIfAbsent(), RelAlgDag::getQueryHint(), RelAlgDag::registerQueryHint(), RexInput::toHash(), and RelTranslatedJoin::toHash().
|
pure virtual |
Implemented in RelLogicalUnion, RelLogicalValues, RelTableFunction, RelModify, RelSort, RelCompound, RelLeftDeepInnerJoin, RelFilter, RelTranslatedJoin, RelJoin, RelAggregate, RelProject, and RelScan.
Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::add_new_indices_for(), RelRexDagVisitor::castAndVisit(), anonymous_namespace{RelAlgExecutor.cpp}::collect_used_input_desc(), RelAlgExecutor::createUnionWorkUnit(), RelAlgExecutor::createWorkUnit(), anonymous_namespace{RelAlgExecutor.cpp}::get_join_source_used_inputs(), anonymous_namespace{RelAlgExecutor.cpp}::get_targets_meta(), anonymous_namespace{RelAlgOptimizer.cpp}::get_visible_projects(), RexInput::toString(), and RelAlgVisitor< std::vector< unsigned > >::visit().
|
friend |
Definition at line 966 of file RelAlgDag.h.
|
mutableprivate |
Definition at line 958 of file RelAlgDag.h.
Referenced by clearContextData(), getContextData(), hasContextData(), resetQueryExecutionState(), and setContextData().
|
staticprivate |
Definition at line 961 of file RelAlgDag.h.
Referenced by resetRelAlgFirstId().
|
mutableprivate |
Definition at line 962 of file RelAlgDag.h.
Referenced by getRelNodeDagId(), and setRelNodeDagId().
|
mutableprotected |
Definition at line 955 of file RelAlgDag.h.
Referenced by RelScan::toHash(), RelProject::toHash(), RelAggregate::toHash(), RelJoin::toHash(), RelTranslatedJoin::toHash(), RelFilter::toHash(), RelLeftDeepInnerJoin::toHash(), RelCompound::toHash(), RelSort::toHash(), RelModify::toHash(), RelTableFunction::toHash(), RelLogicalValues::toHash(), and RelLogicalUnion::toHash().
|
protected |
Definition at line 953 of file RelAlgDag.h.
Referenced by getId().
|
mutableprotected |
Definition at line 954 of file RelAlgDag.h.
Referenced by getIdInPlanTree(), and setIdInPlanTree().
|
protected |
Definition at line 952 of file RelAlgDag.h.
Referenced by addManagedInput(), RelModify::applyDeleteModificationsToInputNode(), RelModify::applyUpdateModificationsToInputNode(), getAndOwnInput(), RelLogicalUnion::getCompatibleMetainfoTypes(), RelLogicalUnion::getFieldName(), getInput(), RelProject::has_pushed_down_window_expr_(), hasInput(), inputCount(), RelAggregate::RelAggregate(), RelFilter::RelFilter(), RelJoin::RelJoin(), RelLogicalUnion::RelLogicalUnion(), RelModify::RelModify(), RelSort::RelSort(), RelTableFunction::RelTableFunction(), replaceInput(), RelJoin::size(), RelFilter::size(), RelLeftDeepInnerJoin::size(), RelSort::size(), RelLogicalUnion::size(), RelAggregate::toHash(), RelJoin::toHash(), RelFilter::toHash(), RelLeftDeepInnerJoin::toHash(), RelSort::toHash(), RelModify::toHash(), RelTableFunction::toHash(), RelAggregate::toString(), RelJoin::toString(), RelFilter::toString(), RelLeftDeepInnerJoin::toString(), RelSort::toString(), RelModify::toString(), and RelTableFunction::toString().
|
private |
Definition at line 959 of file RelAlgDag.h.
Referenced by isNop(), and markAsNop().
|
mutableprivate |
Definition at line 963 of file RelAlgDag.h.
Referenced by getQueryPlanDag(), and setQueryPlanDag().
|
mutableprivate |
Definition at line 964 of file RelAlgDag.h.
Referenced by getQueryPlanDagHash(), and setQueryPlanDag().
|
mutableprivate |
Definition at line 960 of file RelAlgDag.h.
Referenced by getOutputMetainfo(), resetQueryExecutionState(), and setOutputMetainfo().