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

#include <RelAlgDagBuilder.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 (const 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_
 
const unsigned id_
 
std::optional< size_t > id_in_plan_tree_
 
std::optional< size_t > hash_
 

Detailed Description

Definition at line 1392 of file RelAlgDagBuilder.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 1394 of file RelAlgDagBuilder.h.

Referenced by toHash().

1405  : lhs_(lhs)
1406  , rhs_(rhs)
1407  , lhs_join_cols_(lhs_join_cols)
1408  , rhs_join_cols_(rhs_join_cols)
1409  , filter_ops_(filter_ops)
1410  , outer_join_cond_(outer_join_cond)
1411  , nested_loop_(nested_loop)
1412  , join_type_(join_type)
1413  , op_type_(op_type)
1414  , qualifier_(qualifier)
1415  , op_typeinfo_(op_typeinfo) {}
const RexScalar * outer_join_cond_
const JoinType join_type_
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
const RelAlgNode * rhs_
const std::string op_type_
const std::string qualifier_
const RelAlgNode * lhs_
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
const std::string op_typeinfo_

+ Here is the caller graph for this function:

Member Function Documentation

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

Implements RelAlgNode.

Definition at line 1482 of file RelAlgDagBuilder.h.

References CHECK.

1482  {
1483  CHECK(false);
1484  return nullptr;
1485  }
#define CHECK(condition)
Definition: Logger.h:223
const RexScalar* RelTranslatedJoin::getAndReleaseCondition ( ) const
inline

Definition at line 1473 of file RelAlgDagBuilder.h.

References CHECK.

1473  {
1474  CHECK(false);
1475  return nullptr;
1476  }
#define CHECK(condition)
Definition: Logger.h:223
const RexScalar* RelTranslatedJoin::getCondition ( ) const
inline

Definition at line 1469 of file RelAlgDagBuilder.h.

References CHECK.

1469  {
1470  CHECK(false);
1471  return nullptr;
1472  }
#define CHECK(condition)
Definition: Logger.h:223
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 1460 of file RelAlgDagBuilder.h.

References filter_ops_.

1460  {
1461  return filter_ops_;
1462  }
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
size_t RelTranslatedJoin::getFilterCondSize ( ) const
inline

Definition at line 1459 of file RelAlgDagBuilder.h.

References filter_ops_.

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

Definition at line 1487 of file RelAlgDagBuilder.h.

References lhs_join_cols_, and rhs_join_cols_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1487  {
1488  if (lhs) {
1489  return lhs_join_cols_;
1490  }
1491  return rhs_join_cols_;
1492  }
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_

+ Here is the caller graph for this function:

JoinType RelTranslatedJoin::getJoinType ( ) const
inline

Definition at line 1468 of file RelAlgDagBuilder.h.

References join_type_.

1468 { return join_type_; }
const JoinType join_type_
const RelAlgNode* RelTranslatedJoin::getLHS ( ) const
inline

Definition at line 1457 of file RelAlgDagBuilder.h.

References lhs_.

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

1457 { return lhs_; }
const RelAlgNode * lhs_

+ Here is the caller graph for this function:

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

Definition at line 1464 of file RelAlgDagBuilder.h.

References op_type_.

1464 { return op_type_; }
const std::string op_type_
std::string RelTranslatedJoin::getOpTypeInfo ( ) const
inline

Definition at line 1466 of file RelAlgDagBuilder.h.

References op_typeinfo_.

1466 { return op_typeinfo_; }
const std::string op_typeinfo_
const RexScalar* RelTranslatedJoin::getOuterJoinCond ( ) const
inline

Definition at line 1463 of file RelAlgDagBuilder.h.

References outer_join_cond_.

Referenced by RelRexDagVisitor::visit().

1463 { return outer_join_cond_; }
const RexScalar * outer_join_cond_

+ Here is the caller graph for this function:

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

Definition at line 1465 of file RelAlgDagBuilder.h.

References qualifier_.

1465 { return qualifier_; }
const std::string qualifier_
const RelAlgNode* RelTranslatedJoin::getRHS ( ) const
inline

Definition at line 1458 of file RelAlgDagBuilder.h.

References rhs_.

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

1458 { return rhs_; }
const RelAlgNode * rhs_

+ Here is the caller graph for this function:

bool RelTranslatedJoin::isNestedLoopQual ( ) const
inline

Definition at line 1493 of file RelAlgDagBuilder.h.

References nested_loop_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1493 { return nested_loop_; }

+ 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 1478 of file RelAlgDagBuilder.h.

References CHECK.

1479  {
1480  CHECK(false);
1481  }
#define CHECK(condition)
Definition: Logger.h:223
void RelTranslatedJoin::setCondition ( std::unique_ptr< const RexScalar > &  condition)
inline

Definition at line 1477 of file RelAlgDagBuilder.h.

References CHECK.

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

Implements RelAlgNode.

Definition at line 1467 of file RelAlgDagBuilder.h.

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

Implements RelAlgNode.

Definition at line 1440 of file RelAlgDagBuilder.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().

1440  {
1441  if (!hash_) {
1442  hash_ = typeid(RelTranslatedJoin).hash_code();
1443  boost::hash_combine(*hash_, lhs_->toHash());
1444  boost::hash_combine(*hash_, rhs_->toHash());
1445  boost::hash_combine(*hash_, outer_join_cond_ ? outer_join_cond_->toHash() : HASH_N);
1446  boost::hash_combine(*hash_, nested_loop_);
1447  boost::hash_combine(*hash_, ::toString(join_type_));
1448  boost::hash_combine(*hash_, op_type_);
1449  boost::hash_combine(*hash_, qualifier_);
1450  boost::hash_combine(*hash_, op_typeinfo_);
1451  for (auto& filter_op : filter_ops_) {
1452  boost::hash_combine(*hash_, filter_op->toString());
1453  }
1454  }
1455  return *hash_;
1456  }
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
const RexScalar * outer_join_cond_
const JoinType join_type_
const RelAlgNode * rhs_
const std::string op_type_
const std::string qualifier_
const RelAlgNode * lhs_
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
std::optional< size_t > hash_
static auto const HASH_N
const std::string op_typeinfo_
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)
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 1417 of file RelAlgDagBuilder.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().

1418  {
1419  return cat(::typeName(this),
1420  "( join_quals { lhs: ",
1422  ", rhs: ",
1424  " }, filter_quals: { ",
1425  ::toString(filter_ops_),
1426  " }, outer_join_cond: { ",
1427  outer_join_cond_->toString(config),
1428  " }, loop_join: ",
1430  ", join_type: ",
1432  ", op_type: ",
1434  ", qualifier: ",
1436  ", op_type_info: ",
1438  ")");
1439  }
virtual std::string toString(RelRexToStringConfig config) const =0
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
std::string cat(Ts &&...args)
const RexScalar * outer_join_cond_
const JoinType join_type_
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
const std::string op_type_
const std::string qualifier_
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
std::string typeName(const T *v)
Definition: toString.h:102
const std::string op_typeinfo_

+ 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 1500 of file RelAlgDagBuilder.h.

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

const JoinType RelTranslatedJoin::join_type_
private

Definition at line 1503 of file RelAlgDagBuilder.h.

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

const RelAlgNode* RelTranslatedJoin::lhs_
private

Definition at line 1496 of file RelAlgDagBuilder.h.

Referenced by getLHS(), and toHash().

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

Definition at line 1498 of file RelAlgDagBuilder.h.

Referenced by getJoinCols(), and toString().

const bool RelTranslatedJoin::nested_loop_
private

Definition at line 1502 of file RelAlgDagBuilder.h.

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

const std::string RelTranslatedJoin::op_type_
private

Definition at line 1504 of file RelAlgDagBuilder.h.

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

const std::string RelTranslatedJoin::op_typeinfo_
private

Definition at line 1506 of file RelAlgDagBuilder.h.

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

const RexScalar* RelTranslatedJoin::outer_join_cond_
private

Definition at line 1501 of file RelAlgDagBuilder.h.

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

const std::string RelTranslatedJoin::qualifier_
private

Definition at line 1505 of file RelAlgDagBuilder.h.

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

const RelAlgNode* RelTranslatedJoin::rhs_
private

Definition at line 1497 of file RelAlgDagBuilder.h.

Referenced by getRHS(), and toHash().

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

Definition at line 1499 of file RelAlgDagBuilder.h.

Referenced by getJoinCols(), and toString().


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