OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor Class Reference
+ Inheritance diagram for anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor:
+ Collaboration diagram for anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor:

Public Member Functions

bool visitInput (const RexInput *input) const final
 
bool visitLiteral (const RexLiteral *) const final
 
bool visitSubQuery (const RexSubQuery *) const final
 
bool visitRef (const RexRef *) const final
 
- Public Member Functions inherited from RexVisitor< bool >
bool visitInput (const RexInput *) const override
 
bool visitLiteral (const RexLiteral *) const override
 
bool visitSubQuery (const RexSubQuery *) const override
 
bool visitRef (const RexRef *) const override
 
bool visitOperator (const RexOperator *rex_operator) const override
 
bool visitCase (const RexCase *rex_case) const override
 
- Public Member Functions inherited from RexVisitorBase< bool >
virtual bool visit (const RexScalar *rex_scalar) const
 

Protected Member Functions

bool aggregateResult (const bool &aggregate, const bool &next_result) const final
 
bool defaultResult () const final
 
- Protected Member Functions inherited from RexVisitor< bool >
bool defaultResult () const override
 

Detailed Description

CoalesceSecondaryProjectVisitor visits each relational algebra expression node in a given input and determines whether or not the input is a candidate for coalescing into the parent RA node. Intended for use only on the inputs of a RelProject node.

Definition at line 1283 of file RelAlgAbstractInterpreter.cpp.

Member Function Documentation

bool anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor::aggregateResult ( const bool &  aggregate,
const bool &  next_result 
) const
inlinefinalprotectedvirtual

Reimplemented from RexVisitor< bool >.

Definition at line 1299 of file RelAlgAbstractInterpreter.cpp.

1299  {
1300  return aggregate && next_result;
1301  }
bool anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor::defaultResult ( ) const
inlinefinalprotectedvirtual

Implements RexVisitorBase< bool >.

Definition at line 1303 of file RelAlgAbstractInterpreter.cpp.

1303 { return true; }
bool anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor::visitInput ( const RexInput input) const
inlinefinalvirtual

Implements RexVisitorBase< bool >.

Definition at line 1285 of file RelAlgAbstractInterpreter.cpp.

References anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::input_can_be_coalesced().

1285  {
1286  // The top level expression node is checked before we apply the visitor. If we get
1287  // here, this input rex is a child of another rex node, and we handle the can be
1288  // coalesced check slightly differently
1289  return input_can_be_coalesced(input->getSourceNode(), input->getIndex(), false);
1290  }
unsigned getIndex() const
bool input_can_be_coalesced(const RelAlgNode *parent_node, const size_t index, const bool first_rex_is_input)
const RelAlgNode * getSourceNode() const

+ Here is the call graph for this function:

bool anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor::visitLiteral ( const RexLiteral ) const
inlinefinalvirtual

Implements RexVisitorBase< bool >.

Definition at line 1292 of file RelAlgAbstractInterpreter.cpp.

1292 { return false; }
bool anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor::visitRef ( const RexRef ) const
inlinefinalvirtual

Implements RexVisitorBase< bool >.

Definition at line 1296 of file RelAlgAbstractInterpreter.cpp.

1296 { return false; }
bool anonymous_namespace{RelAlgAbstractInterpreter.cpp}::anonymous_namespace{RelAlgAbstractInterpreter.cpp}::CoalesceSecondaryProjectVisitor::visitSubQuery ( const RexSubQuery ) const
inlinefinalvirtual

Implements RexVisitorBase< bool >.

Definition at line 1294 of file RelAlgAbstractInterpreter.cpp.

1294 { return false; }

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