OmniSciDB  4201147b46
 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 (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 1389 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 1391 of file RelAlgDag.h.

Referenced by toHash().

1402  : lhs_(lhs)
1403  , rhs_(rhs)
1404  , lhs_join_cols_(lhs_join_cols)
1405  , rhs_join_cols_(rhs_join_cols)
1406  , filter_ops_(filter_ops)
1407  , outer_join_cond_(outer_join_cond)
1408  , nested_loop_(nested_loop)
1409  , join_type_(join_type)
1410  , op_type_(op_type)
1411  , qualifier_(qualifier)
1412  , op_typeinfo_(op_typeinfo) {}
const bool nested_loop_
Definition: RelAlgDag.h:1499
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1498
const JoinType join_type_
Definition: RelAlgDag.h:1500
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1495
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1494
const std::string op_type_
Definition: RelAlgDag.h:1501
const std::string qualifier_
Definition: RelAlgDag.h:1502
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1493
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1497
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1496
const std::string op_typeinfo_
Definition: RelAlgDag.h:1503

+ Here is the caller graph for this function:

Member Function Documentation

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

Implements RelAlgNode.

Definition at line 1479 of file RelAlgDag.h.

References CHECK.

1479  {
1480  CHECK(false);
1481  return nullptr;
1482  }
#define CHECK(condition)
Definition: Logger.h:222
const RexScalar* RelTranslatedJoin::getAndReleaseCondition ( ) const
inline

Definition at line 1470 of file RelAlgDag.h.

References CHECK.

1470  {
1471  CHECK(false);
1472  return nullptr;
1473  }
#define CHECK(condition)
Definition: Logger.h:222
const RexScalar* RelTranslatedJoin::getCondition ( ) const
inline

Definition at line 1466 of file RelAlgDag.h.

References CHECK.

1466  {
1467  CHECK(false);
1468  return nullptr;
1469  }
#define CHECK(condition)
Definition: Logger.h:222
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 1457 of file RelAlgDag.h.

References filter_ops_.

1457  {
1458  return filter_ops_;
1459  }
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1497
size_t RelTranslatedJoin::getFilterCondSize ( ) const
inline

Definition at line 1456 of file RelAlgDag.h.

References filter_ops_.

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

Definition at line 1484 of file RelAlgDag.h.

References lhs_join_cols_, and rhs_join_cols_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1484  {
1485  if (lhs) {
1486  return lhs_join_cols_;
1487  }
1488  return rhs_join_cols_;
1489  }
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1495
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1496

+ Here is the caller graph for this function:

JoinType RelTranslatedJoin::getJoinType ( ) const
inline

Definition at line 1465 of file RelAlgDag.h.

References join_type_.

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

Definition at line 1454 of file RelAlgDag.h.

References lhs_.

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

1454 { return lhs_; }
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1493

+ Here is the caller graph for this function:

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

Definition at line 1461 of file RelAlgDag.h.

References op_type_.

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

Definition at line 1463 of file RelAlgDag.h.

References op_typeinfo_.

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

Definition at line 1460 of file RelAlgDag.h.

References outer_join_cond_.

Referenced by RelRexDagVisitor::visit().

1460 { return outer_join_cond_; }
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1498

+ Here is the caller graph for this function:

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

Definition at line 1462 of file RelAlgDag.h.

References qualifier_.

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

Definition at line 1455 of file RelAlgDag.h.

References rhs_.

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

1455 { return rhs_; }
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1494

+ Here is the caller graph for this function:

bool RelTranslatedJoin::isNestedLoopQual ( ) const
inline

Definition at line 1490 of file RelAlgDag.h.

References nested_loop_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1490 { return nested_loop_; }
const bool nested_loop_
Definition: RelAlgDag.h:1499

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

References CHECK.

1476  {
1477  CHECK(false);
1478  }
#define CHECK(condition)
Definition: Logger.h:222
void RelTranslatedJoin::setCondition ( std::unique_ptr< const RexScalar > &  condition)
inline

Definition at line 1474 of file RelAlgDag.h.

References CHECK.

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

Implements RelAlgNode.

Definition at line 1464 of file RelAlgDag.h.

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

Implements RelAlgNode.

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

1437  {
1438  if (!hash_) {
1439  hash_ = typeid(RelTranslatedJoin).hash_code();
1440  boost::hash_combine(*hash_, lhs_->toHash());
1441  boost::hash_combine(*hash_, rhs_->toHash());
1442  boost::hash_combine(*hash_, outer_join_cond_ ? outer_join_cond_->toHash() : HASH_N);
1443  boost::hash_combine(*hash_, nested_loop_);
1444  boost::hash_combine(*hash_, ::toString(join_type_));
1445  boost::hash_combine(*hash_, op_type_);
1446  boost::hash_combine(*hash_, qualifier_);
1447  boost::hash_combine(*hash_, op_typeinfo_);
1448  for (auto& filter_op : filter_ops_) {
1449  boost::hash_combine(*hash_, filter_op->toString());
1450  }
1451  }
1452  return *hash_;
1453  }
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
Definition: RelAlgDag.h:1414
const bool nested_loop_
Definition: RelAlgDag.h:1499
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1498
const JoinType join_type_
Definition: RelAlgDag.h:1500
const RelAlgNode * rhs_
Definition: RelAlgDag.h:1494
const std::string op_type_
Definition: RelAlgDag.h:1501
const std::string qualifier_
Definition: RelAlgDag.h:1502
static auto const HASH_N
Definition: RelAlgDag.h:44
const RelAlgNode * lhs_
Definition: RelAlgDag.h:1493
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1497
std::optional< size_t > hash_
Definition: RelAlgDag.h:872
const std::string op_typeinfo_
Definition: RelAlgDag.h:1503
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:1391
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 1414 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().

1415  {
1416  return cat(::typeName(this),
1417  "( join_quals { lhs: ",
1419  ", rhs: ",
1421  " }, filter_quals: { ",
1422  ::toString(filter_ops_),
1423  " }, outer_join_cond: { ",
1424  outer_join_cond_->toString(config),
1425  " }, loop_join: ",
1427  ", join_type: ",
1429  ", op_type: ",
1431  ", qualifier: ",
1433  ", op_type_info: ",
1435  ")");
1436  }
virtual std::string toString(RelRexToStringConfig config) const =0
std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
Definition: RelAlgDag.h:1414
std::string cat(Ts &&...args)
const bool nested_loop_
Definition: RelAlgDag.h:1499
const RexScalar * outer_join_cond_
Definition: RelAlgDag.h:1498
const JoinType join_type_
Definition: RelAlgDag.h:1500
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
Definition: RelAlgDag.h:1495
const std::string op_type_
Definition: RelAlgDag.h:1501
const std::string qualifier_
Definition: RelAlgDag.h:1502
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
Definition: RelAlgDag.h:1497
const std::vector< const Analyzer::ColumnVar * > rhs_join_cols_
Definition: RelAlgDag.h:1496
std::string typeName(const T *v)
Definition: toString.h:102
const std::string op_typeinfo_
Definition: RelAlgDag.h:1503

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

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

const JoinType RelTranslatedJoin::join_type_
private

Definition at line 1500 of file RelAlgDag.h.

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

const RelAlgNode* RelTranslatedJoin::lhs_
private

Definition at line 1493 of file RelAlgDag.h.

Referenced by getLHS(), and toHash().

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

Definition at line 1495 of file RelAlgDag.h.

Referenced by getJoinCols(), and toString().

const bool RelTranslatedJoin::nested_loop_
private

Definition at line 1499 of file RelAlgDag.h.

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

const std::string RelTranslatedJoin::op_type_
private

Definition at line 1501 of file RelAlgDag.h.

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

const std::string RelTranslatedJoin::op_typeinfo_
private

Definition at line 1503 of file RelAlgDag.h.

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

const RexScalar* RelTranslatedJoin::outer_join_cond_
private

Definition at line 1498 of file RelAlgDag.h.

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

const std::string RelTranslatedJoin::qualifier_
private

Definition at line 1502 of file RelAlgDag.h.

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

const RelAlgNode* RelTranslatedJoin::rhs_
private

Definition at line 1494 of file RelAlgDag.h.

Referenced by getRHS(), and toHash().

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

Definition at line 1496 of file RelAlgDag.h.

Referenced by getJoinCols(), and toString().


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