OmniSciDB  d2f719934e
 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 337 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

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

Definition at line 339 of file RelAlgDagBuilder.h.

Referenced by toHash().

340  : 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 357 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().

357  {
358  return std::make_unique<RexInput>(node_, getIndex());
359  }
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 349 of file RelAlgDagBuilder.h.

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

349  {
350  return getSourceNode() == that.getSourceNode() && getIndex() == that.getIndex();
351  }
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 347 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().

347 { 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 2857 of file RelAlgDagBuilder.cpp.

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

2857  {
2858  if (!hash_) {
2859  hash_ = typeid(RexInput).hash_code();
2860  boost::hash_combine(*hash_, node_->toHash());
2861  boost::hash_combine(*hash_, getIndex());
2862  }
2863  return *hash_;
2864 }
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 2842 of file RelAlgDagBuilder.cpp.

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

2842  {
2843  const auto scan_node = dynamic_cast<const RelScan*>(node_);
2844  if (scan_node) {
2845  auto field_name = scan_node->getFieldName(getIndex());
2846  auto table_name = scan_node->getTableDescriptor()->tableName;
2847  return ::typeName(this) + "(" + table_name + "." + field_name + ")";
2848  }
2849  return cat(::typeName(this),
2850  "(node=",
2851  ::toString(node_),
2852  ", in_index=",
2854  ")");
2855 }
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:93

+ Here is the call graph for this function:

Member Data Documentation

const RelAlgNode* RexInput::node_
mutableprivate

Definition at line 362 of file RelAlgDagBuilder.h.

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


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