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

#include <RelAlgDagBuilder.h>

+ Inheritance diagram for RexFunctionOperator:
+ Collaboration diagram for RexFunctionOperator:

Public Types

using ConstRexScalarPtr = std::unique_ptr< const RexScalar >
 
using ConstRexScalarPtrVector = std::vector< ConstRexScalarPtr >
 

Public Member Functions

 RexFunctionOperator (const std::string &name, ConstRexScalarPtrVector &operands, const SQLTypeInfo &ti)
 
std::unique_ptr< const
RexOperator
getDisambiguated (std::vector< std::unique_ptr< const RexScalar >> &operands) const override
 
const std::string & getName () const
 
std::string toString () const override
 
size_t toHash () const override
 
- Public Member Functions inherited from RexOperator
 RexOperator (const SQLOps op, std::vector< std::unique_ptr< const RexScalar >> &operands, const SQLTypeInfo &type)
 
size_t size () const
 
const RexScalargetOperand (const size_t idx) const
 
const RexScalargetOperandAndRelease (const size_t idx) const
 
SQLOps getOperator () const
 
const SQLTypeInfogetType () const
 
- Public Member Functions inherited from Rex
virtual ~Rex ()
 

Private Attributes

const std::string name_
 

Additional Inherited Members

- Protected Attributes inherited from RexOperator
const SQLOps op_
 
std::vector< std::unique_ptr
< const RexScalar > > 
operands_
 
const SQLTypeInfo type_
 
- Protected Attributes inherited from Rex
std::optional< size_t > hash_
 

Detailed Description

Definition at line 429 of file RelAlgDagBuilder.h.

Member Typedef Documentation

Definition at line 431 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

RexFunctionOperator::RexFunctionOperator ( const std::string &  name,
ConstRexScalarPtrVector operands,
const SQLTypeInfo ti 
)
inline

Definition at line 434 of file RelAlgDagBuilder.h.

Referenced by getDisambiguated(), and toHash().

437  : RexOperator(kFUNCTION, operands, ti), name_(name) {}
const std::string name_
RexOperator(const SQLOps op, std::vector< std::unique_ptr< const RexScalar >> &operands, const SQLTypeInfo &type)
string name
Definition: setup.in.py:72

+ Here is the caller graph for this function:

Member Function Documentation

std::unique_ptr<const RexOperator> RexFunctionOperator::getDisambiguated ( std::vector< std::unique_ptr< const RexScalar >> &  operands) const
inlineoverridevirtual

Reimplemented from RexOperator.

Definition at line 439 of file RelAlgDagBuilder.h.

References RexOperator::getType(), name_, and RexFunctionOperator().

440  {
441  return std::unique_ptr<const RexOperator>(
442  new RexFunctionOperator(name_, operands, getType()));
443  }
const std::string name_
const SQLTypeInfo & getType() const
RexFunctionOperator(const std::string &name, ConstRexScalarPtrVector &operands, const SQLTypeInfo &ti)

+ Here is the call graph for this function:

size_t RexFunctionOperator::toHash ( ) const
inlineoverridevirtual

Reimplemented from RexOperator.

Reimplemented in RexWindowFunctionOperator.

Definition at line 451 of file RelAlgDagBuilder.h.

References RexOperator::getType(), Rex::hash_, name_, RexOperator::op_, RexOperator::operands_, RexFunctionOperator(), and toString().

451  {
452  if (!hash_) {
453  hash_ = typeid(RexFunctionOperator).hash_code();
454  boost::hash_combine(*hash_, ::toString(op_));
455  boost::hash_combine(*hash_, getType().get_type_name());
456  for (auto& operand : operands_) {
457  boost::hash_combine(*hash_, operand->toHash());
458  }
459  boost::hash_combine(*hash_, name_);
460  }
461  return *hash_;
462  }
std::string toString() const override
const std::string name_
const SQLTypeInfo & getType() const
const SQLOps op_
std::vector< std::unique_ptr< const RexScalar > > operands_
std::optional< size_t > hash_
RexFunctionOperator(const std::string &name, ConstRexScalarPtrVector &operands, const SQLTypeInfo &ti)

+ Here is the call graph for this function:

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

Reimplemented from RexOperator.

Reimplemented in RexWindowFunctionOperator.

Definition at line 447 of file RelAlgDagBuilder.h.

References cat(), name_, RexOperator::operands_, and typeName().

Referenced by toHash(), and RelAlgTranslator::translateGeoProjection().

447  {
448  return cat(::typeName(this), "(", name_, ", operands=", ::toString(operands_), ")");
449  }
std::string toString() const override
std::string cat(Ts &&...args)
const std::string name_
std::vector< std::unique_ptr< const RexScalar > > operands_
std::string typeName(const T *v)
Definition: toString.h:93

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

const std::string RexFunctionOperator::name_
private

Definition at line 465 of file RelAlgDagBuilder.h.

Referenced by getDisambiguated(), getName(), toHash(), and toString().


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