OmniSciDB  21ac014ffc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RexInput Class Reference

#include <RelAlgDagBuilder.h>

+ Inheritance diagram for RexInput:
+ Collaboration diagram for RexInput:

Public Member Functions

 RexInput (const RelAlgNode *node, const unsigned in_index)
 
const RelAlgNodegetSourceNode () const
 
void setSourceNode (const RelAlgNode *node) const
 
bool operator== (const RexInput &that) const
 
std::string toString () const override
 
size_t toHash () const override
 
std::unique_ptr< RexInputdeepCopy () const
 
- Public Member Functions inherited from RexAbstractInput
 RexAbstractInput (const unsigned in_index)
 
unsigned getIndex () const
 
void setIndex (const unsigned in_index) const
 
- Public Member Functions inherited from Rex
virtual ~Rex ()
 

Private Attributes

const RelAlgNodenode_
 

Additional Inherited Members

- Protected Attributes inherited from Rex
std::optional< size_t > hash_
 

Detailed Description

Definition at line 364 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

RexInput::RexInput ( const RelAlgNode node,
const unsigned  in_index 
)
inline

Definition at line 366 of file RelAlgDagBuilder.h.

Referenced by toHash().

367  : RexAbstractInput(in_index), node_(node) {}
RexAbstractInput(const unsigned in_index)
const RelAlgNode * node_

+ Here is the caller graph for this function:

Member Function Documentation

std::unique_ptr<RexInput> RexInput::deepCopy ( ) const
inline

Definition at line 384 of file RelAlgDagBuilder.h.

References RexAbstractInput::getIndex(), and node_.

Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::RexProjectInputRedirector::visitInput(), RexDeepCopyVisitor::visitInput(), RexInputRenumber< bAllowMissing >::visitInput(), and anonymous_namespace{RelAlgOptimizer.cpp}::RexInputRenumberVisitor::visitInput().

384  {
385  return std::make_unique<RexInput>(node_, getIndex());
386  }
unsigned getIndex() const
const RelAlgNode * node_

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool RexInput::operator== ( const RexInput that) const
inline

Definition at line 376 of file RelAlgDagBuilder.h.

References RexAbstractInput::getIndex(), and getSourceNode().

376  {
377  return getSourceNode() == that.getSourceNode() && getIndex() == that.getIndex();
378  }
unsigned getIndex() const
const RelAlgNode * getSourceNode() const

+ Here is the call graph for this function:

void RexInput::setSourceNode ( const RelAlgNode node) const
inline

Definition at line 374 of file RelAlgDagBuilder.h.

References node_.

Referenced by RelLogicalUnion::copyAndRedirectSource(), anonymous_namespace{RelAlgOptimizer.cpp}::RexRebindInputsVisitor::visitInput(), anonymous_namespace{RelAlgDagBuilder.cpp}::RexRebindInputsVisitor::visitInput(), and anonymous_namespace{RelLeftDeepInnerJoin.cpp}::RebindRexInputsFromLeftDeepJoin::visitInput().

374 { node_ = node; }
const RelAlgNode * node_

+ Here is the caller graph for this function:

size_t RexInput::toHash ( ) const
overridevirtual

Reimplemented from RexAbstractInput.

Definition at line 2749 of file RelAlgDagBuilder.cpp.

References RexAbstractInput::getIndex(), Rex::hash_, node_, RexInput(), and RelAlgNode::toHash().

2749  {
2750  if (!hash_) {
2751  hash_ = typeid(RexInput).hash_code();
2752  boost::hash_combine(*hash_, node_->toHash());
2753  boost::hash_combine(*hash_, getIndex());
2754  }
2755  return *hash_;
2756 }
RexInput(const RelAlgNode *node, const unsigned in_index)
unsigned getIndex() const
std::optional< size_t > hash_
const RelAlgNode * node_
virtual size_t toHash() const =0

+ Here is the call graph for this function:

std::string RexInput::toString ( ) const
overridevirtual

Reimplemented from RexAbstractInput.

Definition at line 2734 of file RelAlgDagBuilder.cpp.

References cat(), RelScan::getFieldName(), RexAbstractInput::getIndex(), node_, to_string(), and typeName().

2734  {
2735  const auto scan_node = dynamic_cast<const RelScan*>(node_);
2736  if (scan_node) {
2737  auto field_name = scan_node->getFieldName(getIndex());
2738  auto table_name = scan_node->getTableDescriptor()->tableName;
2739  return ::typeName(this) + "(" + table_name + "." + field_name + ")";
2740  }
2741  return cat(::typeName(this),
2742  "(node=",
2743  ::toString(node_),
2744  ", in_index=",
2746  ")");
2747 }
std::string cat(Ts &&...args)
std::string to_string(char const *&&v)
const std::string getFieldName(const size_t i) const
unsigned getIndex() const
std::string toString() const override
const RelAlgNode * node_
std::string typeName(const T *v)
Definition: toString.h:85

+ Here is the call graph for this function:

Member Data Documentation

const RelAlgNode* RexInput::node_
mutableprivate

Definition at line 389 of file RelAlgDagBuilder.h.

Referenced by deepCopy(), getSourceNode(), setSourceNode(), toHash(), and toString().


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