OmniSciDB  ca0c39ec8f
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RexVisitorBase< T > Class Template Referenceabstract

#include <RexVisitor.h>

+ Inheritance diagram for RexVisitorBase< T >:

Public Member Functions

virtual T visit (const RexScalar *rex_scalar) const
 
virtual T visitInput (const RexInput *) const =0
 
virtual T visitLiteral (const RexLiteral *) const =0
 
virtual T visitSubQuery (const RexSubQuery *) const =0
 
virtual T visitRef (const RexRef *) const =0
 
virtual T visitOperator (const RexOperator *rex_operator) const =0
 
virtual T visitCase (const RexCase *rex_case) const =0
 

Protected Member Functions

virtual T defaultResult () const =0
 

Detailed Description

template<class T>
class RexVisitorBase< T >

Definition at line 25 of file RexVisitor.h.

Member Function Documentation

template<class T>
virtual T RexVisitorBase< T >::defaultResult ( ) const
protectedpure virtual
template<class T>
virtual T RexVisitorBase< T >::visit ( const RexScalar rex_scalar) const
inlinevirtual

Definition at line 27 of file RexVisitor.h.

Referenced by RexDeepCopyVisitor::copy(), anonymous_namespace{RelAlgDag.cpp}::copyRexScalars(), anonymous_namespace{RelAlgExecutor.cpp}::get_bitwise_equals(), hoist_filter_cond_to_cross_join(), anonymous_namespace{RelAlgOptimizer.cpp}::propagate_input_renumbering(), anonymous_namespace{RelAlgOptimizer.cpp}::redirect_inputs_of(), RelCompound::RelCompound(), RelFilter::RelFilter(), RelJoin::RelJoin(), RelProject::RelProject(), anonymous_namespace{RelAlgDag.cpp}::separate_window_function_expressions(), QueryPlanDagExtractor::visit(), RexVisitor< T >::visitOperator(), and RexVisitor< T >::visitWindowFunctionOperator().

27  {
28  CHECK(rex_scalar);
29  const auto rex_input = dynamic_cast<const RexInput*>(rex_scalar);
30  if (rex_input) {
31  return visitInput(rex_input);
32  }
33  const auto rex_literal = dynamic_cast<const RexLiteral*>(rex_scalar);
34  if (rex_literal) {
35  return visitLiteral(rex_literal);
36  }
37  const auto rex_subquery = dynamic_cast<const RexSubQuery*>(rex_scalar);
38  if (rex_subquery) {
39  return visitSubQuery(rex_subquery);
40  }
41  const auto rex_operator = dynamic_cast<const RexOperator*>(rex_scalar);
42  if (rex_operator) {
43  return visitOperator(rex_operator);
44  }
45  const auto rex_case = dynamic_cast<const RexCase*>(rex_scalar);
46  if (rex_case) {
47  return visitCase(rex_case);
48  }
49  const auto rex_ref = dynamic_cast<const RexRef*>(rex_scalar);
50  if (rex_ref) {
51  return visitRef(rex_ref);
52  }
53  LOG(FATAL) << "No visit path for "
54  << rex_scalar->toString(RelRexToStringConfig::defaults());
55  return defaultResult();
56  }
virtual std::string toString(RelRexToStringConfig config) const =0
#define LOG(tag)
Definition: Logger.h:216
virtual T visitRef(const RexRef *) const =0
virtual T visitLiteral(const RexLiteral *) const =0
virtual T visitCase(const RexCase *rex_case) const =0
virtual T defaultResult() const =0
virtual T visitOperator(const RexOperator *rex_operator) const =0
virtual T visitInput(const RexInput *) const =0
virtual T visitSubQuery(const RexSubQuery *) const =0
static RelRexToStringConfig defaults()
Definition: RelAlgDag.h:49
#define CHECK(condition)
Definition: Logger.h:222

+ Here is the caller graph for this function:

template<class T>
virtual T RexVisitorBase< T >::visitCase ( const RexCase rex_case) const
pure virtual

Implemented in anonymous_namespace{RelAlgDag.cpp}::RexWindowFuncReplacementVisitor, anonymous_namespace{RelAlgDag.cpp}::PushDownGenericExpressionInWindowFunction, RexDeepCopyVisitor, and RexVisitor< T >.

Referenced by RexVisitorBase< std::unique_ptr< const RexScalar > >::visit().

+ Here is the caller graph for this function:

template<class T>
virtual T RexVisitorBase< T >::visitLiteral ( const RexLiteral ) const
pure virtual

Implemented in anonymous_namespace{RelAlgDag.cpp}::PushDownGenericExpressionInWindowFunction, RexDeepCopyVisitor, and RexVisitor< T >.

Referenced by RexVisitorBase< std::unique_ptr< const RexScalar > >::visit().

+ Here is the caller graph for this function:

template<class T>
virtual T RexVisitorBase< T >::visitOperator ( const RexOperator rex_operator) const
pure virtual

Implemented in anonymous_namespace{RelAlgDag.cpp}::RexWindowFuncReplacementVisitor, SubConditionRemover, anonymous_namespace{RelAlgDag.cpp}::PushDownGenericExpressionInWindowFunction, RexDeepCopyVisitor, and RexVisitor< T >.

Referenced by RexVisitorBase< std::unique_ptr< const RexScalar > >::visit().

+ Here is the caller graph for this function:

template<class T>
virtual T RexVisitorBase< T >::visitRef ( const RexRef ) const
pure virtual

Implemented in anonymous_namespace{RelAlgDag.cpp}::PushDownGenericExpressionInWindowFunction, RexDeepCopyVisitor, and RexVisitor< T >.

Referenced by RexVisitorBase< std::unique_ptr< const RexScalar > >::visit().

+ Here is the caller graph for this function:

template<class T>
virtual T RexVisitorBase< T >::visitSubQuery ( const RexSubQuery ) const
pure virtual

Implemented in anonymous_namespace{RelAlgDag.cpp}::PushDownGenericExpressionInWindowFunction, RexDeepCopyVisitor, and RexVisitor< T >.

Referenced by RexVisitorBase< std::unique_ptr< const RexScalar > >::visit().

+ Here is the caller graph for this function:


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