OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RexOperator Class Reference

#include <RelAlgAbstractInterpreter.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
RexOperator
getDisambiguated (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 213 of file RelAlgAbstractInterpreter.h.

Constructor & Destructor Documentation

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

Definition at line 215 of file RelAlgAbstractInterpreter.h.

Referenced by getDisambiguated().

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

+ Here is the caller graph for this function:

Member Function Documentation

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

Reimplemented in RexFunctionOperator.

Definition at line 220 of file RelAlgAbstractInterpreter.h.

References op_, RexOperator(), and type_.

Referenced by RexDeepCopyVisitor::visitOperator().

221  {
222  return std::unique_ptr<const RexOperator>(new RexOperator(op_, operands, type_));
223  }
RexOperator(const SQLOps op, std::vector< std::unique_ptr< const RexScalar >> &operands, const SQLTypeInfo &type)
const SQLTypeInfo type_

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 227 of file RelAlgAbstractInterpreter.h.

References CHECK(), and operands_.

Referenced by anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.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< std::unordered_set< const RexInput * > >::visitOperator(), RexDeepCopyVisitor::visitOperator(), and RexDeepCopyVisitor::visitWindowFunctionOperator().

227  {
228  CHECK(idx < operands_.size());
229  return operands_[idx].get();
230  }
CHECK(cgen_state)
std::vector< std::unique_ptr< const RexScalar > > operands_

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 232 of file RelAlgAbstractInterpreter.h.

References CHECK(), and operands_.

232  {
233  CHECK(idx < operands_.size());
234  return operands_[idx].release();
235  }
CHECK(cgen_state)
std::vector< std::unique_ptr< const RexScalar > > operands_

+ Here is the call graph for this function:

SQLOps RexOperator::getOperator ( ) const
inline
size_t RexOperator::size ( ) const
inline

Definition at line 225 of file RelAlgAbstractInterpreter.h.

References operands_.

Referenced by anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.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< std::unordered_set< const RexInput * > >::visitOperator(), RexDeepCopyVisitor::visitOperator(), and RexDeepCopyVisitor::visitWindowFunctionOperator().

225 { return operands_.size(); }
std::vector< std::unique_ptr< const RexScalar > > operands_

+ Here is the caller graph for this function:

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

Implements Rex.

Reimplemented in RexWindowFunctionOperator, and RexFunctionOperator.

Definition at line 241 of file RelAlgAbstractInterpreter.h.

References op_, operands_, run_benchmark_import::result, and to_string().

241  {
242  std::string result = "(RexOperator " + std::to_string(op_);
243  for (const auto& operand : operands_) {
244  result += " " + operand->toString();
245  }
246  return result + ")";
247  };
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

const SQLOps RexOperator::op_
protected

Definition at line 247 of file RelAlgAbstractInterpreter.h.

Referenced by getDisambiguated(), getOperator(), and toString().

std::vector<std::unique_ptr<const RexScalar> > RexOperator::operands_
mutableprotected
const SQLTypeInfo RexOperator::type_
protected

Definition at line 252 of file RelAlgAbstractInterpreter.h.

Referenced by getDisambiguated(), and getType().


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