OmniSciDB  29e35f4d58
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 210 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 212 of file RelAlgDagBuilder.h.

215  : 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 217 of file RelAlgDagBuilder.h.

Referenced by RexDeepCopyVisitor::visitOperator().

218  {
219  return std::unique_ptr<const RexOperator>(new RexOperator(op_, operands, type_));
220  }
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 224 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::translateGeoComparison(), RelAlgTranslator::translateGeoOverlapsOper(), RelAlgTranslator::translateHPTLiteral(), RelAlgTranslator::translateInOper(), RelAlgTranslator::translateItem(), RelAlgTranslator::translateLength(), RelAlgTranslator::translateLike(), RelAlgTranslator::translateLikely(), RelAlgTranslator::translateOper(), RelAlgTranslator::translateOverlapsOper(), RelAlgTranslator::translateRegexp(), RelAlgTranslator::translateSign(), RelAlgTranslator::translateTernaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), RelAlgTranslator::translateUnlikely(), RelAlgTranslator::translateUoper(), RelAlgTranslator::translateWindowFunction(), anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RexPhysicalInputsVisitor::visitOperator(), RexVisitor< const RexScalar *>::visitOperator(), RexDeepCopyVisitor::visitOperator(), and RexDeepCopyVisitor::visitWindowFunctionOperator().

224  {
225  CHECK(idx < operands_.size());
226  return operands_[idx].get();
227  }
std::vector< std::unique_ptr< const RexScalar > > operands_
#define CHECK(condition)
Definition: Logger.h:193
+ Here is the caller graph for this function:

◆ getOperandAndRelease()

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

Definition at line 229 of file RelAlgDagBuilder.h.

References CHECK.

229  {
230  CHECK(idx < operands_.size());
231  return operands_[idx].release();
232  }
std::vector< std::unique_ptr< const RexScalar > > operands_
#define CHECK(condition)
Definition: Logger.h:193

◆ getOperator()

SQLOps RexOperator::getOperator ( ) const
inline

Definition at line 234 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().

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

◆ getType()

◆ size()

size_t RexOperator::size ( ) const
inline

Definition at line 222 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::translateSign(), RelAlgTranslator::translateTernaryGeoFunction(), RelAlgTranslator::translateUnaryGeoFunction(), RelAlgTranslator::translateUnlikely(), RelAlgTranslator::translateUoper(), RelAlgTranslator::translateWindowFunction(), anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RexPhysicalInputsVisitor::visitOperator(), RexVisitor< const RexScalar *>::visitOperator(), RexDeepCopyVisitor::visitOperator(), and RexDeepCopyVisitor::visitWindowFunctionOperator().

222 { 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 238 of file RelAlgDagBuilder.h.

References run_benchmark_import::result, and to_string().

238  {
239  std::string result = "(RexOperator " + std::to_string(op_);
240  for (const auto& operand : operands_) {
241  result += " " + operand->toString();
242  }
243  return result + ")";
244  };
const SQLOps op_
std::string to_string(char const *&&v)
std::vector< std::unique_ptr< const RexScalar > > operands_
+ Here is the call graph for this function:

Member Data Documentation

◆ op_

const SQLOps RexOperator::op_
protected

Definition at line 244 of file RelAlgDagBuilder.h.

◆ operands_

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

Definition at line 248 of file RelAlgDagBuilder.h.

◆ type_

const SQLTypeInfo RexOperator::type_
protected

Definition at line 249 of file RelAlgDagBuilder.h.


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