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

#include <RelAlgDagBuilder.h>

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

Public Member Functions

 RexAgg (const SQLAgg agg, const bool distinct, const SQLTypeInfo &type, const std::vector< size_t > &operands)
 
std::string toString () const override
 
size_t toHash () 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
 
- Public Member Functions inherited from Rex
virtual ~Rex ()
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from Rex
std::optional< size_t > hash_
 

Detailed Description

Definition at line 666 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

RexAgg::RexAgg ( const SQLAgg  agg,
const bool  distinct,
const SQLTypeInfo type,
const std::vector< size_t > &  operands 
)
inline

Definition at line 668 of file RelAlgDagBuilder.h.

Referenced by toHash().

672  : agg_(agg), distinct_(distinct), type_(type), operands_(operands) {}
const SQLAgg agg_
const bool distinct_
const SQLTypeInfo type_
const std::vector< size_t > operands_

+ Here is the caller graph for this function:

Member Function Documentation

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

Definition at line 710 of file RelAlgDagBuilder.h.

References agg_, distinct_, operands_, and type_.

710  {
711  return std::make_unique<RexAgg>(agg_, distinct_, type_, operands_);
712  }
const SQLAgg agg_
const bool distinct_
const SQLTypeInfo type_
const std::vector< size_t > operands_
SQLAgg RexAgg::getKind ( ) const
inline

Definition at line 700 of file RelAlgDagBuilder.h.

References agg_.

Referenced by RelAlgTranslator::translateAggregateRex().

700 { return agg_; }
const SQLAgg agg_

+ Here is the caller graph for this function:

size_t RexAgg::getOperand ( size_t  idx) const
inline

Definition at line 706 of file RelAlgDagBuilder.h.

References operands_.

Referenced by RelAlgTranslator::translateAggregateRex().

706 { return operands_[idx]; }
const std::vector< size_t > operands_

+ Here is the caller graph for this function:

const SQLTypeInfo& RexAgg::getType ( ) const
inline

Definition at line 708 of file RelAlgDagBuilder.h.

References type_.

708 { return type_; }
const SQLTypeInfo type_
bool RexAgg::isDistinct ( ) const
inline

Definition at line 702 of file RelAlgDagBuilder.h.

References distinct_.

Referenced by RelAlgTranslator::translateAggregateRex().

702 { return distinct_; }
const bool distinct_

+ Here is the caller graph for this function:

size_t RexAgg::size ( ) const
inline

Definition at line 704 of file RelAlgDagBuilder.h.

References operands_.

Referenced by RelAlgTranslator::translateAggregateRex().

704 { return operands_.size(); }
const std::vector< size_t > operands_

+ Here is the caller graph for this function:

size_t RexAgg::toHash ( ) const
inlineoverridevirtual

Implements Rex.

Definition at line 687 of file RelAlgDagBuilder.h.

References agg_, distinct_, SQLTypeInfo::get_type_name(), Rex::hash_, operands_, RexAgg(), and type_.

687  {
688  if (!hash_) {
689  hash_ = typeid(RexAgg).hash_code();
690  for (auto& operand : operands_) {
691  boost::hash_combine(*hash_, operand);
692  }
693  boost::hash_combine(*hash_, agg_);
694  boost::hash_combine(*hash_, distinct_);
695  boost::hash_combine(*hash_, type_.get_type_name());
696  }
697  return *hash_;
698  }
const SQLAgg agg_
const bool distinct_
std::optional< size_t > hash_
std::string get_type_name() const
Definition: sqltypes.h:442
const SQLTypeInfo type_
const std::vector< size_t > operands_
RexAgg(const SQLAgg agg, const bool distinct, const SQLTypeInfo &type, const std::vector< size_t > &operands)

+ Here is the call graph for this function:

std::string RexAgg::toString ( ) const
inlineoverridevirtual

Implements Rex.

Definition at line 674 of file RelAlgDagBuilder.h.

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

674  {
675  return cat(::typeName(this),
676  "(agg=",
678  ", distinct=",
680  ", type=",
682  ", operands=",
684  ")");
685  }
std::string cat(Ts &&...args)
std::string to_string(char const *&&v)
const SQLAgg agg_
const bool distinct_
std::string toString() const override
std::string get_type_name() const
Definition: sqltypes.h:442
std::string typeName(const T *v)
Definition: toString.h:93
const SQLTypeInfo type_
const std::vector< size_t > operands_

+ Here is the call graph for this function:

Member Data Documentation

const SQLAgg RexAgg::agg_
private

Definition at line 715 of file RelAlgDagBuilder.h.

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

const bool RexAgg::distinct_
private

Definition at line 716 of file RelAlgDagBuilder.h.

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

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

Definition at line 718 of file RelAlgDagBuilder.h.

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

const SQLTypeInfo RexAgg::type_
private

Definition at line 717 of file RelAlgDagBuilder.h.

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


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