OmniSciDB  a987f07e93
 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 1542 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 1544 of file RelAlgDag.h.

Referenced by toHash().

1555  : lhs_(lhs)
1556  , rhs_(rhs)
1557  , lhs_join_cols_(lhs_join_cols)
1558  , rhs_join_cols_(rhs_join_cols)
1559  , filter_ops_(filter_ops)
1560  , outer_join_cond_(outer_join_cond)
1561  , nested_loop_(nested_loop)
1562  , join_type_(join_type)
1563  , op_type_(op_type)
1564  , qualifier_(qualifier)
1565  , op_typeinfo_(op_typeinfo) {}
const bool nested_loop_
Definition: RelAlgDag.h:1652
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1651
const JoinType join_type_
Definition: RelAlgDag.h:1653
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1648
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1647
const std::string op_type_
Definition: RelAlgDag.h:1654
const std::string qualifier_
Definition: RelAlgDag.h:1655
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1646
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1650
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1649
const std::string op_typeinfo_
Definition: RelAlgDag.h:1656

+ Here is the caller graph for this function:

Member Function Documentation

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

Implements RelAlgNode.

Definition at line 1632 of file RelAlgDag.h.

References CHECK.

1632  {
1633  CHECK(false);
1634  return nullptr;
1635  }
#define CHECK(condition)
Definition: Logger.h:289
const RexScalar* RelTranslatedJoin::getAndReleaseCondition ( ) const
inline

Definition at line 1623 of file RelAlgDag.h.

References CHECK.

1623  {
1624  CHECK(false);
1625  return nullptr;
1626  }
#define CHECK(condition)
Definition: Logger.h:289
const RexScalar* RelTranslatedJoin::getCondition ( ) const
inline

Definition at line 1619 of file RelAlgDag.h.

References CHECK.

1619  {
1620  CHECK(false);
1621  return nullptr;
1622  }
#define CHECK(condition)
Definition: Logger.h:289
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 1610 of file RelAlgDag.h.

References filter_ops_.

1610  {
1611  return filter_ops_;
1612  }
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1650
size_t RelTranslatedJoin::getFilterCondSize ( ) const
inline

Definition at line 1609 of file RelAlgDag.h.

References filter_ops_.

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

Definition at line 1637 of file RelAlgDag.h.

References lhs_join_cols_, and rhs_join_cols_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1637  {
1638  if (lhs) {
1639  return lhs_join_cols_;
1640  }
1641  return rhs_join_cols_;
1642  }
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1648
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1649

+ Here is the caller graph for this function:

JoinType RelTranslatedJoin::getJoinType ( ) const
inline

Definition at line 1618 of file RelAlgDag.h.

References join_type_.

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

Definition at line 1607 of file RelAlgDag.h.

References lhs_.

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

1607 { return lhs_; }
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1646

+ Here is the caller graph for this function:

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

Definition at line 1614 of file RelAlgDag.h.

References op_type_.

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

Definition at line 1616 of file RelAlgDag.h.

References op_typeinfo_.

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

Definition at line 1613 of file RelAlgDag.h.

References outer_join_cond_.

Referenced by RelRexDagVisitor::visit().

1613 { return outer_join_cond_; }
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1651

+ Here is the caller graph for this function:

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

Definition at line 1615 of file RelAlgDag.h.

References qualifier_.

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

Definition at line 1608 of file RelAlgDag.h.

References rhs_.

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

1608 { return rhs_; }
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1647

+ Here is the caller graph for this function:

bool RelTranslatedJoin::isNestedLoopQual ( ) const
inline

Definition at line 1643 of file RelAlgDag.h.

References nested_loop_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1643 { return nested_loop_; }
const bool nested_loop_
Definition: RelAlgDag.h:1652

+ 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 1628 of file RelAlgDag.h.

References CHECK.

1629  {
1630  CHECK(false);
1631  }
#define CHECK(condition)
Definition: Logger.h:289
void RelTranslatedJoin::setCondition ( std::unique_ptr< const RexScalar > &  condition)
inline

Definition at line 1627 of file RelAlgDag.h.

References CHECK.

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

Implements RelAlgNode.

Definition at line 1617 of file RelAlgDag.h.

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

Implements RelAlgNode.

Definition at line 1590 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().

1590  {
1591  if (!hash_) {
1592  hash_ = typeid(RelTranslatedJoin).hash_code();
1593  boost::hash_combine(*hash_, lhs_->toHash());
1594  boost::hash_combine(*hash_, rhs_->toHash());
1595  boost::hash_combine(*hash_, outer_join_cond_ ? outer_join_cond_->toHash() : HASH_N);
1596  boost::hash_combine(*hash_, nested_loop_);
1597  boost::hash_combine(*hash_, ::toString(join_type_));
1598  boost::hash_combine(*hash_, op_type_);
1599  boost::hash_combine(*hash_, qualifier_);
1600  boost::hash_combine(*hash_, op_typeinfo_);
1601  for (auto& filter_op : filter_ops_) {
1602  boost::hash_combine(*hash_, filter_op->toString());
1603  }
1604  }
1605  return *hash_;
1606  }
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
Definition: RelAlgDag.h:1567
const bool nested_loop_
Definition: RelAlgDag.h:1652
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1651
const JoinType join_type_
Definition: RelAlgDag.h:1653
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1647
const std::string op_type_
Definition: RelAlgDag.h:1654
const std::string qualifier_
Definition: RelAlgDag.h:1655
static auto const HASH_N
Definition: RelAlgDag.h:44
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1646
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1650
std::optional< size_t > hash_
Definition: RelAlgDag.h:955
const std::string op_typeinfo_
Definition: RelAlgDag.h:1656
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:1544
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 1567 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().

1568  {
1569  return cat(::typeName(this),
1570  "( join_quals { lhs: ",
1572  ", rhs: ",
1574  " }, filter_quals: { ",
1575  ::toString(filter_ops_),
1576  " }, outer_join_cond: { ",
1577  outer_join_cond_->toString(config),
1578  " }, loop_join: ",
1580  ", join_type: ",
1582  ", op_type: ",
1584  ", qualifier: ",
1586  ", op_type_info: ",
1588  ")");
1589  }
virtual std::string toString(RelRexToStringConfig config) const =0
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
Definition: RelAlgDag.h:1567
std::string cat(Ts &&...args)
const bool nested_loop_
Definition: RelAlgDag.h:1652
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1651
const JoinType join_type_
Definition: RelAlgDag.h:1653
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1648
const std::string op_type_
Definition: RelAlgDag.h:1654
const std::string qualifier_
Definition: RelAlgDag.h:1655
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1650
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1649
std::string typeName(const T *v)
Definition: toString.h:103
const std::string op_typeinfo_
Definition: RelAlgDag.h:1656

+ 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 1650 of file RelAlgDag.h.

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

const JoinType RelTranslatedJoin::join_type_
private

Definition at line 1653 of file RelAlgDag.h.

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

const RelAlgNode* RelTranslatedJoin::lhs_
private

Definition at line 1646 of file RelAlgDag.h.

Referenced by getLHS(), and toHash().

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

Definition at line 1648 of file RelAlgDag.h.

Referenced by getJoinCols(), and toString().

const bool RelTranslatedJoin::nested_loop_
private

Definition at line 1652 of file RelAlgDag.h.

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

const std::string RelTranslatedJoin::op_type_
private

Definition at line 1654 of file RelAlgDag.h.

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

const std::string RelTranslatedJoin::op_typeinfo_
private

Definition at line 1656 of file RelAlgDag.h.

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

const RexScalar* RelTranslatedJoin::outer_join_cond_
private

Definition at line 1651 of file RelAlgDag.h.

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

const std::string RelTranslatedJoin::qualifier_
private

Definition at line 1655 of file RelAlgDag.h.

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

const RelAlgNode* RelTranslatedJoin::rhs_
private

Definition at line 1647 of file RelAlgDag.h.

Referenced by getRHS(), and toHash().

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

Definition at line 1649 of file RelAlgDag.h.

Referenced by getJoinCols(), and toString().


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