OmniSciDB  471d68cefb
 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 () 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 void *context_data) const
 
void setOutputMetainfo (const std::vector< TargetMetaInfo > &targets_metainfo) const
 
const std::vector
< TargetMetaInfo > & 
getOutputMetainfo () const
 
unsigned getId () const
 
bool hasContextData () const
 
const void * getContextData () 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 > hash_
 

Detailed Description

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

References CHECK_EQ, lhs_join_cols_, and rhs_join_cols_.

Referenced by toHash().

1320  : lhs_(lhs)
1321  , rhs_(rhs)
1322  , lhs_join_cols_(lhs_join_cols)
1323  , rhs_join_cols_(rhs_join_cols)
1324  , filter_ops_(filter_ops)
1325  , outer_join_cond_(outer_join_cond)
1326  , nested_loop_(nested_loop)
1327  , join_type_(join_type)
1328  , op_type_(op_type)
1329  , qualifier_(qualifier)
1330  , op_typeinfo_(op_typeinfo) {
1331  CHECK_EQ(lhs_join_cols_.size(), rhs_join_cols_.size());
1332  }
#define CHECK_EQ(x, y)
Definition: Logger.h:217
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 1399 of file RelAlgDagBuilder.h.

References CHECK.

1399  {
1400  CHECK(false);
1401  return nullptr;
1402  }
#define CHECK(condition)
Definition: Logger.h:209
const RexScalar* RelTranslatedJoin::getAndReleaseCondition ( ) const
inline

Definition at line 1390 of file RelAlgDagBuilder.h.

References CHECK.

1390  {
1391  CHECK(false);
1392  return nullptr;
1393  }
#define CHECK(condition)
Definition: Logger.h:209
const RexScalar* RelTranslatedJoin::getCondition ( ) const
inline

Definition at line 1386 of file RelAlgDagBuilder.h.

References CHECK.

1386  {
1387  CHECK(false);
1388  return nullptr;
1389  }
#define CHECK(condition)
Definition: Logger.h:209
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 1377 of file RelAlgDagBuilder.h.

References filter_ops_.

1377  {
1378  return filter_ops_;
1379  }
const std::vector< std::shared_ptr< const Analyzer::Expr > > filter_ops_
size_t RelTranslatedJoin::getFilterCondSize ( ) const
inline

Definition at line 1376 of file RelAlgDagBuilder.h.

References filter_ops_.

1376 { 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 1404 of file RelAlgDagBuilder.h.

References lhs_join_cols_, and rhs_join_cols_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1404  {
1405  if (lhs) {
1406  return lhs_join_cols_;
1407  }
1408  return rhs_join_cols_;
1409  }
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 1385 of file RelAlgDagBuilder.h.

References join_type_.

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

Definition at line 1374 of file RelAlgDagBuilder.h.

References lhs_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1374 { return lhs_; }
const RelAlgNode * lhs_

+ Here is the caller graph for this function:

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

Definition at line 1381 of file RelAlgDagBuilder.h.

References op_type_.

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

Definition at line 1383 of file RelAlgDagBuilder.h.

References op_typeinfo_.

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

Definition at line 1380 of file RelAlgDagBuilder.h.

References outer_join_cond_.

1380 { return outer_join_cond_; }
const RexScalar * outer_join_cond_
std::string RelTranslatedJoin::getQualifier ( ) const
inline

Definition at line 1382 of file RelAlgDagBuilder.h.

References qualifier_.

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

Definition at line 1375 of file RelAlgDagBuilder.h.

References rhs_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1375 { return rhs_; }
const RelAlgNode * rhs_

+ Here is the caller graph for this function:

bool RelTranslatedJoin::isNestedLoopQual ( ) const
inline

Definition at line 1410 of file RelAlgDagBuilder.h.

References nested_loop_.

Referenced by QueryPlanDagExtractor::handleTranslatedJoin().

1410 { 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 1395 of file RelAlgDagBuilder.h.

References CHECK.

1396  {
1397  CHECK(false);
1398  }
#define CHECK(condition)
Definition: Logger.h:209
void RelTranslatedJoin::setCondition ( std::unique_ptr< const RexScalar > &  condition)
inline

Definition at line 1394 of file RelAlgDagBuilder.h.

References CHECK.

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

Implements RelAlgNode.

Definition at line 1384 of file RelAlgDagBuilder.h.

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

Implements RelAlgNode.

Definition at line 1356 of file RelAlgDagBuilder.h.

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

1356  {
1357  if (!hash_) {
1358  hash_ = typeid(RelTranslatedJoin).hash_code();
1359  boost::hash_combine(*hash_, lhs_->toHash());
1360  boost::hash_combine(*hash_, rhs_->toHash());
1361  boost::hash_combine(
1362  *hash_, outer_join_cond_ ? outer_join_cond_->toHash() : boost::hash_value("n"));
1363  boost::hash_combine(*hash_, nested_loop_);
1364  boost::hash_combine(*hash_, ::toString(join_type_));
1365  boost::hash_combine(*hash_, op_type_);
1366  boost::hash_combine(*hash_, qualifier_);
1367  boost::hash_combine(*hash_, op_typeinfo_);
1368  for (auto& filter_op : filter_ops_) {
1369  boost::hash_combine(*hash_, filter_op->toString());
1370  }
1371  }
1372  return *hash_;
1373  }
const RexScalar * outer_join_cond_
const JoinType join_type_
std::string toString() const override
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_
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 ( ) const
inlineoverridevirtual

Implements RelAlgNode.

Definition at line 1334 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_, and typeName().

Referenced by toHash().

1334  {
1335  return cat(::typeName(this),
1336  "( join_quals { lhs: ",
1338  ", rhs: ",
1340  " }, filter_quals: { ",
1341  ::toString(filter_ops_),
1342  " }, outer_join_cond: { ",
1344  " }, loop_join: ",
1346  ", join_type: ",
1347  ::toString(join_type_),
1348  ", op_type: ",
1349  ::toString(op_type_),
1350  ", qualifier: ",
1351  ::toString(qualifier_),
1352  ", op_type_info: ",
1354  ")");
1355  }
std::string cat(Ts &&...args)
const RexScalar * outer_join_cond_
const JoinType join_type_
const std::vector< const Analyzer::ColumnVar * > lhs_join_cols_
std::string toString() const override
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:88
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 1417 of file RelAlgDagBuilder.h.

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

const JoinType RelTranslatedJoin::join_type_
private

Definition at line 1420 of file RelAlgDagBuilder.h.

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

const RelAlgNode* RelTranslatedJoin::lhs_
private

Definition at line 1413 of file RelAlgDagBuilder.h.

Referenced by getLHS(), and toHash().

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

Definition at line 1415 of file RelAlgDagBuilder.h.

Referenced by getJoinCols(), RelTranslatedJoin(), and toString().

const bool RelTranslatedJoin::nested_loop_
private

Definition at line 1419 of file RelAlgDagBuilder.h.

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

const std::string RelTranslatedJoin::op_type_
private

Definition at line 1421 of file RelAlgDagBuilder.h.

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

const std::string RelTranslatedJoin::op_typeinfo_
private

Definition at line 1423 of file RelAlgDagBuilder.h.

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

const RexScalar* RelTranslatedJoin::outer_join_cond_
private

Definition at line 1418 of file RelAlgDagBuilder.h.

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

const std::string RelTranslatedJoin::qualifier_
private

Definition at line 1422 of file RelAlgDagBuilder.h.

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

const RelAlgNode* RelTranslatedJoin::rhs_
private

Definition at line 1414 of file RelAlgDagBuilder.h.

Referenced by getRHS(), and toHash().

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

Definition at line 1416 of file RelAlgDagBuilder.h.

Referenced by getJoinCols(), RelTranslatedJoin(), and toString().


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