OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RelCompound Class Reference

#include <RelAlgDag.h>

+ Inheritance diagram for RelCompound:
+ Collaboration diagram for RelCompound:

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 RexScalargetFilterExpr () const
 
void setFilterExpr (std::unique_ptr< const RexScalar > &new_expr)
 
const RexgetTargetExpr (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 RexScalargetScalarSource (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 RexAgggetAggExpr (size_t i) const
 
std::string toString (RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
 
std::shared_ptr< RelAlgNodedeepCopy () const override
 
void addHint (const ExplainedQueryHint &hint_explained)
 
const bool hasHintEnabled (QueryHint candidate_hint) const
 
const ExplainedQueryHintgetHintInfo (QueryHint hint) const
 
bool hasDeliveredHint ()
 
HintsgetDeliveredHints ()
 
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 RaExecutionDescgetContextData () const
 
const size_t inputCount () const
 
const RelAlgNodegetInput (const size_t idx) const
 
const std::vector< RelAlgNode
const * > 
getInputs () const
 
std::shared_ptr< const RelAlgNodegetAndOwnInput (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::CataloggetModifiedTableCatalog () 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 RexScalarfilter_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< Hintshints_
 

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_
 

Detailed Description

Definition at line 2018 of file RelAlgDag.h.

Constructor & Destructor Documentation

RelCompound::RelCompound ( const TableDescriptor td,
const Catalog_Namespace::Catalog catalog 
)
inline

Definition at line 2021 of file RelAlgDag.h.

2022  : ModifyManipulationTarget(false, false, false, td, {}, catalog)
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)
Definition: RelAlgDag.h:1185
RelCompound::RelCompound ( RelCompound const &  rhs)

Definition at line 662 of file RelAlgDag.cpp.

References addHint(), filter_expr_, hint_applied_, hints_, and RexVisitorBase< T >::visit().

663  : RelAlgNode(rhs)
665  , groupby_count_(rhs.groupby_count_)
666  , agg_exprs_(copyAggExprs(rhs.agg_exprs_))
667  , fields_(rhs.fields_)
668  , is_agg_(rhs.is_agg_)
669  , scalar_sources_(copyRexScalars(rhs.scalar_sources_))
672  rhs.agg_exprs_,
673  rhs.scalar_sources_,
674  rhs.target_exprs_))
675  , hint_applied_(false)
676  , hints_(std::make_unique<Hints>()) {
677  RexDeepCopyVisitor copier;
678  filter_expr_ = rhs.filter_expr_ ? copier.visit(rhs.filter_expr_.get()) : nullptr;
679  if (rhs.hint_applied_) {
680  for (auto const& kv : *rhs.hints_) {
681  addHint(kv.second);
682  }
683  }
684 }
RelAlgNode(RelAlgInputs inputs={})
Definition: RelAlgDag.h:830
void addHint(const ExplainedQueryHint &hint_explained)
Definition: RelAlgDag.h:2136
std::vector< std::unique_ptr< const RexScalar > > scalar_sources_
Definition: RelAlgDag.h:2172
virtual T visit(const RexScalar *rex_scalar) const
Definition: RexVisitor.h:27
std::vector< std::string > fields_
Definition: RelAlgDag.h:2169
std::vector< std::unique_ptr< const RexScalar > > copyRexScalars(std::vector< std::unique_ptr< const RexScalar >> const &scalar_sources)
Definition: RelAlgDag.cpp:627
std::vector< const Rex * > remapTargetPointers(std::vector< std::unique_ptr< const RexAgg >> const &agg_exprs_new, std::vector< std::unique_ptr< const RexScalar >> const &scalar_sources_new, std::vector< std::unique_ptr< const RexAgg >> const &agg_exprs_old, std::vector< std::unique_ptr< const RexScalar >> const &scalar_sources_old, std::vector< const Rex * > const &target_exprs_old)
Definition: RelAlgDag.cpp:638
std::vector< const Rex * > target_exprs_
Definition: RelAlgDag.h:2174
std::unique_ptr< Hints > hints_
Definition: RelAlgDag.h:2176
std::vector< std::unique_ptr< const RexAgg > > agg_exprs_
Definition: RelAlgDag.h:2168
std::unique_ptr< const RexScalar > filter_expr_
Definition: RelAlgDag.h:2166
std::vector< std::unique_ptr< const RexAgg > > copyAggExprs(std::vector< std::unique_ptr< const RexAgg >> const &agg_exprs)
Definition: RelAlgDag.cpp:617
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)
Definition: RelAlgDag.h:1185

+ Here is the call graph for this function:

Member Function Documentation

virtual void RelCompound::accept ( Visitor v,
std::string  name 
) const
inlineoverridevirtual

Implements RelAlgDagNode.

Definition at line 2085 of file RelAlgDag.h.

References acceptChildren(), and RelAlgDagNode::Visitor::visit().

Referenced by TableFunctionsFactory_node.PrintNode::__str__().

2085  {
2086  if (v.visit(this, std::move(name))) {
2087  acceptChildren(v);
2088  }
2089  }
string name
Definition: setup.in.py:72
virtual void acceptChildren(Visitor &v) const override
Definition: RelAlgDag.h:2065

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void RelCompound::acceptChildren ( Visitor v) const
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().

2065  {
2066  if (getFilterExpr()) {
2067  getFilterExpr()->accept(v, "filter");
2068  }
2069  for (size_t i = 0; i < getScalarSourcesSize(); ++i) {
2070  if (getScalarSource(i)) {
2071  getScalarSource(i)->accept(v, "scalar");
2072  }
2073  }
2074  for (size_t i = 0; i < getAggExprSize(); ++i) {
2075  if (getAggExpr(i)) {
2076  getAggExpr(i)->accept(v, "aggregate");
2077  }
2078  }
2079  for (auto& n : getInputs()) {
2080  if (n) {
2081  n->accept(v, "input");
2082  }
2083  }
2084  }
const RexScalar * getFilterExpr() const
Definition: RelAlgDag.h:2096
virtual void accept(Visitor &v, std::string name) const override
Definition: RelAlgDag.h:779
const size_t getScalarSourcesSize() const
Definition: RelAlgDag.h:2110
virtual void accept(Visitor &v, std::string name) const =0
const std::vector< RelAlgNode const * > getInputs() const
Definition: RelAlgDag.h:882
const RexAgg * getAggExpr(size_t i) const
Definition: RelAlgDag.h:2127
size_t getAggExprSize() const
Definition: RelAlgDag.h:2125
constexpr double n
Definition: Utm.h:38
const RexScalar * getScalarSource(const size_t i) const
Definition: RelAlgDag.h:2112

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void RelCompound::addHint ( const ExplainedQueryHint hint_explained)
inline

Definition at line 2136 of file RelAlgDag.h.

References ExplainedQueryHint::getHint(), hint_applied_, and hints_.

Referenced by RelCompound().

2136  {
2137  if (!hint_applied_) {
2138  hint_applied_ = true;
2139  }
2140  hints_->emplace(hint_explained.getHint(), hint_explained);
2141  }
std::unique_ptr< Hints > hints_
Definition: RelAlgDag.h:2176
const QueryHint getHint() const
Definition: QueryHint.h:167

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::shared_ptr<RelAlgNode> RelCompound::deepCopy ( ) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 2132 of file RelAlgDag.h.

2132  {
2133  return std::make_shared<RelCompound>(*this);
2134  }
RelCompound::fields_ ( fields  )
RelCompound::filter_expr_ ( std::  movefilter_expr)
const RexAgg* RelCompound::getAggExpr ( size_t  i) const
inline

Definition at line 2127 of file RelAlgDag.h.

References agg_exprs_.

Referenced by acceptChildren().

2127 { return agg_exprs_[i].get(); }
std::vector< std::unique_ptr< const RexAgg > > agg_exprs_
Definition: RelAlgDag.h:2168

+ Here is the caller graph for this function:

size_t RelCompound::getAggExprSize ( ) const
inline

Definition at line 2125 of file RelAlgDag.h.

References agg_exprs_.

Referenced by acceptChildren().

2125 { return agg_exprs_.size(); }
std::vector< std::unique_ptr< const RexAgg > > agg_exprs_
Definition: RelAlgDag.h:2168

+ Here is the caller graph for this function:

Hints* RelCompound::getDeliveredHints ( )
inline

Definition at line 2159 of file RelAlgDag.h.

References hints_.

Referenced by anonymous_namespace{RelAlgDag.cpp}::handle_query_hint().

2159 { return hints_.get(); }
std::unique_ptr< Hints > hints_
Definition: RelAlgDag.h:2176

+ Here is the caller graph for this function:

const std::string RelCompound::getFieldName ( const size_t  i) const
inline

Definition at line 2106 of file RelAlgDag.h.

References fields_.

2106 { return fields_[i]; }
std::vector< std::string > fields_
Definition: RelAlgDag.h:2169
const std::vector<std::string>& RelCompound::getFields ( ) const
inline

Definition at line 2104 of file RelAlgDag.h.

References fields_.

2104 { return fields_; }
std::vector< std::string > fields_
Definition: RelAlgDag.h:2169
const RexScalar* RelCompound::getFilterExpr ( ) const
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().

2096 { return filter_expr_.get(); }
std::unique_ptr< const RexScalar > filter_expr_
Definition: RelAlgDag.h:2166

+ Here is the caller graph for this function:

const size_t RelCompound::getGroupByCount ( ) const
inline

Definition at line 2121 of file RelAlgDag.h.

References groupby_count_.

Referenced by anonymous_namespace{RelAlgExecutor.cpp}::translate_groupby_exprs().

2121 { return groupby_count_; }

+ Here is the caller graph for this function:

const ExplainedQueryHint& RelCompound::getHintInfo ( QueryHint  hint) const
inline

Definition at line 2150 of file RelAlgDag.h.

References CHECK, hasHintEnabled(), hint_applied_, and hints_.

2150  {
2152  CHECK(!hints_->empty());
2153  CHECK(hasHintEnabled(hint));
2154  return hints_->at(hint);
2155  }
std::unique_ptr< Hints > hints_
Definition: RelAlgDag.h:2176
#define CHECK(condition)
Definition: Logger.h:291
const bool hasHintEnabled(QueryHint candidate_hint) const
Definition: RelAlgDag.h:2143

+ Here is the call graph for this function:

const RexScalar* RelCompound::getScalarSource ( const size_t  i) const
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().

2112  {
2113  return scalar_sources_[i].get();
2114  }
std::vector< std::unique_ptr< const RexScalar > > scalar_sources_
Definition: RelAlgDag.h:2172

+ Here is the caller graph for this function:

const size_t RelCompound::getScalarSourcesSize ( ) const
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().

2110 { return scalar_sources_.size(); }
std::vector< std::unique_ptr< const RexScalar > > scalar_sources_
Definition: RelAlgDag.h:2172

+ Here is the caller graph for this function:

const Rex* RelCompound::getTargetExpr ( const size_t  i) const
inline

Definition at line 2102 of file RelAlgDag.h.

References target_exprs_.

Referenced by anonymous_namespace{RelAlgExecutor.cpp}::translate_targets(), and QueryPlanDagChecker::visit().

2102 { return target_exprs_[i]; }
std::vector< const Rex * > target_exprs_
Definition: RelAlgDag.h:2174

+ Here is the caller graph for this function:

RelCompound::groupby_count_ ( groupby_count  )
bool RelCompound::hasDeliveredHint ( )
inline

Definition at line 2157 of file RelAlgDag.h.

References hints_.

2157 { return !hints_->empty(); }
std::unique_ptr< Hints > hints_
Definition: RelAlgDag.h:2176
const bool RelCompound::hasHintEnabled ( QueryHint  candidate_hint) const
inline

Definition at line 2143 of file RelAlgDag.h.

References hint_applied_, and hints_.

Referenced by getHintInfo().

2143  {
2144  if (hint_applied_ && !hints_->empty()) {
2145  return hints_->find(candidate_hint) != hints_->end();
2146  }
2147  return false;
2148  }
std::unique_ptr< Hints > hints_
Definition: RelAlgDag.h:2176

+ Here is the caller graph for this function:

RelCompound::hint_applied_ ( false  )
RelCompound::hints_ ( std::make_unique< Hints ())
inline

Definition at line 2056 of file RelAlgDag.h.

References agg_exprs_, and CHECK_EQ.

2056  {
2057  CHECK_EQ(fields.size(), target_exprs.size());
2058  for (auto agg_expr : agg_exprs) {
2059  agg_exprs_.emplace_back(agg_expr);
2060  }
2061  }
#define CHECK_EQ(x, y)
Definition: Logger.h:301
std::vector< std::unique_ptr< const RexAgg > > agg_exprs_
Definition: RelAlgDag.h:2168
RelCompound::is_agg_ ( is_agg  )
bool RelCompound::isAggregate ( ) const
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().

2123 { return is_agg_; }

+ Here is the caller graph for this function:

void RelCompound::replaceInput ( std::shared_ptr< const RelAlgNode old_input,
std::shared_ptr< const RelAlgNode input 
)
overridevirtual

Reimplemented from RelAlgNode.

Definition at line 544 of file RelAlgDag.cpp.

References filter_expr_, RelAlgNode::replaceInput(), and scalar_sources_.

545  {
546  RelAlgNode::replaceInput(old_input, input);
547  RexRebindInputsVisitor rebind_inputs(old_input.get(), input.get());
548  for (const auto& scalar_source : scalar_sources_) {
549  rebind_inputs.visit(scalar_source.get());
550  }
551  if (filter_expr_) {
552  rebind_inputs.visit(filter_expr_.get());
553  }
554 }
std::vector< std::unique_ptr< const RexScalar > > scalar_sources_
Definition: RelAlgDag.h:2172
virtual void replaceInput(std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input)
Definition: RelAlgDag.h:908
std::unique_ptr< const RexScalar > filter_expr_
Definition: RelAlgDag.h:2166

+ Here is the call graph for this function:

RelCompound::scalar_sources_ ( std::  movescalar_sources)
void RelCompound::setFields ( std::vector< std::string > &&  fields)
inline

Definition at line 2108 of file RelAlgDag.h.

References fields_.

2108 { fields_ = std::move(fields); }
std::vector< std::string > fields_
Definition: RelAlgDag.h:2169
void RelCompound::setFilterExpr ( std::unique_ptr< const RexScalar > &  new_expr)
inline

Definition at line 2098 of file RelAlgDag.h.

References filter_expr_.

2098  {
2099  filter_expr_ = std::move(new_expr);
2100  }
std::unique_ptr< const RexScalar > filter_expr_
Definition: RelAlgDag.h:2166
void RelCompound::setScalarSources ( std::vector< std::unique_ptr< const RexScalar >> &  new_sources)
inline

Definition at line 2116 of file RelAlgDag.h.

References CHECK_EQ, and scalar_sources_.

2116  {
2117  CHECK_EQ(new_sources.size(), scalar_sources_.size());
2118  scalar_sources_ = std::move(new_sources);
2119  }
#define CHECK_EQ(x, y)
Definition: Logger.h:301
std::vector< std::unique_ptr< const RexScalar > > scalar_sources_
Definition: RelAlgDag.h:2172
size_t RelCompound::size ( ) const
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().

2094 { return target_exprs_.size(); }
std::vector< const Rex * > target_exprs_
Definition: RelAlgDag.h:2174

+ Here is the caller graph for this function:

RelCompound::target_exprs_ ( target_exprs  )
virtual size_t RelCompound::toHash ( ) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 2161 of file RelAlgDag.h.

References hash_value.

2161 { return hash_value(*this); }
friend std::size_t hash_value(RelCompound const &)
Definition: RelAlgDag.cpp:3775
std::string RelCompound::toString ( RelRexToStringConfig  config = RelRexToStringConfig::defaults()) const
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().

3511  {
3512  if (!config.attributes_only) {
3513  auto ret = cat(::typeName(this),
3514  ", filter_expr=",
3515  (filter_expr_ ? filter_expr_->toString(config) : "null"),
3516  ", target_exprs=");
3517  for (auto& expr : target_exprs_) {
3518  ret += expr->toString(config) + " ";
3519  }
3520  ret += ", agg_exps=";
3521  for (auto& expr : agg_exprs_) {
3522  ret += expr->toString(config) + " ";
3523  }
3524  ret += ", scalar_sources=";
3525  for (auto& expr : scalar_sources_) {
3526  ret += expr->toString(config) + " ";
3527  }
3528  return cat(ret,
3529  ", ",
3531  ", ",
3532  ", fields=",
3533  ::toString(fields_),
3534  ", is_agg=",
3536  } else {
3537  return cat(::typeName(this),
3538  "(",
3540  ", fields=",
3541  ::toString(fields_),
3542  ", is_agg=",
3544  ")");
3545  }
3546 }
std::string cat(Ts &&...args)
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
Definition: RelAlgDag.cpp:3511
std::vector< std::unique_ptr< const RexScalar > > scalar_sources_
Definition: RelAlgDag.h:2172
std::string to_string(char const *&&v)
std::vector< std::string > fields_
Definition: RelAlgDag.h:2169
std::vector< const Rex * > target_exprs_
Definition: RelAlgDag.h:2174
std::vector< std::unique_ptr< const RexAgg > > agg_exprs_
Definition: RelAlgDag.h:2168
std::unique_ptr< const RexScalar > filter_expr_
Definition: RelAlgDag.h:2166
std::string typeName(const T *v)
Definition: toString.h:106

+ Here is the call graph for this function:

Friends And Related Function Documentation

std::size_t hash_value ( RelCompound const &  rel_compound)
friend

Definition at line 3775 of file RelAlgDag.cpp.

Referenced by toHash().

3775  {
3776  if (rel_compound.hash_) {
3777  return *rel_compound.hash_;
3778  }
3779  rel_compound.hash_ = typeid(RelCompound).hash_code();
3780  boost::hash_combine(*rel_compound.hash_, rel_compound.filter_expr_);
3781  boost::hash_combine(*rel_compound.hash_, rel_compound.is_agg_);
3782  boost::hash_combine(*rel_compound.hash_, rel_compound.target_exprs_);
3783  boost::hash_combine(*rel_compound.hash_, rel_compound.agg_exprs_);
3784  boost::hash_combine(*rel_compound.hash_, rel_compound.scalar_sources_);
3785  boost::hash_combine(*rel_compound.hash_, rel_compound.groupby_count_);
3786  boost::hash_combine(*rel_compound.hash_, rel_compound.fields_);
3787  boost::hash_combine(*rel_compound.hash_, rel_compound.inputs_);
3788  return *rel_compound.hash_;
3789 }
RelCompound(const TableDescriptor *td, const Catalog_Namespace::Catalog *catalog)
Definition: RelAlgDag.h:2021
friend struct RelAlgDagSerializer
friend

Definition at line 2178 of file RelAlgDag.h.

Member Data Documentation

std::vector<std::unique_ptr<const RexAgg> > RelCompound::agg_exprs_
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.

std::vector<std::string> RelCompound::fields_
private

Definition at line 2169 of file RelAlgDag.h.

Referenced by getFieldName(), getFields(), hash_value(), setFields(), and toString().

std::unique_ptr<const RexScalar> RelCompound::filter_expr_
private
RelCompound::groupby_count_ {0}

Definition at line 2023 of file RelAlgDag.h.

Referenced by getGroupByCount(), hash_value(), and toString().

size_t RelCompound::groupby_count_
private

Definition at line 2167 of file RelAlgDag.h.

RelCompound::hint_applied_
Initial value:
{false} {}
RelCompound(std::unique_ptr<const RexScalar>& filter_expr,
const std::vector<const Rex*>& target_exprs,
const size_t groupby_count,
const std::vector<const RexAgg*>& agg_exprs,
const std::vector<std::string>& fields,
std::vector<std::unique_ptr<const RexScalar>>& scalar_sources,
const bool is_agg,
bool update_disguised_as_select = false,
bool delete_disguised_as_select = false,
bool varlen_update_required = false,
TableDescriptor const* manipulation_target_table = nullptr,
ColumnNameList target_columns = ColumnNameList(),
: ModifyManipulationTarget(update_disguised_as_select,
delete_disguised_as_select,
varlen_update_required,
manipulation_target_table,
target_columns,

Definition at line 2025 of file RelAlgDag.h.

Referenced by addHint(), getHintInfo(), hasHintEnabled(), and RelCompound().

bool RelCompound::hint_applied_
private

Definition at line 2175 of file RelAlgDag.h.

std::unique_ptr<Hints> RelCompound::hints_
private
RelCompound::is_agg_ {false}

Definition at line 2024 of file RelAlgDag.h.

Referenced by hash_value(), isAggregate(), and toString().

bool RelCompound::is_agg_
private

Definition at line 2170 of file RelAlgDag.h.

std::vector<std::unique_ptr<const RexScalar> > RelCompound::scalar_sources_
private
std::vector<const Rex*> RelCompound::target_exprs_
private

Definition at line 2174 of file RelAlgDag.h.

Referenced by getTargetExpr(), hash_value(), size(), and toString().


The documentation for this class was generated from the following files: