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

#include <RelAlgDag.h>

+ Inheritance diagram for RexAgg:
+ Collaboration diagram for RexAgg:

Public Member Functions

 RexAgg ()
 
 RexAgg (const SQLAgg agg, const bool distinct, const SQLTypeInfo &type, const std::vector< size_t > &operands)
 
virtual void acceptChildren (Visitor &v) const override
 
virtual void accept (Visitor &v, std::string name) const override
 
std::string toString (RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
 
SQLAgg getKind () const
 
bool isDistinct () const
 
size_t size () const
 
size_t getOperand (size_t idx) const
 
const SQLTypeInfogetType () const
 
std::unique_ptr< RexAggdeepCopy () const
 
virtual size_t toHash () const override
 
- Public Member Functions inherited from Rex
virtual ~Rex ()
 
virtual size_t getStepNumber () const
 
- Public Member Functions inherited from RelAlgDagNode
 RelAlgDagNode ()
 
virtual void setStepNumber (size_t step) const
 
std::optional< size_t > getIdInPlanTree () const
 
void setIdInPlanTree (size_t id) const
 

Private Attributes

SQLAgg agg_
 
bool distinct_
 
SQLTypeInfo type_
 
std::vector< size_t > operands_
 

Friends

struct RelAlgDagSerializer
 
std::size_t hash_value (RexAgg const &)
 

Additional Inherited Members

- Protected Attributes inherited from Rex
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 767 of file RelAlgDag.h.

Constructor & Destructor Documentation

RexAgg::RexAgg ( )
inline

Definition at line 770 of file RelAlgDag.h.

770 : agg_(SQLAgg::kINVALID_AGG), distinct_(false) {}
bool distinct_
Definition: RelAlgDag.h:819
SQLAgg agg_
Definition: RelAlgDag.h:818
RexAgg::RexAgg ( const SQLAgg  agg,
const bool  distinct,
const SQLTypeInfo type,
const std::vector< size_t > &  operands 
)
inline

Definition at line 772 of file RelAlgDag.h.

776  : agg_(agg), distinct_(distinct), type_(type), operands_(operands) {}
std::vector< size_t > operands_
Definition: RelAlgDag.h:821
bool distinct_
Definition: RelAlgDag.h:819
SQLAgg agg_
Definition: RelAlgDag.h:818
SQLTypeInfo type_
Definition: RelAlgDag.h:820

Member Function Documentation

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

Implements RelAlgDagNode.

Definition at line 779 of file RelAlgDag.h.

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

Referenced by TableFunctionsFactory_node.PrintNode::__str__(), and RelCompound::acceptChildren().

779  {
780  if (v.visit(this, std::move(name))) {
781  acceptChildren(v);
782  }
783  }
virtual void acceptChildren(Visitor &v) const override
Definition: RelAlgDag.h:778
string name
Definition: setup.in.py:72

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void RexAgg::acceptChildren ( Visitor v) const
inlineoverridevirtual

Implements RelAlgDagNode.

Definition at line 778 of file RelAlgDag.h.

Referenced by accept().

778 {}

+ Here is the caller graph for this function:

std::unique_ptr<RexAgg> RexAgg::deepCopy ( ) const
inline

Definition at line 809 of file RelAlgDag.h.

References agg_, distinct_, operands_, and type_.

809  {
810  return std::make_unique<RexAgg>(agg_, distinct_, type_, operands_);
811  }
std::vector< size_t > operands_
Definition: RelAlgDag.h:821
bool distinct_
Definition: RelAlgDag.h:819
SQLAgg agg_
Definition: RelAlgDag.h:818
SQLTypeInfo type_
Definition: RelAlgDag.h:820
SQLAgg RexAgg::getKind ( ) const
inline

Definition at line 799 of file RelAlgDag.h.

References agg_.

Referenced by RelAlgTranslator::translateAggregateRex().

799 { return agg_; }
SQLAgg agg_
Definition: RelAlgDag.h:818

+ Here is the caller graph for this function:

size_t RexAgg::getOperand ( size_t  idx) const
inline

Definition at line 805 of file RelAlgDag.h.

References operands_.

Referenced by RelAlgTranslator::translateAggregateRex().

805 { return operands_[idx]; }
std::vector< size_t > operands_
Definition: RelAlgDag.h:821

+ Here is the caller graph for this function:

const SQLTypeInfo& RexAgg::getType ( ) const
inline

Definition at line 807 of file RelAlgDag.h.

References type_.

807 { return type_; }
SQLTypeInfo type_
Definition: RelAlgDag.h:820
bool RexAgg::isDistinct ( ) const
inline

Definition at line 801 of file RelAlgDag.h.

References distinct_.

Referenced by RelAlgTranslator::translateAggregateRex().

801 { return distinct_; }
bool distinct_
Definition: RelAlgDag.h:819

+ Here is the caller graph for this function:

size_t RexAgg::size ( ) const
inline

Definition at line 803 of file RelAlgDag.h.

References operands_.

Referenced by RelAlgTranslator::translateAggregateRex().

803 { return operands_.size(); }
std::vector< size_t > operands_
Definition: RelAlgDag.h:821

+ Here is the caller graph for this function:

virtual size_t RexAgg::toHash ( ) const
inlineoverridevirtual

Implements Rex.

Definition at line 813 of file RelAlgDag.h.

References hash_value.

813 { return hash_value(*this); }
friend std::size_t hash_value(RexAgg const &)
Definition: RelAlgDag.cpp:3660
std::string RexAgg::toString ( RelRexToStringConfig  config = RelRexToStringConfig::defaults()) const
inlineoverridevirtual

Implements RelAlgDagNode.

Definition at line 785 of file RelAlgDag.h.

References agg_, cat(), distinct_, SQLTypeInfo::get_type_name(), operands_, to_string(), type_, and typeName().

786  {
787  return cat(::typeName(this),
788  "(agg=",
790  ", distinct=",
792  ", type=",
794  ", operands=",
796  ")");
797  }
std::string cat(Ts &&...args)
std::string to_string(char const *&&v)
std::vector< size_t > operands_
Definition: RelAlgDag.h:821
bool distinct_
Definition: RelAlgDag.h:819
SQLAgg agg_
Definition: RelAlgDag.h:818
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
Definition: RelAlgDag.h:785
SQLTypeInfo type_
Definition: RelAlgDag.h:820
std::string get_type_name() const
Definition: sqltypes.h:484
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 ( RexAgg const &  rex_agg)
friend

Definition at line 3660 of file RelAlgDag.cpp.

Referenced by toHash().

3660  {
3661  if (rex_agg.hash_) {
3662  return *rex_agg.hash_;
3663  }
3664  rex_agg.hash_ = typeid(RexAgg).hash_code();
3665  boost::hash_combine(*rex_agg.hash_, rex_agg.operands_);
3666  boost::hash_combine(*rex_agg.hash_, rex_agg.agg_);
3667  boost::hash_combine(*rex_agg.hash_, rex_agg.distinct_);
3668  boost::hash_combine(*rex_agg.hash_, rex_agg.type_.get_type_name());
3669  return *rex_agg.hash_;
3670 }
RexAgg()
Definition: RelAlgDag.h:770
friend struct RelAlgDagSerializer
friend

Definition at line 823 of file RelAlgDag.h.

Member Data Documentation

SQLAgg RexAgg::agg_
private

Definition at line 818 of file RelAlgDag.h.

Referenced by deepCopy(), getKind(), hash_value(), and toString().

bool RexAgg::distinct_
private

Definition at line 819 of file RelAlgDag.h.

Referenced by deepCopy(), hash_value(), isDistinct(), and toString().

std::vector<size_t> RexAgg::operands_
private

Definition at line 821 of file RelAlgDag.h.

Referenced by deepCopy(), getOperand(), hash_value(), size(), and toString().

SQLTypeInfo RexAgg::type_
private

Definition at line 820 of file RelAlgDag.h.

Referenced by deepCopy(), getType(), hash_value(), and toString().


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