OmniSciDB  dfae7c3b14
RexOperator Class Reference

#include <RelAlgDagBuilder.h>

+ Inheritance diagram for RexOperator:
+ Collaboration diagram for RexOperator:

Public Member Functions

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

Protected Attributes

const SQLOps op_
 
std::vector< std::unique_ptr< const RexScalar > > operands_
 
const SQLTypeInfo type_
 

Detailed Description

Definition at line 224 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

◆ RexOperator()

RexOperator::RexOperator ( const SQLOps  op,
std::vector< std::unique_ptr< const RexScalar >> &  operands,
const SQLTypeInfo type 
)
inline

Definition at line 226 of file RelAlgDagBuilder.h.

229  : op_(op), operands_(std::move(operands)), type_(type) {}
const SQLOps op_
const SQLTypeInfo type_
std::vector< std::unique_ptr< const RexScalar > > operands_

Member Function Documentation

◆ getDisambiguated()

virtual std::unique_ptr<const RexOperator> RexOperator::getDisambiguated ( std::vector< std::unique_ptr< const RexScalar >> &  operands) const
inlinevirtual

Reimplemented in RexFunctionOperator.

Definition at line 231 of file RelAlgDagBuilder.h.

Referenced by RexDeepCopyVisitor::visitOperator().

232  {
233  return std::unique_ptr<const RexOperator>(new RexOperator(op_, operands, type_));
234  }
RexOperator(const SQLOps op, std::vector< std::unique_ptr< const RexScalar >> &operands, const SQLTypeInfo &type)
const SQLOps op_
const SQLTypeInfo type_
+ Here is the caller graph for this function:

◆ getOperand()

const RexScalar* RexOperator::getOperand ( const size_t  idx) const
inline

Definition at line 238 of file RelAlgDagBuilder.h.

References CHECK.

Referenced by anonymous_namespace{RelAlgDagBuilder.cpp}::anonymous_namespace{RelAlgDagBuilder.cpp}::is_window_function_operator(), RelAlgTranslator::translateAbs(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateCardinality(), RelAlgTranslator::translateDateadd(), RelAlgTranslator::translateDatediff(), RelAlgTranslator::translateDatepart(), RelAlgTranslator::translateDatePlusMinus(), RelAlgTranslator::translateDatetime(), RelAlgTranslator::translateExtract(), RelAlgTranslator::translateFunction(), RelAlgTranslator::translateFunctionArgs(), RelAlgTranslator::translateFunctionWithGeoArg(), RelAlgTranslator::translateGeoBinaryConstructor(), RelAlgTranslator::translateGeoComparison(), RelAlgTranslator::translateGeoOverlapsOper(), RelAlgTranslator::translateGeoPredicate(), RelAlgTranslator::translateHPTLiteral(), RelAlgTranslator::translateInOper(), RelAlgTranslator::translateItem(), RelAlgTranslator::translateLength(), RelAlgTranslator::translateLike(), RelAlgTranslator::translateLikely(), RelAlgTranslator::translateOper(), RelAlgTranslator::translateOverlapsOper(), RelAlgTranslator::translateRegexp(), RelAlgTranslator::translateSampleRatio(), RelAlgTranslator::translateSign(), RelAlgTranslator::translateTernaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), RelAlgTranslator::translateUnlikely(), RelAlgTranslator::translateUoper(), RelAlgTranslator::translateWindowFunction(), RelRexDagVisitor::visit(), anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RexPhysicalInputsVisitor::visitOperator(), RexVisitor< const RexScalar *>::visitOperator(), RexDeepCopyVisitor::visitOperator(), and RexDeepCopyVisitor::visitWindowFunctionOperator().

238  {
239  CHECK(idx < operands_.size());
240  return operands_[idx].get();
241  }
std::vector< std::unique_ptr< const RexScalar > > operands_
#define CHECK(condition)
Definition: Logger.h:197
+ Here is the caller graph for this function:

◆ getOperandAndRelease()

const RexScalar* RexOperator::getOperandAndRelease ( const size_t  idx) const
inline

Definition at line 243 of file RelAlgDagBuilder.h.

References CHECK.

243  {
244  CHECK(idx < operands_.size());
245  return operands_[idx].release();
246  }
std::vector< std::unique_ptr< const RexScalar > > operands_
#define CHECK(condition)
Definition: Logger.h:197

◆ getOperator()

SQLOps RexOperator::getOperator ( ) const
inline

Definition at line 248 of file RelAlgDagBuilder.h.

Referenced by anonymous_namespace{RelAlgDagBuilder.cpp}::anonymous_namespace{RelAlgDagBuilder.cpp}::is_window_function_operator(), RelAlgTranslator::translateDatePlusMinus(), RelAlgTranslator::translateGeoComparison(), RelAlgTranslator::translateOper(), RelAlgTranslator::translateOverlapsOper(), and RelAlgTranslator::translateUoper().

248 { return op_; }
const SQLOps op_
+ Here is the caller graph for this function:

◆ getType()

◆ size()

size_t RexOperator::size ( ) const
inline

Definition at line 236 of file RelAlgDagBuilder.h.

Referenced by anonymous_namespace{RelAlgDagBuilder.cpp}::anonymous_namespace{RelAlgDagBuilder.cpp}::is_window_function_operator(), RelAlgTranslator::translateAbs(), RelAlgTranslator::translateBinaryGeoFunction(), RelAlgTranslator::translateDateadd(), RelAlgTranslator::translateDatediff(), RelAlgTranslator::translateDatepart(), RelAlgTranslator::translateDatePlusMinus(), RelAlgTranslator::translateDatetime(), RelAlgTranslator::translateExtract(), RelAlgTranslator::translateFunction(), RelAlgTranslator::translateFunctionArgs(), RelAlgTranslator::translateFunctionWithGeoArg(), RelAlgTranslator::translateGeoComparison(), RelAlgTranslator::translateGeoOverlapsOper(), RelAlgTranslator::translateHPTLiteral(), RelAlgTranslator::translateInOper(), RelAlgTranslator::translateItem(), RelAlgTranslator::translateLength(), RelAlgTranslator::translateLike(), RelAlgTranslator::translateLikely(), RelAlgTranslator::translateOper(), RelAlgTranslator::translateRegexp(), RelAlgTranslator::translateSampleRatio(), RelAlgTranslator::translateSign(), RelAlgTranslator::translateTernaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), RelAlgTranslator::translateUnlikely(), RelAlgTranslator::translateUoper(), RelAlgTranslator::translateWindowFunction(), RelRexDagVisitor::visit(), anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RexPhysicalInputsVisitor::visitOperator(), RexVisitor< const RexScalar *>::visitOperator(), RexDeepCopyVisitor::visitOperator(), and RexDeepCopyVisitor::visitWindowFunctionOperator().

236 { return operands_.size(); }
std::vector< std::unique_ptr< const RexScalar > > operands_
+ Here is the caller graph for this function:

◆ toString()

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

Implements Rex.

Reimplemented in RexWindowFunctionOperator, and RexFunctionOperator.

Definition at line 252 of file RelAlgDagBuilder.h.

References cat(), to_string(), and Rex::toString().

252  {
253  return cat(::typeName(this),
254  "(",
256  ", operands=",
257  ::toString(operands_),
258  ", type=",
259  type_.to_string(),
260  ")");
261  };
const SQLOps op_
std::string to_string(char const *&&v)
std::string cat(Ts &&... args)
std::string to_string() const
Definition: sqltypes.h:395
const SQLTypeInfo type_
std::vector< std::unique_ptr< const RexScalar > > operands_
std::string toString() const override
+ Here is the call graph for this function:

Member Data Documentation

◆ op_

const SQLOps RexOperator::op_
protected

Definition at line 261 of file RelAlgDagBuilder.h.

◆ operands_

std::vector<std::unique_ptr<const RexScalar> > RexOperator::operands_
mutableprotected

Definition at line 265 of file RelAlgDagBuilder.h.

◆ type_

const SQLTypeInfo RexOperator::type_
protected

Definition at line 266 of file RelAlgDagBuilder.h.


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