OmniSciDB
085a039ca4
|
#include <RelAlgDagBuilder.h>
Public Types | |
using | ConstRexScalarPtr = std::unique_ptr< const RexScalar > |
using | ConstRexScalarPtrVector = std::vector< ConstRexScalarPtr > |
Public Member Functions | |
RelProject (std::vector< std::unique_ptr< const RexScalar >> &scalar_exprs, const std::vector< std::string > &fields, std::shared_ptr< const RelAlgNode > input) | |
RelProject (RelProject const &) | |
void | setExpressions (std::vector< std::unique_ptr< const RexScalar >> &exprs) const |
bool | isSimple () const |
bool | isIdentity () const |
bool | isRenaming () const |
size_t | size () const override |
const RexScalar * | getProjectAt (const size_t idx) const |
const RexScalar * | getProjectAtAndRelease (const size_t idx) const |
std::vector< std::unique_ptr < const RexScalar > > | getExpressionsAndRelease () |
const std::vector< std::string > & | getFields () const |
void | setFields (std::vector< std::string > &&fields) |
const std::string | getFieldName (const size_t i) const |
void | replaceInput (std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input) override |
void | replaceInput (std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input, std::optional< std::unordered_map< unsigned, unsigned >> old_to_new_index_map) |
void | appendInput (std::string new_field_name, std::unique_ptr< const RexScalar > new_input) |
std::string | toString (RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override |
size_t | toHash () const override |
std::shared_ptr< RelAlgNode > | deepCopy () const override |
bool | hasWindowFunctionExpr () const |
void | addHint (const ExplainedQueryHint &hint_explained) |
const bool | hasHintEnabled (QueryHint candidate_hint) const |
const ExplainedQueryHint & | getHintInfo (QueryHint hint) const |
bool | hasDeliveredHint () |
Hints * | getDeliveredHints () |
![]() | |
RelAlgNode (RelAlgInputs inputs={}) | |
virtual | ~RelAlgNode () |
void | resetQueryExecutionState () |
void | setContextData (const RaExecutionDesc *context_data) const |
void | setOutputMetainfo (const 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 |
void | setRelNodeDagId (const size_t id) const |
size_t | getRelNodeDagId () const |
bool | isNop () const |
void | markAsNop () |
void | clearContextData () const |
![]() | |
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()) | |
void | setUpdateViaSelectFlag () const |
void | setDeleteViaSelectFlag () const |
void | setVarlenUpdateRequired (bool required) const |
void | forceRowwiseOutput () const |
TableDescriptor const * | getModifiedTableDescriptor () const |
void | setModifiedTableDescriptor (TableDescriptor const *td) const |
auto const | isUpdateViaSelect () const |
auto const | isDeleteViaSelect () const |
auto const | isVarlenUpdateRequired () const |
auto const | isRowwiseOutputForced () const |
void | setTargetColumns (ColumnNameList const &target_columns) const |
ColumnNameList const & | getTargetColumns () const |
template<typename VALIDATION_FUNCTOR > | |
bool | validateTargetColumns (VALIDATION_FUNCTOR validator) const |
Private Member Functions | |
template<typename EXPR_VISITOR_FUNCTOR > | |
void | visitScalarExprs (EXPR_VISITOR_FUNCTOR visitor_functor) const |
void | injectOffsetInFragmentExpr () const |
Private Attributes | |
std::vector< std::unique_ptr < const RexScalar > > | scalar_exprs_ |
std::vector< std::string > | fields_ |
bool | hint_applied_ |
std::unique_ptr< Hints > | hints_ |
Friends | |
class | RelModify |
Additional Inherited Members | |
![]() | |
static void | resetRelAlgFirstId () noexcept |
![]() | |
RelAlgInputs | inputs_ |
const unsigned | id_ |
std::optional< size_t > | id_in_plan_tree_ |
std::optional< size_t > | hash_ |
Definition at line 1014 of file RelAlgDagBuilder.h.
using RelProject::ConstRexScalarPtr = std::unique_ptr<const RexScalar> |
Definition at line 1017 of file RelAlgDagBuilder.h.
using RelProject::ConstRexScalarPtrVector = std::vector<ConstRexScalarPtr> |
Definition at line 1018 of file RelAlgDagBuilder.h.
|
inline |
Definition at line 1021 of file RelAlgDagBuilder.h.
References RelAlgNode::inputs_.
Referenced by toHash().
RelProject::RelProject | ( | RelProject const & | rhs | ) |
Definition at line 556 of file RelAlgDagBuilder.cpp.
References addHint(), hint_applied_, hints_, scalar_exprs_, and RexVisitorBase< T >::visit().
|
inline |
Definition at line 1114 of file RelAlgDagBuilder.h.
References ExplainedQueryHint::getHint(), hint_applied_, and hints_.
Referenced by RelProject().
void RelProject::appendInput | ( | std::string | new_field_name, |
std::unique_ptr< const RexScalar > | new_input | ||
) |
Definition at line 365 of file RelAlgDagBuilder.cpp.
References fields_, and scalar_exprs_.
|
inlineoverridevirtual |
Implements RelAlgNode.
Definition at line 1108 of file RelAlgDagBuilder.h.
|
inline |
Definition at line 1137 of file RelAlgDagBuilder.h.
References hints_.
Referenced by anonymous_namespace{RelAlgDagBuilder.cpp}::handle_query_hint().
|
inline |
Definition at line 1066 of file RelAlgDagBuilder.h.
References scalar_exprs_.
|
inline |
|
inline |
Definition at line 1070 of file RelAlgDagBuilder.h.
References fields_.
Referenced by anonymous_namespace{RelAlgDagBuilder.cpp}::create_compound().
|
inline |
Definition at line 1128 of file RelAlgDagBuilder.h.
References CHECK, hasHintEnabled(), hint_applied_, and hints_.
|
inline |
Definition at line 1056 of file RelAlgDagBuilder.h.
References CHECK, and scalar_exprs_.
Referenced by anonymous_namespace{RelAlgDagBuilder.cpp}::add_window_function_pre_project(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgOptimizer.cpp}::is_identical_copy(), anonymous_namespace{RelAlgExecutor.cpp}::scalar_at(), RelRexDagVisitor::visit(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitProject().
|
inline |
Definition at line 1061 of file RelAlgDagBuilder.h.
References CHECK, and scalar_exprs_.
|
inline |
|
inline |
Definition at line 1121 of file RelAlgDagBuilder.h.
References hint_applied_, and hints_.
Referenced by getHintInfo().
bool RelProject::hasWindowFunctionExpr | ( | ) | const |
Definition at line 2621 of file RelAlgDagBuilder.cpp.
References anonymous_namespace{RelAlgDagBuilder.cpp}::anonymous_namespace{RelAlgDagBuilder.cpp}::is_window_function_operator(), and scalar_exprs_.
Referenced by RelModify::applyUpdateModificationsToInputNode().
|
inlineprivate |
Definition at line 1147 of file RelAlgDagBuilder.h.
References fields_, kBIGINT, and scalar_exprs_.
bool RelProject::isIdentity | ( | ) | const |
Definition at line 440 of file RelAlgDagBuilder.cpp.
References CHECK, CHECK_EQ, get_node_output(), RelAlgNode::getInput(), RelAlgNode::inputCount(), isSimple(), and scalar_exprs_.
bool RelProject::isRenaming | ( | ) | const |
Definition at line 513 of file RelAlgDagBuilder.cpp.
References CHECK, CHECK_EQ, fields_, anonymous_namespace{RelAlgDagBuilder.cpp}::isRenamedInput(), isSimple(), and scalar_exprs_.
|
inline |
Definition at line 1041 of file RelAlgDagBuilder.h.
References scalar_exprs_.
Referenced by RelAlgExecutor::executeProject(), isIdentity(), isRenaming(), and anonymous_namespace{RelAlgOptimizer.cpp}::safe_to_redirect().
|
inlineoverridevirtual |
Reimplemented from RelAlgNode.
Definition at line 1075 of file RelAlgDagBuilder.h.
void RelProject::replaceInput | ( | std::shared_ptr< const RelAlgNode > | old_input, |
std::shared_ptr< const RelAlgNode > | input, | ||
std::optional< std::unordered_map< unsigned, unsigned >> | old_to_new_index_map | ||
) |
Definition at line 346 of file RelAlgDagBuilder.cpp.
References CHECK, RelAlgNode::replaceInput(), and scalar_exprs_.
|
inline |
Definition at line 1034 of file RelAlgDagBuilder.h.
References scalar_exprs_.
|
inline |
|
inlineoverridevirtual |
Implements RelAlgNode.
Definition at line 1054 of file RelAlgDagBuilder.h.
References scalar_exprs_.
Referenced by anonymous_namespace{RelAlgExecutor.cpp}::get_scalar_sources_size(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgOptimizer.cpp}::is_identical_copy(), RelRexDagVisitor::visit(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitProject().
|
inlineoverridevirtual |
Implements RelAlgNode.
Definition at line 1097 of file RelAlgDagBuilder.h.
References fields_, RelAlgNode::hash_, RelProject(), scalar_exprs_, and toString().
|
inlineoverridevirtual |
Implements RelAlgNode.
Definition at line 1088 of file RelAlgDagBuilder.h.
References cat(), fields_, scalar_exprs_, and typeName().
Referenced by toHash().
|
inlineprivate |
Definition at line 1141 of file RelAlgDagBuilder.h.
References scalar_exprs_.
Referenced by RelModify::applyUpdateModificationsToInputNode().
|
friend |
Definition at line 1016 of file RelAlgDagBuilder.h.
|
mutableprivate |
Definition at line 1157 of file RelAlgDagBuilder.h.
Referenced by appendInput(), getFieldName(), getFields(), injectOffsetInFragmentExpr(), isRenaming(), setFields(), toHash(), and toString().
|
private |
Definition at line 1158 of file RelAlgDagBuilder.h.
Referenced by addHint(), getHintInfo(), hasHintEnabled(), and RelProject().
|
private |
Definition at line 1159 of file RelAlgDagBuilder.h.
Referenced by addHint(), getDeliveredHints(), getHintInfo(), hasDeliveredHint(), hasHintEnabled(), and RelProject().
|
mutableprivate |
Definition at line 1156 of file RelAlgDagBuilder.h.
Referenced by appendInput(), getExpressionsAndRelease(), getProjectAt(), getProjectAtAndRelease(), hasWindowFunctionExpr(), injectOffsetInFragmentExpr(), isIdentity(), isRenaming(), isSimple(), RelProject(), replaceInput(), setExpressions(), size(), toHash(), toString(), and visitScalarExprs().