OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RelAlgNode Class Referenceabstract

#include <RelAlgAbstractInterpreter.h>

+ Inheritance diagram for RelAlgNode:

Public Member Functions

 RelAlgNode ()
 
virtual ~RelAlgNode ()
 
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
 
virtual void replaceInput (std::shared_ptr< const RelAlgNode > old_input, std::shared_ptr< const RelAlgNode > input)
 
bool isNop () const
 
void markAsNop ()
 
virtual std::string toString () const =0
 
virtual size_t size () const =0
 
virtual std::shared_ptr
< RelAlgNode
deepCopy () const =0
 

Static Public Member Functions

static void resetRelAlgFirstId () noexcept
 

Protected Attributes

std::vector< std::shared_ptr
< const RelAlgNode > > 
inputs_
 
const unsigned id_
 

Private Attributes

const void * context_data_
 
bool is_nop_
 
std::vector< TargetMetaInfotargets_metainfo_
 

Static Private Attributes

static thread_local unsigned crt_id_ = FIRST_RA_NODE_ID
 

Detailed Description

Definition at line 608 of file RelAlgAbstractInterpreter.h.

Constructor & Destructor Documentation

RelAlgNode::RelAlgNode ( )
inline

Definition at line 610 of file RelAlgAbstractInterpreter.h.

610 : id_(crt_id_++), context_data_(nullptr), is_nop_(false) {}
static thread_local unsigned crt_id_
const void * context_data_
virtual RelAlgNode::~RelAlgNode ( )
inlinevirtual

Definition at line 612 of file RelAlgAbstractInterpreter.h.

612 {}

Member Function Documentation

void RelAlgNode::addManagedInput ( std::shared_ptr< const RelAlgNode input)
inline

Definition at line 648 of file RelAlgAbstractInterpreter.h.

References inputs_.

Referenced by RelLeftDeepInnerJoin::RelLeftDeepInnerJoin().

648  {
649  inputs_.push_back(input);
650  }
std::vector< std::shared_ptr< const RelAlgNode > > inputs_

+ Here is the caller graph for this function:

virtual std::shared_ptr<RelAlgNode> RelAlgNode::deepCopy ( ) const
pure virtual
std::shared_ptr<const RelAlgNode> RelAlgNode::getAndOwnInput ( const size_t  idx) const
inline

Definition at line 643 of file RelAlgAbstractInterpreter.h.

References CHECK(), and inputs_.

Referenced by get_left_deep_join_root().

643  {
644  CHECK(idx < inputs_.size());
645  return inputs_[idx];
646  }
std::vector< std::shared_ptr< const RelAlgNode > > inputs_
CHECK(cgen_state)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const void* RelAlgNode::getContextData ( ) const
inline

Definition at line 631 of file RelAlgAbstractInterpreter.h.

References CHECK(), and context_data_.

631  {
633  return context_data_;
634  }
const void * context_data_
CHECK(cgen_state)

+ Here is the call graph for this function:

unsigned RelAlgNode::getId ( ) const
inline

Definition at line 627 of file RelAlgAbstractInterpreter.h.

References id_.

Referenced by RelAlgExecutor::executeSort(), and anonymous_namespace{RelAlgExecutor.cpp}::table_id_from_ra().

627 { return id_; }

+ Here is the caller graph for this function:

const RelAlgNode* RelAlgNode::getInput ( const size_t  idx) const
inline

Definition at line 638 of file RelAlgAbstractInterpreter.h.

References CHECK(), and inputs_.

Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::add_new_indices_for(), RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createModifyCompoundWorkUnit(), RelAlgExecutor::createModifyProjectWorkUnit(), RelAlgExecutor::createProjectWorkUnit(), RelAlgExecutor::createSortInputWorkUnit(), RelAlgExecutor::executeDeleteViaProject(), RelAlgExecutor::executeProject(), RelAlgExecutor::executeSort(), RelAlgExecutor::executeUpdateViaProject(), anonymous_namespace{RelAlgOptimizer.cpp}::get_actual_source_size(), anonymous_namespace{RelAlgExecutor.cpp}::get_data_sink(), anonymous_namespace{RelAlgOptimizer.cpp}::get_field_name(), anonymous_namespace{RelAlgExecutor.cpp}::get_left_deep_join_input_sizes(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgOptimizer.cpp}::get_visible_projects(), anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::hasAllSrcReady(), hoist_filter_cond_to_cross_join(), anonymous_namespace{RelAlgOptimizer.cpp}::is_distinct(), RelProject::isIdentity(), anonymous_namespace{RelAlgAbstractInterpreter.cpp}::isRenamedInput(), anonymous_namespace{RelAlgOptimizer.cpp}::propagate_rex_input_renumber(), anonymous_namespace{RelLeftDeepInnerJoin.cpp}::RebindRexInputsFromLeftDeepJoin::RebindRexInputsFromLeftDeepJoin(), anonymous_namespace{RelAlgExecutor.cpp}::synthesize_inputs(), tree_string(), RelAlgVisitor< std::unordered_set< int > >::visit(), JoinTargetRebaser::visitInput(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitSort().

638  {
639  CHECK(idx < inputs_.size());
640  return inputs_[idx].get();
641  }
std::vector< std::shared_ptr< const RelAlgNode > > inputs_
CHECK(cgen_state)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const std::vector<TargetMetaInfo>& RelAlgNode::getOutputMetainfo ( ) const
inline

Definition at line 623 of file RelAlgAbstractInterpreter.h.

References targets_metainfo_.

Referenced by RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::executeAggregate(), RelAlgExecutor::executeCompound(), RelAlgExecutor::executeFilter(), RelAlgExecutor::executeProject(), RelAlgExecutor::executeUpdateViaCompound(), RelAlgExecutor::executeUpdateViaProject(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), and RelAlgTranslator::translateInput().

623  {
624  return targets_metainfo_;
625  }
std::vector< TargetMetaInfo > targets_metainfo_

+ Here is the caller graph for this function:

bool RelAlgNode::hasContextData ( ) const
inline

Definition at line 629 of file RelAlgAbstractInterpreter.h.

References context_data_.

629 { return !(context_data_ == nullptr); }
const void * context_data_
bool RelAlgNode::hasInput ( const RelAlgNode needle) const
inline

Definition at line 652 of file RelAlgAbstractInterpreter.h.

References inputs_.

652  {
653  for (auto& input_ptr : inputs_) {
654  if (input_ptr.get() == needle) {
655  return true;
656  }
657  }
658  return false;
659  }
std::vector< std::shared_ptr< const RelAlgNode > > inputs_
const size_t RelAlgNode::inputCount ( ) const
inline

Definition at line 636 of file RelAlgAbstractInterpreter.h.

References inputs_.

Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::add_new_indices_for(), RelAlgExecutor::createAggregateWorkUnit(), RelAlgExecutor::createCompoundWorkUnit(), RelAlgExecutor::createFilterWorkUnit(), RelAlgExecutor::createModifyCompoundWorkUnit(), RelAlgExecutor::createTableFunctionWorkUnit(), RelAlgExecutor::executeDeleteViaProject(), RelAlgExecutor::executeProject(), RelAlgExecutor::executeSort(), RelAlgExecutor::executeUpdateViaProject(), anonymous_namespace{RelAlgExecutor.cpp}::get_data_sink(), anonymous_namespace{RelAlgExecutor.cpp}::get_join_source_used_inputs(), anonymous_namespace{RelAlgExecutor.cpp}::get_left_deep_join_input_sizes(), anonymous_namespace{RelAlgExecutor.cpp}::get_used_inputs(), anonymous_namespace{RelAlgOptimizer.cpp}::AvailabilityChecker::hasAllSrcReady(), anonymous_namespace{RelAlgOptimizer.cpp}::is_distinct(), RelProject::isIdentity(), anonymous_namespace{RelAlgExecutor.cpp}::left_deep_join_types(), anonymous_namespace{RelLeftDeepInnerJoin.cpp}::RebindRexInputsFromLeftDeepJoin::RebindRexInputsFromLeftDeepJoin(), anonymous_namespace{RelAlgExecutor.cpp}::synthesize_inputs(), tree_string(), RelAlgVisitor< std::unordered_set< int > >::visit(), anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitLeftDeepInnerJoin(), and anonymous_namespace{QueryPhysicalInputsCollector.cpp}::RelAlgPhysicalInputsVisitor::visitSort().

636 { return inputs_.size(); }
std::vector< std::shared_ptr< const RelAlgNode > > inputs_

+ Here is the caller graph for this function:

bool RelAlgNode::isNop ( ) const
inline

Definition at line 671 of file RelAlgAbstractInterpreter.h.

References is_nop_.

671 { return is_nop_; }
void RelAlgNode::markAsNop ( )
inline

Definition at line 673 of file RelAlgAbstractInterpreter.h.

References is_nop_.

Referenced by anonymous_namespace{RelAlgAbstractInterpreter.cpp}::mark_nops().

673 { is_nop_ = true; }

+ Here is the caller graph for this function:

virtual void RelAlgNode::replaceInput ( std::shared_ptr< const RelAlgNode old_input,
std::shared_ptr< const RelAlgNode input 
)
inlinevirtual

Reimplemented in RelTableFunction, RelCompound, RelFilter, RelJoin, and RelProject.

Definition at line 661 of file RelAlgAbstractInterpreter.h.

References inputs_.

Referenced by RelProject::replaceInput(), RelJoin::replaceInput(), RelFilter::replaceInput(), RelCompound::replaceInput(), RelTableFunction::replaceInput(), simplify_sort(), and anonymous_namespace{RelAlgOptimizer.cpp}::try_insert_coalesceable_proj().

662  {
663  for (auto& input_ptr : inputs_) {
664  if (input_ptr == old_input) {
665  input_ptr = input;
666  break;
667  }
668  }
669  }
std::vector< std::shared_ptr< const RelAlgNode > > inputs_

+ Here is the caller graph for this function:

void RelAlgNode::resetRelAlgFirstId ( )
staticnoexcept

Definition at line 41 of file RelAlgAbstractInterpreter.cpp.

References crt_id_, and anonymous_namespace{RelAlgAbstractInterpreter.cpp}::FIRST_RA_NODE_ID.

Referenced by deserialize_ra_dag().

41  {
43 }
static thread_local unsigned crt_id_

+ Here is the caller graph for this function:

void RelAlgNode::setContextData ( const void *  context_data) const
inline

Definition at line 614 of file RelAlgAbstractInterpreter.h.

References CHECK(), and context_data_.

614  {
616  context_data_ = context_data;
617  }
const void * context_data_
CHECK(cgen_state)

+ Here is the call graph for this function:

void RelAlgNode::setOutputMetainfo ( const std::vector< TargetMetaInfo > &  targets_metainfo) const
inline
virtual std::string RelAlgNode::toString ( ) const
pure virtual

Implemented in RelLogicalValues, RelTableFunction, RelModify, RelSort, RelCompound, RelLeftDeepInnerJoin, RelFilter, RelJoin, RelAggregate, RelProject, and RelScan.

Referenced by anonymous_namespace{RelAlgOptimizer.cpp}::add_new_indices_for(), and tree_string().

+ Here is the caller graph for this function:

Member Data Documentation

const void* RelAlgNode::context_data_
mutableprivate

Definition at line 688 of file RelAlgAbstractInterpreter.h.

Referenced by getContextData(), hasContextData(), and setContextData().

thread_local unsigned RelAlgNode::crt_id_ = FIRST_RA_NODE_ID
staticprivate

Definition at line 691 of file RelAlgAbstractInterpreter.h.

Referenced by resetRelAlgFirstId().

const unsigned RelAlgNode::id_
protected

Definition at line 685 of file RelAlgAbstractInterpreter.h.

Referenced by getId().

bool RelAlgNode::is_nop_
private

Definition at line 689 of file RelAlgAbstractInterpreter.h.

Referenced by isNop(), and markAsNop().

std::vector<TargetMetaInfo> RelAlgNode::targets_metainfo_
mutableprivate

Definition at line 690 of file RelAlgAbstractInterpreter.h.

Referenced by getOutputMetainfo(), and setOutputMetainfo().


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