OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RelTranslatedJoin Class Reference

#include <RelAlgDag.h>

+ Inheritance diagram for RelTranslatedJoin:
+ Collaboration diagram for RelTranslatedJoin:

Public Member Functions

 RelTranslatedJoin (const RelAlgNode *lhs, const RelAlgNode *rhs, const std::vector< const Analyzer::ColumnVar * > lhs_join_cols, const std::vector< const Analyzer::ColumnVar * > rhs_join_cols, const std::vector< std::shared_ptr< const Analyzer::Expr >> filter_ops, const RexScalar *outer_join_cond, const bool nested_loop, const JoinType join_type, const std::string &op_type, const std::string &qualifier, const std::string &op_typeinfo)
 
std::string toString (RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
 
size_t toHash () const override
 
const RelAlgNodegetLHS () const
 
const RelAlgNodegetRHS () const
 
size_t getFilterCondSize () const
 
const std::vector
< std::shared_ptr< const
Analyzer::Expr > > 
getFilterCond () const
 
const RexScalargetOuterJoinCond () const
 
std::string getOpType () const
 
std::string getQualifier () const
 
std::string getOpTypeInfo () const
 
size_t size () const override
 
JoinType getJoinType () const
 
const RexScalargetCondition () const
 
const RexScalargetAndReleaseCondition () const
 
void setCondition (std::unique_ptr< const RexScalar > &condition)
 
void replaceInput (std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input) override
 
std::shared_ptr< RelAlgNodedeepCopy () const override
 
std::string getFieldName (const size_t i) const
 
std::vector< const
Analyzer::ColumnVar * > 
getJoinCols (bool lhs) const
 
bool isNestedLoopQual () const
 
- Public Member Functions inherited from RelAlgNode
 RelAlgNode (RelAlgInputs inputs={})
 
virtual ~RelAlgNode ()
 
void resetQueryExecutionState ()
 
void setContextData (const RaExecutionDesc *context_data) const
 
void setOutputMetainfo (std::vector< TargetMetaInfo > targets_metainfo) const
 
void setQueryPlanDag (const std::string &extracted_query_plan_dag) const
 
std::string getQueryPlanDag () const
 
size_t getQueryPlanDagHash () const
 
const std::vector
< TargetMetaInfo > & 
getOutputMetainfo () const
 
unsigned getId () const
 
void setIdInPlanTree (size_t id) const
 
std::optional< size_t > getIdInPlanTree () const
 
bool hasContextData () const
 
const RaExecutionDescgetContextData () const
 
const size_t inputCount () const
 
const RelAlgNodegetInput (const size_t idx) const
 
std::shared_ptr< const RelAlgNodegetAndOwnInput (const size_t idx) const
 
void addManagedInput (std::shared_ptr< const RelAlgNode > input)
 
bool hasInput (const RelAlgNode *needle) const
 
void setRelNodeDagId (const size_t id) const
 
size_t getRelNodeDagId () const
 
bool isNop () const
 
void markAsNop ()
 
void clearContextData () const
 

Private Attributes

const RelAlgNodelhs_
 
const RelAlgNoderhs_
 
const std::vector< const
Analyzer::ColumnVar * > 
lhs_join_cols_
 
const std::vector< const
Analyzer::ColumnVar * > 
rhs_join_cols_
 
const std::vector
< std::shared_ptr< const
Analyzer::Expr > > 
filter_ops_
 
const RexScalarouter_join_cond_
 
const bool nested_loop_
 
const JoinType join_type_
 
const std::string op_type_
 
const std::string qualifier_
 
const std::string op_typeinfo_
 

Additional Inherited Members

- Static Public Member Functions inherited from RelAlgNode
static void resetRelAlgFirstId () noexcept
 
- Protected Attributes inherited from RelAlgNode
RelAlgInputs inputs_
 
unsigned id_
 
std::optional< size_t > id_in_plan_tree_
 
std::optional< size_t > hash_
 

Detailed Description

Definition at line 1560 of file RelAlgDag.h.

Constructor & Destructor Documentation

RelTranslatedJoin::RelTranslatedJoin ( const RelAlgNode lhs,
const RelAlgNode rhs,
const std::vector< const Analyzer::ColumnVar * >  lhs_join_cols,
const std::vector< const Analyzer::ColumnVar * >  rhs_join_cols,
const std::vector< std::shared_ptr< const Analyzer::Expr >>  filter_ops,
const RexScalar outer_join_cond,
const bool  nested_loop,
const JoinType  join_type,
const std::string &  op_type,
const std::string &  qualifier,
const std::string &  op_typeinfo 
)
inline

Definition at line 1562 of file RelAlgDag.h.

Referenced by toHash().

1573  : lhs_(lhs)
1574  , rhs_(rhs)
1575  , lhs_join_cols_(lhs_join_cols)
1576  , rhs_join_cols_(rhs_join_cols)
1577  , filter_ops_(filter_ops)
1578  , outer_join_cond_(outer_join_cond)
1579  , nested_loop_(nested_loop)
1580  , join_type_(join_type)
1581  , op_type_(op_type)
1582  , qualifier_(qualifier)
1583  , op_typeinfo_(op_typeinfo) {}
const bool nested_loop_
Definition: RelAlgDag.h:1670
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1669
const JoinType join_type_
Definition: RelAlgDag.h:1671
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1666
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1665
const std::string op_type_
Definition: RelAlgDag.h:1672
const std::string qualifier_
Definition: RelAlgDag.h:1673
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1664
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1668
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1667
const std::string op_typeinfo_
Definition: RelAlgDag.h:1674

+ Here is the caller graph for this function:

Member Function Documentation

std::shared_ptr<RelAlgNode> RelTranslatedJoin::deepCopy ( ) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 1650 of file RelAlgDag.h.

References CHECK.

1650  {
1651  CHECK(false);
1652  return nullptr;
1653  }
#define CHECK(condition)
Definition: Logger.h:291
const RexScalar* RelTranslatedJoin::getAndReleaseCondition ( ) const
inline

Definition at line 1641 of file RelAlgDag.h.

References CHECK.

1641  {
1642  CHECK(false);
1643  return nullptr;
1644  }
#define CHECK(condition)
Definition: Logger.h:291
const RexScalar* RelTranslatedJoin::getCondition ( ) const
inline

Definition at line 1637 of file RelAlgDag.h.

References CHECK.

1637  {
1638  CHECK(false);
1639  return nullptr;
1640  }
#define CHECK(condition)
Definition: Logger.h:291
std::string RelTranslatedJoin::getFieldName ( const size_t  i) const
const std::vector<std::shared_ptr<const Analyzer::Expr> > RelTranslatedJoin::getFilterCond ( ) const
inline

Definition at line 1628 of file RelAlgDag.h.

References filter_ops_.

1628  {
1629  return filter_ops_;
1630  }
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1668
size_t RelTranslatedJoin::getFilterCondSize ( ) const
inline

Definition at line 1627 of file RelAlgDag.h.

References filter_ops_.

1627 { return filter_ops_.size(); }
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1668
std::vector<const Analyzer::ColumnVar*> RelTranslatedJoin::getJoinCols ( bool  lhs) const
inline

Definition at line 1655 of file RelAlgDag.h.

References lhs_join_cols_, and rhs_join_cols_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1655  {
1656  if (lhs) {
1657  return lhs_join_cols_;
1658  }
1659  return rhs_join_cols_;
1660  }
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1666
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1667

+ Here is the caller graph for this function:

JoinType RelTranslatedJoin::getJoinType ( ) const
inline

Definition at line 1636 of file RelAlgDag.h.

References join_type_.

1636 { return join_type_; }
const JoinType join_type_
Definition: RelAlgDag.h:1671
const RelAlgNode* RelTranslatedJoin::getLHS ( ) const
inline

Definition at line 1625 of file RelAlgDag.h.

References lhs_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin(), and RelRexDagVisitor::visit().

1625 { return lhs_; }
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1664

+ Here is the caller graph for this function:

std::string RelTranslatedJoin::getOpType ( ) const
inline

Definition at line 1632 of file RelAlgDag.h.

References op_type_.

1632 { return op_type_; }
const std::string op_type_
Definition: RelAlgDag.h:1672
std::string RelTranslatedJoin::getOpTypeInfo ( ) const
inline

Definition at line 1634 of file RelAlgDag.h.

References op_typeinfo_.

1634 { return op_typeinfo_; }
const std::string op_typeinfo_
Definition: RelAlgDag.h:1674
const RexScalar* RelTranslatedJoin::getOuterJoinCond ( ) const
inline

Definition at line 1631 of file RelAlgDag.h.

References outer_join_cond_.

Referenced by RelRexDagVisitor::visit().

1631 { return outer_join_cond_; }
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1669

+ Here is the caller graph for this function:

std::string RelTranslatedJoin::getQualifier ( ) const
inline

Definition at line 1633 of file RelAlgDag.h.

References qualifier_.

1633 { return qualifier_; }
const std::string qualifier_
Definition: RelAlgDag.h:1673
const RelAlgNode* RelTranslatedJoin::getRHS ( ) const
inline

Definition at line 1626 of file RelAlgDag.h.

References rhs_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin(), and RelRexDagVisitor::visit().

1626 { return rhs_; }
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1665

+ Here is the caller graph for this function:

bool RelTranslatedJoin::isNestedLoopQual ( ) const
inline

Definition at line 1661 of file RelAlgDag.h.

References nested_loop_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1661 { return nested_loop_; }
const bool nested_loop_
Definition: RelAlgDag.h:1670

+ Here is the caller graph for this function:

void RelTranslatedJoin::replaceInput ( std::shared_ptr< const RelAlgNode old_input,
std::shared_ptr< const RelAlgNode input 
)
inlineoverridevirtual

Reimplemented from RelAlgNode.

Definition at line 1646 of file RelAlgDag.h.

References CHECK.

1647  {
1648  CHECK(false);
1649  }
#define CHECK(condition)
Definition: Logger.h:291
void RelTranslatedJoin::setCondition ( std::unique_ptr< const RexScalar > &  condition)
inline

Definition at line 1645 of file RelAlgDag.h.

References CHECK.

1645 { CHECK(false); }
#define CHECK(condition)
Definition: Logger.h:291
size_t RelTranslatedJoin::size ( ) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 1635 of file RelAlgDag.h.

1635 { return 0; }
size_t RelTranslatedJoin::toHash ( ) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 1608 of file RelAlgDag.h.

References filter_ops_, RelAlgNode::hash_, HASH_N, join_type_, lhs_, nested_loop_, op_type_, op_typeinfo_, outer_join_cond_, qualifier_, RelTranslatedJoin(), rhs_, Rex::toHash(), RelAlgNode::toHash(), and toString().

1608  {
1609  if (!hash_) {
1610  hash_ = typeid(RelTranslatedJoin).hash_code();
1611  boost::hash_combine(*hash_, lhs_->toHash());
1612  boost::hash_combine(*hash_, rhs_->toHash());
1613  boost::hash_combine(*hash_, outer_join_cond_ ? outer_join_cond_->toHash() : HASH_N);
1614  boost::hash_combine(*hash_, nested_loop_);
1615  boost::hash_combine(*hash_, ::toString(join_type_));
1616  boost::hash_combine(*hash_, op_type_);
1617  boost::hash_combine(*hash_, qualifier_);
1618  boost::hash_combine(*hash_, op_typeinfo_);
1619  for (auto& filter_op : filter_ops_) {
1620  boost::hash_combine(*hash_, filter_op->toString());
1621  }
1622  }
1623  return *hash_;
1624  }
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
Definition: RelAlgDag.h:1585
const bool nested_loop_
Definition: RelAlgDag.h:1670
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1669
const JoinType join_type_
Definition: RelAlgDag.h:1671
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1665
const std::string op_type_
Definition: RelAlgDag.h:1672
const std::string qualifier_
Definition: RelAlgDag.h:1673
static auto const HASH_N
Definition: RelAlgDag.h:44
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1664
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1668
std::optional< size_t > hash_
Definition: RelAlgDag.h:955
const std::string op_typeinfo_
Definition: RelAlgDag.h:1674
virtual size_t toHash() const =0
RelTranslatedJoin(const RelAlgNode *lhs, const RelAlgNode *rhs, const std::vector< const Analyzer::ColumnVar * > lhs_join_cols, const std::vector< const Analyzer::ColumnVar * > rhs_join_cols, const std::vector< std::shared_ptr< const Analyzer::Expr >> filter_ops, const RexScalar *outer_join_cond, const bool nested_loop, const JoinType join_type, const std::string &op_type, const std::string &qualifier, const std::string &op_typeinfo)
Definition: RelAlgDag.h:1562
virtual size_t toHash() const =0

+ Here is the call graph for this function:

std::string RelTranslatedJoin::toString ( RelRexToStringConfig  config = RelRexToStringConfig::defaults()) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 1585 of file RelAlgDag.h.

References cat(), filter_ops_, join_type_, lhs_join_cols_, nested_loop_, op_type_, op_typeinfo_, outer_join_cond_, qualifier_, rhs_join_cols_, Rex::toString(), and typeName().

Referenced by toHash().

1586  {
1587  return cat(::typeName(this),
1588  "( join_quals { lhs: ",
1590  ", rhs: ",
1592  " }, filter_quals: { ",
1593  ::toString(filter_ops_),
1594  " }, outer_join_cond: { ",
1595  outer_join_cond_->toString(config),
1596  " }, loop_join: ",
1598  ", join_type: ",
1600  ", op_type: ",
1602  ", qualifier: ",
1604  ", op_type_info: ",
1606  ")");
1607  }
virtual std::string toString(RelRexToStringConfig config) const =0
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
Definition: RelAlgDag.h:1585
std::string cat(Ts &&...args)
const bool nested_loop_
Definition: RelAlgDag.h:1670
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1669
const JoinType join_type_
Definition: RelAlgDag.h:1671
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1666
const std::string op_type_
Definition: RelAlgDag.h:1672
const std::string qualifier_
Definition: RelAlgDag.h:1673
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1668
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1667
std::string typeName(const T *v)
Definition: toString.h:103
const std::string op_typeinfo_
Definition: RelAlgDag.h:1674

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

const std::vector<std::shared_ptr<const Analyzer::Expr> > RelTranslatedJoin::filter_ops_
private

Definition at line 1668 of file RelAlgDag.h.

Referenced by getFilterCond(), getFilterCondSize(), toHash(), and toString().

const JoinType RelTranslatedJoin::join_type_
private

Definition at line 1671 of file RelAlgDag.h.

Referenced by getJoinType(), toHash(), and toString().

const RelAlgNode* RelTranslatedJoin::lhs_
private

Definition at line 1664 of file RelAlgDag.h.

Referenced by getLHS(), and toHash().

const std::vector<const Analyzer::ColumnVar*> RelTranslatedJoin::lhs_join_cols_
private

Definition at line 1666 of file RelAlgDag.h.

Referenced by getJoinCols(), and toString().

const bool RelTranslatedJoin::nested_loop_
private

Definition at line 1670 of file RelAlgDag.h.

Referenced by isNestedLoopQual(), toHash(), and toString().

const std::string RelTranslatedJoin::op_type_
private

Definition at line 1672 of file RelAlgDag.h.

Referenced by getOpType(), toHash(), and toString().

const std::string RelTranslatedJoin::op_typeinfo_
private

Definition at line 1674 of file RelAlgDag.h.

Referenced by getOpTypeInfo(), toHash(), and toString().

const RexScalar* RelTranslatedJoin::outer_join_cond_
private

Definition at line 1669 of file RelAlgDag.h.

Referenced by getOuterJoinCond(), toHash(), and toString().

const std::string RelTranslatedJoin::qualifier_
private

Definition at line 1673 of file RelAlgDag.h.

Referenced by getQualifier(), toHash(), and toString().

const RelAlgNode* RelTranslatedJoin::rhs_
private

Definition at line 1665 of file RelAlgDag.h.

Referenced by getRHS(), and toHash().

const std::vector<const Analyzer::ColumnVar*> RelTranslatedJoin::rhs_join_cols_
private

Definition at line 1667 of file RelAlgDag.h.

Referenced by getJoinCols(), and toString().


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