OmniSciDB
a5dc49c757
|
#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 |
bool | hasContextData () const |
const RaExecutionDesc * | getContextData () const |
const size_t | inputCount () const |
const RelAlgNode * | getInput (const size_t idx) const |
const std::vector< RelAlgNode const * > | getInputs () 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=RelRexToStringConfig::defaults()) const =0 |
virtual size_t | size () const =0 |
virtual std::shared_ptr < RelAlgNode > | deepCopy () const =0 |
void | clearContextData () const |
virtual size_t | toHash () const =0 |
Public Member Functions inherited from RelAlgDagNode | |
RelAlgDagNode () | |
virtual void | accept (Visitor &v, std::string name) const =0 |
virtual void | acceptChildren (Visitor &v) const =0 |
virtual size_t | getStepNumber () const |
virtual void | setStepNumber (size_t step) const |
std::optional< size_t > | getIdInPlanTree () const |
void | setIdInPlanTree (size_t id) const |
Static Public Member Functions | |
static void | resetRelAlgFirstId () noexcept |
Protected Attributes | |
RelAlgInputs | inputs_ |
unsigned | id_ |
std::optional< size_t > | hash_ |
Protected Attributes inherited from RelAlgDagNode | |
size_t | step_ {0} |
std::optional< size_t > | id_in_plan_tree_ |
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 828 of file RelAlgDag.h.
|
inline |
Definition at line 830 of file RelAlgDag.h.
|
inlinevirtual |
Definition at line 838 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 940 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 890 of file RelAlgDag.h.
References CHECK_LT, and inputs_.
Referenced by get_left_deep_join_root().
|
inline |
Definition at line 873 of file RelAlgDag.h.
References context_data_.
Referenced by RelAlgExecutor::executeRelAlgStep().
|
inline |
Definition at line 869 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 RelLeftDeepTreeIdsCollector::visitLeftDeepInnerJoin().
|
inline |
Definition at line 877 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 882 of file RelAlgDag.h.
References inputs_, and anonymous_namespace{Utm.h}::n.
Referenced by RelProject::acceptChildren(), RelAggregate::acceptChildren(), RelJoin::acceptChildren(), RelTranslatedJoin::acceptChildren(), RelFilter::acceptChildren(), RelLeftDeepInnerJoin::acceptChildren(), RelCompound::acceptChildren(), RelSort::acceptChildren(), RelModify::acceptChildren(), RelTableFunction::acceptChildren(), RelLogicalValues::acceptChildren(), and RelLogicalUnion::acceptChildren().
|
inline |
Definition at line 865 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 863 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 921 of file RelAlgDag.h.
References dag_node_id_.
Referenced by RelAlgExecutor::executeTableFunction(), and QueryPlanDagExtractor::registerNodeToDagCache().
|
inline |
Definition at line 871 of file RelAlgDag.h.
References context_data_.
Referenced by RelAlgExecutor::executeRelAlgStep().
|
inline |
|
inline |
Definition at line 875 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 925 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 908 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 840 of file RelAlgDag.h.
References context_data_, and targets_metainfo_.
|
staticnoexcept |
Definition at line 47 of file RelAlgDag.cpp.
References crt_id_, and anonymous_namespace{RelAlgDag.cpp}::FIRST_RA_NODE_ID.
Referenced by RelAlgDagBuilder::buildDag().
|
inline |
|
inline |
Definition at line 850 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 854 of file RelAlgDag.h.
References hash_value(), query_plan_dag_, and query_plan_dag_hash_.
Referenced by QueryPlanDagExtractor::extractQueryPlanDag().
|
inline |
Definition at line 919 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{RelAlgDag.cpp}::anonymous_namespace{RelAlgDag.cpp}::create_rex_input_for_new_project_node(), 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(), and RelAlgDag::registerQueryHint().
|
pure virtual |
Implements RelAlgDagNode.
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 958 of file RelAlgDag.h.
|
mutableprivate |
Definition at line 950 of file RelAlgDag.h.
Referenced by clearContextData(), getContextData(), hasContextData(), resetQueryExecutionState(), and setContextData().
|
staticprivate |
Definition at line 953 of file RelAlgDag.h.
Referenced by resetRelAlgFirstId().
|
mutableprivate |
Definition at line 954 of file RelAlgDag.h.
Referenced by getRelNodeDagId(), and setRelNodeDagId().
|
mutableprotected |
Definition at line 947 of file RelAlgDag.h.
Referenced by hash_value().
|
protected |
Definition at line 946 of file RelAlgDag.h.
Referenced by getId().
|
protected |
Definition at line 945 of file RelAlgDag.h.
Referenced by addManagedInput(), RelLogicalUnion::allStringCastsAreToDictionaryEncodedStrings(), RelModify::applyDeleteModificationsToInputNode(), RelModify::applyUpdateModificationsToInputNode(), getAndOwnInput(), RelLogicalUnion::getCompatibleMetainfoTypes(), RelLogicalUnion::getFieldName(), getInput(), getInputs(), RelProject::has_pushed_down_window_expr_(), hash_value(), 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::toString(), RelJoin::toString(), RelFilter::toString(), RelLeftDeepInnerJoin::toString(), RelSort::toString(), RelModify::toString(), and RelTableFunction::toString().
|
private |
Definition at line 951 of file RelAlgDag.h.
Referenced by isNop(), and markAsNop().
|
mutableprivate |
Definition at line 955 of file RelAlgDag.h.
Referenced by getQueryPlanDag(), and setQueryPlanDag().
|
mutableprivate |
Definition at line 956 of file RelAlgDag.h.
Referenced by getQueryPlanDagHash(), and setQueryPlanDag().
|
mutableprivate |
Definition at line 952 of file RelAlgDag.h.
Referenced by getOutputMetainfo(), resetQueryExecutionState(), and setOutputMetainfo().