OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RexSubQuery Class Reference

#include <RelAlgDag.h>

+ Inheritance diagram for RexSubQuery:
+ Collaboration diagram for RexSubQuery:

Public Types

using ExecutionResultShPtr = std::shared_ptr< const ExecutionResult >
 

Public Member Functions

 RexSubQuery ()
 
 RexSubQuery (const std::shared_ptr< const RelAlgNode > ra)
 
 RexSubQuery (std::shared_ptr< SQLTypeInfo > type, std::shared_ptr< ExecutionResultShPtr > result, const std::shared_ptr< const RelAlgNode > ra)
 
 RexSubQuery (const RexSubQuery &)=delete
 
RexSubQueryoperator= (const RexSubQuery &)=delete
 
 RexSubQuery (RexSubQuery &&)=delete
 
RexSubQueryoperator= (RexSubQuery &&)=delete
 
virtual void acceptChildren (Visitor &v) const override
 
virtual void accept (Visitor &v, std::string name) const override
 
const SQLTypeInfogetType () const
 
ExecutionResultShPtr getExecutionResult () const
 
unsigned getId () const
 
const RelAlgNodegetRelAlg () const
 
std::string toString (RelRexToStringConfig config=RelRexToStringConfig::defaults()) const override
 
std::unique_ptr< RexSubQuerydeepCopy () const
 
void setExecutionResult (const ExecutionResultShPtr result)
 
virtual size_t toHash () const override
 
- Public Member Functions inherited from Rex
virtual ~Rex ()
 
virtual size_t getStepNumber () const
 
- Public Member Functions inherited from RelAlgDagNode
 RelAlgDagNode ()
 
virtual void setStepNumber (size_t step) const
 
std::optional< size_t > getIdInPlanTree () const
 
void setIdInPlanTree (size_t id) const
 

Private Attributes

std::shared_ptr< SQLTypeInfotype_
 
std::shared_ptr
< ExecutionResultShPtr
result_
 
std::shared_ptr< const RelAlgNodera_
 

Friends

struct RelAlgDagSerializer
 
std::size_t hash_value (RexSubQuery const &)
 

Additional Inherited Members

- Protected Attributes inherited from Rex
std::optional< size_t > hash_
 
- Protected Attributes inherited from RelAlgDagNode
size_t step_ {0}
 
std::optional< size_t > id_in_plan_tree_
 

Detailed Description

Definition at line 963 of file RelAlgDag.h.

Member Typedef Documentation

using RexSubQuery::ExecutionResultShPtr = std::shared_ptr<const ExecutionResult>

Definition at line 965 of file RelAlgDag.h.

Constructor & Destructor Documentation

RexSubQuery::RexSubQuery ( )
inline

Definition at line 969 of file RelAlgDag.h.

969 : result_(new ExecutionResultShPtr(nullptr)) {}
std::shared_ptr< ExecutionResultShPtr > result_
Definition: RelAlgDag.h:1029
std::shared_ptr< const ExecutionResult > ExecutionResultShPtr
Definition: RelAlgDag.h:965
RexSubQuery::RexSubQuery ( const std::shared_ptr< const RelAlgNode ra)
inline

Definition at line 971 of file RelAlgDag.h.

972  : type_(new SQLTypeInfo(kNULLT, false))
973  , result_(new ExecutionResultShPtr(nullptr))
974  , ra_(ra) {}
std::shared_ptr< SQLTypeInfo > type_
Definition: RelAlgDag.h:1028
std::shared_ptr< ExecutionResultShPtr > result_
Definition: RelAlgDag.h:1029
std::shared_ptr< const RelAlgNode > ra_
Definition: RelAlgDag.h:1030
std::shared_ptr< const ExecutionResult > ExecutionResultShPtr
Definition: RelAlgDag.h:965
RexSubQuery::RexSubQuery ( std::shared_ptr< SQLTypeInfo type,
std::shared_ptr< ExecutionResultShPtr result,
const std::shared_ptr< const RelAlgNode ra 
)
inline

Definition at line 977 of file RelAlgDag.h.

980  : type_(type), result_(result), ra_(ra) {}
std::shared_ptr< SQLTypeInfo > type_
Definition: RelAlgDag.h:1028
std::shared_ptr< ExecutionResultShPtr > result_
Definition: RelAlgDag.h:1029
std::shared_ptr< const RelAlgNode > ra_
Definition: RelAlgDag.h:1030
RexSubQuery::RexSubQuery ( const RexSubQuery )
delete
RexSubQuery::RexSubQuery ( RexSubQuery &&  )
delete

Member Function Documentation

virtual void RexSubQuery::accept ( Visitor v,
std::string  name 
) const
inlineoverridevirtual

Implements RelAlgDagNode.

Definition at line 995 of file RelAlgDag.h.

References RelAlgDagNode::acceptChildren(), and RelAlgDagNode::Visitor::visit().

Referenced by TableFunctionsFactory_node.PrintNode::__str__().

995  {
996  if (v.visit(this, std::move(name))) {
997  acceptChildren(v);
998  }
999  }
virtual void acceptChildren(Visitor &v) const override
Definition: RelAlgDag.h:990
string name
Definition: setup.in.py:72

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void RexSubQuery::acceptChildren ( Visitor v) const
inlineoverridevirtual

Implements RelAlgDagNode.

Definition at line 990 of file RelAlgDag.h.

References RelAlgDagNode::accept(), and getRelAlg().

990  {
991  if (getRelAlg()) {
992  getRelAlg()->accept(v, "node");
993  }
994  }
const RelAlgNode * getRelAlg() const
Definition: RelAlgDag.h:1014
virtual void accept(Visitor &v, std::string name) const =0

+ Here is the call graph for this function:

std::unique_ptr< RexSubQuery > RexSubQuery::deepCopy ( ) const

Definition at line 60 of file RelAlgDag.cpp.

60  {
61  return std::make_unique<RexSubQuery>(type_, result_, ra_->deepCopy());
62 }
std::shared_ptr< SQLTypeInfo > type_
Definition: RelAlgDag.h:1028
std::shared_ptr< ExecutionResultShPtr > result_
Definition: RelAlgDag.h:1029
std::shared_ptr< const RelAlgNode > ra_
Definition: RelAlgDag.h:1030
ExecutionResultShPtr RexSubQuery::getExecutionResult ( ) const
inline

Definition at line 1006 of file RelAlgDag.h.

References CHECK, and result_.

1006  {
1007  CHECK(result_);
1008  CHECK(result_.get());
1009  return *(result_.get());
1010  }
std::shared_ptr< ExecutionResultShPtr > result_
Definition: RelAlgDag.h:1029
#define CHECK(condition)
Definition: Logger.h:291
unsigned RexSubQuery::getId ( ) const

Definition at line 64 of file RelAlgDag.cpp.

64  {
65  return ra_->getId();
66 }
std::shared_ptr< const RelAlgNode > ra_
Definition: RelAlgDag.h:1030
const RelAlgNode* RexSubQuery::getRelAlg ( ) const
inline

Definition at line 1014 of file RelAlgDag.h.

References ra_.

Referenced by acceptChildren().

1014 { return ra_.get(); }
std::shared_ptr< const RelAlgNode > ra_
Definition: RelAlgDag.h:1030

+ Here is the caller graph for this function:

const SQLTypeInfo& RexSubQuery::getType ( ) const
inline

Definition at line 1001 of file RelAlgDag.h.

References CHECK_NE, kNULLT, and type_.

1001  {
1002  CHECK_NE(kNULLT, type_->get_type());
1003  return *(type_.get());
1004  }
#define CHECK_NE(x, y)
Definition: Logger.h:302
std::shared_ptr< SQLTypeInfo > type_
Definition: RelAlgDag.h:1028
RexSubQuery& RexSubQuery::operator= ( const RexSubQuery )
delete
RexSubQuery& RexSubQuery::operator= ( RexSubQuery &&  )
delete
void RexSubQuery::setExecutionResult ( const ExecutionResultShPtr  result)

Definition at line 51 of file RelAlgDag.cpp.

References CHECK, CHECK_EQ, and run_benchmark_import::result.

52  {
53  auto row_set = result->getRows();
54  CHECK(row_set);
55  CHECK_EQ(size_t(1), row_set->colCount());
56  *(type_.get()) = row_set->getColType(0);
57  (*(result_.get())) = result;
58 }
#define CHECK_EQ(x, y)
Definition: Logger.h:301
std::shared_ptr< SQLTypeInfo > type_
Definition: RelAlgDag.h:1028
std::shared_ptr< ExecutionResultShPtr > result_
Definition: RelAlgDag.h:1029
#define CHECK(condition)
Definition: Logger.h:291
virtual size_t RexSubQuery::toHash ( ) const
inlineoverridevirtual

Implements Rex.

Definition at line 1023 of file RelAlgDag.h.

References hash_value().

1023 { return hash_value(*this); }
friend std::size_t hash_value(RexSubQuery const &)
Definition: RelAlgDag.cpp:3649

+ Here is the call graph for this function:

std::string RexSubQuery::toString ( RelRexToStringConfig  config = RelRexToStringConfig::defaults()) const
overridevirtual

Implements RelAlgDagNode.

Definition at line 3465 of file RelAlgDag.cpp.

References RelRexToStringConfig::attributes_only, cat(), and typeName().

3465  {
3466  if (!config.attributes_only) {
3467  return cat(::typeName(this), "(", ra_->toString(config), ")");
3468  } else {
3469  return cat(::typeName(this), "()");
3470  }
3471 }
std::string cat(Ts &&...args)
std::shared_ptr< const RelAlgNode > ra_
Definition: RelAlgDag.h:1030
std::string typeName(const T *v)
Definition: toString.h:106

+ Here is the call graph for this function:

Friends And Related Function Documentation

std::size_t hash_value ( RexSubQuery const &  rex_subq)
friend

Definition at line 3649 of file RelAlgDag.cpp.

3649  {
3650  if (rex_subq.hash_) {
3651  return *rex_subq.hash_;
3652  }
3653  rex_subq.hash_ = typeid(RexSubQuery).hash_code();
3654  boost::hash_combine(*rex_subq.hash_, rex_subq.ra_);
3655  return *rex_subq.hash_;
3656 }
friend struct RelAlgDagSerializer
friend

Definition at line 1032 of file RelAlgDag.h.

Member Data Documentation

std::shared_ptr<const RelAlgNode> RexSubQuery::ra_
private

Definition at line 1030 of file RelAlgDag.h.

Referenced by getRelAlg().

std::shared_ptr<ExecutionResultShPtr> RexSubQuery::result_
private

Definition at line 1029 of file RelAlgDag.h.

Referenced by getExecutionResult().

std::shared_ptr<SQLTypeInfo> RexSubQuery::type_
private

Definition at line 1028 of file RelAlgDag.h.

Referenced by getType().


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