OmniSciDB
a5dc49c757
|
#include <RelAlgDag.h>
Public Member Functions | |
RelCompound (const TableDescriptor *td, const Catalog_Namespace::Catalog *catalog) | |
filter_expr_ (std::move(filter_expr)) | |
groupby_count_ (groupby_count) | |
fields_ (fields) | |
is_agg_ (is_agg) | |
scalar_sources_ (std::move(scalar_sources)) | |
target_exprs_ (target_exprs) | |
hint_applied_ (false) | |
hints_ (std::make_unique< Hints >()) | |
RelCompound (RelCompound const &) | |
virtual void | acceptChildren (Visitor &v) const override |
virtual void | accept (Visitor &v, std::string name) const override |
void | replaceInput (std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input) override |
size_t | size () const override |
const RexScalar * | getFilterExpr () const |
void | setFilterExpr (std::unique_ptr< const RexScalar > &new_expr) |
const Rex * | getTargetExpr (const size_t i) const |
const std::vector< std::string > & | getFields () const |
const std::string | getFieldName (const size_t i) const |
void | setFields (std::vector< std::string > &&fields) |
const size_t | getScalarSourcesSize () const |
const RexScalar * | getScalarSource (const size_t i) const |
void | setScalarSources (std::vector< std::unique_ptr< const RexScalar >> &new_sources) |
const size_t | getGroupByCount () const |
bool | isAggregate () const |
size_t | getAggExprSize () const |
const RexAgg * | getAggExpr (size_t i) const |
std::string | toString (RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override |
std::shared_ptr< RelAlgNode > | deepCopy () const override |
void | addHint (const ExplainedQueryHint &hint_explained) |
const bool | hasHintEnabled (QueryHint candidate_hint) const |
const ExplainedQueryHint & | getHintInfo (QueryHint hint) const |
bool | hasDeliveredHint () |
Hints * | getDeliveredHints () |
virtual size_t | toHash () const override |
Public Member Functions inherited from RelAlgNode | |
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 |
void | setRelNodeDagId (const size_t id) const |
size_t | getRelNodeDagId () const |
bool | isNop () const |
void | markAsNop () |
void | clearContextData () const |
Public Member Functions inherited from RelAlgDagNode | |
RelAlgDagNode () | |
virtual size_t | getStepNumber () const |
virtual void | setStepNumber (size_t step) const |
std::optional< size_t > | getIdInPlanTree () const |
void | setIdInPlanTree (size_t id) const |
Public Member Functions inherited from ModifyManipulationTarget | |
ModifyManipulationTarget (bool const update_via_select=false, bool const delete_via_select=false, bool const varlen_update_required=false, TableDescriptor const *table_descriptor=nullptr, ColumnNameList target_columns=ColumnNameList(), const Catalog_Namespace::Catalog *catalog=nullptr) | |
void | setUpdateViaSelectFlag (bool required) const |
void | setDeleteViaSelectFlag (bool required) const |
void | setVarlenUpdateRequired (bool required) const |
void | forceRowwiseOutput () const |
TableDescriptor const * | getModifiedTableDescriptor () const |
TableDescriptor const * | getTableDescriptor () const |
void | setModifiedTableDescriptor (TableDescriptor const *td) const |
const Catalog_Namespace::Catalog * | getModifiedTableCatalog () const |
void | setModifiedTableCatalog (const Catalog_Namespace::Catalog *catalog) const |
auto const | isUpdateViaSelect () const |
auto const | isDeleteViaSelect () const |
auto const | isVarlenUpdateRequired () const |
auto const | isProjectForUpdate () const |
auto const | isRowwiseOutputForced () const |
void | setTargetColumns (ColumnNameList const &target_columns) const |
ColumnNameList const & | getTargetColumns () const |
void | invalidateTargetColumns () const |
template<typename VALIDATION_FUNCTOR > | |
bool | validateTargetColumns (VALIDATION_FUNCTOR validator) const |
Public Attributes | |
catalog | |
groupby_count_ {0} | |
is_agg_ {false} | |
hint_applied_ | |
Private Attributes | |
std::unique_ptr< const RexScalar > | filter_expr_ |
size_t | groupby_count_ |
std::vector< std::unique_ptr < const RexAgg > > | agg_exprs_ |
std::vector< std::string > | fields_ |
bool | is_agg_ |
std::vector< std::unique_ptr < const RexScalar > > | scalar_sources_ |
std::vector< const Rex * > | target_exprs_ |
bool | hint_applied_ |
std::unique_ptr< Hints > | hints_ |
Friends | |
struct | RelAlgDagSerializer |
std::size_t | hash_value (RelCompound const &) |
Additional Inherited Members | |
Static Public Member Functions inherited from RelAlgNode | |
static void | resetRelAlgFirstId () noexcept |
Protected Attributes inherited from RelAlgNode | |
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_ |
Definition at line 2018 of file RelAlgDag.h.
|
inline |
Definition at line 2021 of file RelAlgDag.h.
RelCompound::RelCompound | ( | RelCompound const & | rhs | ) |
Definition at line 662 of file RelAlgDag.cpp.
References addHint(), filter_expr_, hint_applied_, hints_, and RexVisitorBase< T >::visit().
|
inlineoverridevirtual |
Implements RelAlgDagNode.
Definition at line 2085 of file RelAlgDag.h.
References acceptChildren(), and RelAlgDagNode::Visitor::visit().
Referenced by TableFunctionsFactory_node.PrintNode::__str__().
|
inlineoverridevirtual |
Implements RelAlgDagNode.
Definition at line 2065 of file RelAlgDag.h.
References RelAlgDagNode::accept(), RexAgg::accept(), getAggExpr(), getAggExprSize(), getFilterExpr(), RelAlgNode::getInputs(), getScalarSource(), getScalarSourcesSize(), and anonymous_namespace{Utm.h}::n.
Referenced by accept().
|
inline |
Definition at line 2136 of file RelAlgDag.h.
References ExplainedQueryHint::getHint(), hint_applied_, and hints_.
Referenced by RelCompound().
|
inlineoverridevirtual |
Implements RelAlgNode.
Definition at line 2132 of file RelAlgDag.h.
RelCompound::fields_ | ( | fields | ) |
RelCompound::filter_expr_ | ( | std:: | movefilter_expr | ) |
|
inline |
Definition at line 2127 of file RelAlgDag.h.
References agg_exprs_.
Referenced by acceptChildren().
|
inline |
Definition at line 2125 of file RelAlgDag.h.
References agg_exprs_.
Referenced by acceptChildren().
|
inline |
Definition at line 2159 of file RelAlgDag.h.
References hints_.
Referenced by anonymous_namespace{RelAlgDag.cpp}::handle_query_hint().
|
inline |
|
inline |
|
inline |
Definition at line 2096 of file RelAlgDag.h.
References filter_expr_.
Referenced by acceptChildren(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgExecutor.cpp}::translate_quals(), RelRexDagVisitor::visit(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitCompound().
|
inline |
Definition at line 2121 of file RelAlgDag.h.
References groupby_count_.
Referenced by anonymous_namespace{RelAlgExecutor.cpp}::translate_groupby_exprs().
|
inline |
Definition at line 2150 of file RelAlgDag.h.
References CHECK, hasHintEnabled(), hint_applied_, and hints_.
|
inline |
Definition at line 2112 of file RelAlgDag.h.
References scalar_sources_.
Referenced by acceptChildren(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgExecutor.cpp}::scalar_at(), RelRexDagVisitor::visit(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitCompound().
|
inline |
Definition at line 2110 of file RelAlgDag.h.
References scalar_sources_.
Referenced by acceptChildren(), anonymous_namespace{RelAlgExecutor.cpp}::get_scalar_sources_size(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), RelRexDagVisitor::visit(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitCompound().
|
inline |
Definition at line 2102 of file RelAlgDag.h.
References target_exprs_.
Referenced by anonymous_namespace{RelAlgExecutor.cpp}::translate_targets(), and QueryPlanDagChecker::visit().
RelCompound::groupby_count_ | ( | groupby_count | ) |
|
inline |
|
inline |
Definition at line 2143 of file RelAlgDag.h.
References hint_applied_, and hints_.
Referenced by getHintInfo().
RelCompound::hint_applied_ | ( | false | ) |
|
inline |
Definition at line 2056 of file RelAlgDag.h.
References agg_exprs_, and CHECK_EQ.
RelCompound::is_agg_ | ( | is_agg | ) |
|
inline |
Definition at line 2123 of file RelAlgDag.h.
References is_agg_.
Referenced by RelAlgExecutor::executeCompound(), anonymous_namespace{RelAlgExecutor.cpp}::translate_groupby_exprs(), and QueryPlanDagChecker::visit().
|
overridevirtual |
Reimplemented from RelAlgNode.
Definition at line 544 of file RelAlgDag.cpp.
References filter_expr_, RelAlgNode::replaceInput(), and scalar_sources_.
RelCompound::scalar_sources_ | ( | std:: | movescalar_sources | ) |
|
inline |
|
inline |
Definition at line 2098 of file RelAlgDag.h.
References filter_expr_.
|
inline |
Definition at line 2116 of file RelAlgDag.h.
References CHECK_EQ, and scalar_sources_.
|
inlineoverridevirtual |
Implements RelAlgNode.
Definition at line 2094 of file RelAlgDag.h.
References target_exprs_.
Referenced by RelAlgExecutor::createCompoundWorkUnit(), anonymous_namespace{RelAlgExecutor.cpp}::translate_targets(), and QueryPlanDagChecker::visit().
RelCompound::target_exprs_ | ( | target_exprs | ) |
|
inlineoverridevirtual |
Implements RelAlgNode.
Definition at line 2161 of file RelAlgDag.h.
References hash_value.
|
overridevirtual |
Implements RelAlgNode.
Definition at line 3511 of file RelAlgDag.cpp.
References agg_exprs_, RelRexToStringConfig::attributes_only, cat(), fields_, filter_expr_, groupby_count_, is_agg_, scalar_sources_, target_exprs_, to_string(), and typeName().
|
friend |
Definition at line 3775 of file RelAlgDag.cpp.
Referenced by toHash().
|
friend |
Definition at line 2178 of file RelAlgDag.h.
|
private |
Definition at line 2168 of file RelAlgDag.h.
Referenced by getAggExpr(), getAggExprSize(), hash_value(), hints_(), and toString().
RelCompound::catalog |
Definition at line 2022 of file RelAlgDag.h.
|
private |
Definition at line 2169 of file RelAlgDag.h.
Referenced by getFieldName(), getFields(), hash_value(), setFields(), and toString().
|
private |
Definition at line 2166 of file RelAlgDag.h.
Referenced by getFilterExpr(), hash_value(), RelCompound(), replaceInput(), setFilterExpr(), and toString().
RelCompound::groupby_count_ {0} |
Definition at line 2023 of file RelAlgDag.h.
Referenced by getGroupByCount(), hash_value(), and toString().
|
private |
Definition at line 2167 of file RelAlgDag.h.
RelCompound::hint_applied_ |
Definition at line 2025 of file RelAlgDag.h.
Referenced by addHint(), getHintInfo(), hasHintEnabled(), and RelCompound().
|
private |
Definition at line 2175 of file RelAlgDag.h.
|
private |
Definition at line 2176 of file RelAlgDag.h.
Referenced by addHint(), getDeliveredHints(), getHintInfo(), hasDeliveredHint(), hasHintEnabled(), and RelCompound().
RelCompound::is_agg_ {false} |
Definition at line 2024 of file RelAlgDag.h.
Referenced by hash_value(), isAggregate(), and toString().
|
private |
Definition at line 2170 of file RelAlgDag.h.
|
private |
Definition at line 2172 of file RelAlgDag.h.
Referenced by getScalarSource(), getScalarSourcesSize(), hash_value(), replaceInput(), setScalarSources(), and toString().
|
private |
Definition at line 2174 of file RelAlgDag.h.
Referenced by getTargetExpr(), hash_value(), size(), and toString().