OmniSciDB  8a228a1076
RexSubQuery Class Reference

#include <RelAlgDagBuilder.h>

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

Public Member Functions

 RexSubQuery (const std::shared_ptr< const RelAlgNode > ra)
 
 RexSubQuery (std::shared_ptr< SQLTypeInfo > type, std::shared_ptr< std::shared_ptr< const ExecutionResult >> result, const std::shared_ptr< const RelAlgNode > ra)
 
 RexSubQuery (const RexSubQuery &)=delete
 
RexSubQueryoperator= (const RexSubQuery &)=delete
 
 RexSubQuery (RexSubQuery &&)=delete
 
RexSubQueryoperator= (RexSubQuery &&)=delete
 
const SQLTypeInfogetType () const
 
std::shared_ptr< const ExecutionResultgetExecutionResult () const
 
unsigned getId () const
 
const RelAlgNodegetRelAlg () const
 
std::string toString () const override
 
std::unique_ptr< RexSubQuerydeepCopy () const
 
void setExecutionResult (const std::shared_ptr< const ExecutionResult > result)
 
- Public Member Functions inherited from Rex
virtual ~Rex ()
 

Private Attributes

std::shared_ptr< SQLTypeInfotype_
 
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
 
const std::shared_ptr< const RelAlgNodera_
 

Detailed Description

Definition at line 263 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

◆ RexSubQuery() [1/4]

RexSubQuery::RexSubQuery ( const std::shared_ptr< const RelAlgNode ra)
inline

Definition at line 265 of file RelAlgDagBuilder.h.

Referenced by RelAlgTranslator::translateInOper(), and RelAlgTranslator::translateScalarRex().

266  : type_(new SQLTypeInfo(kNULLT, false))
267  , result_(new std::shared_ptr<const ExecutionResult>(nullptr))
268  , ra_(ra) {}
const std::shared_ptr< const RelAlgNode > ra_
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
std::shared_ptr< SQLTypeInfo > type_
+ Here is the caller graph for this function:

◆ RexSubQuery() [2/4]

RexSubQuery::RexSubQuery ( std::shared_ptr< SQLTypeInfo type,
std::shared_ptr< std::shared_ptr< const ExecutionResult >>  result,
const std::shared_ptr< const RelAlgNode ra 
)
inline

Definition at line 271 of file RelAlgDagBuilder.h.

274  : type_(type), result_(result), ra_(ra) {}
const std::shared_ptr< const RelAlgNode > ra_
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
std::shared_ptr< SQLTypeInfo > type_

◆ RexSubQuery() [3/4]

RexSubQuery::RexSubQuery ( const RexSubQuery )
delete

◆ RexSubQuery() [4/4]

RexSubQuery::RexSubQuery ( RexSubQuery &&  )
delete

Member Function Documentation

◆ deepCopy()

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

Definition at line 60 of file RelAlgDagBuilder.cpp.

60  {
61  return std::make_unique<RexSubQuery>(type_, result_, ra_->deepCopy());
62 }
const std::shared_ptr< const RelAlgNode > ra_
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
std::shared_ptr< SQLTypeInfo > type_

◆ getExecutionResult()

std::shared_ptr<const ExecutionResult> RexSubQuery::getExecutionResult ( ) const
inline

Definition at line 289 of file RelAlgDagBuilder.h.

References CHECK.

289  {
290  CHECK(result_);
291  CHECK(result_.get());
292  return *(result_.get());
293  }
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
#define CHECK(condition)
Definition: Logger.h:197

◆ getId()

unsigned RexSubQuery::getId ( ) const

Definition at line 64 of file RelAlgDagBuilder.cpp.

64  {
65  return ra_->getId();
66 }
const std::shared_ptr< const RelAlgNode > ra_

◆ getRelAlg()

const RelAlgNode* RexSubQuery::getRelAlg ( ) const
inline

Definition at line 297 of file RelAlgDagBuilder.h.

297 { return ra_.get(); }
const std::shared_ptr< const RelAlgNode > ra_

◆ getType()

const SQLTypeInfo& RexSubQuery::getType ( ) const
inline

Definition at line 284 of file RelAlgDagBuilder.h.

References CHECK_NE, and kNULLT.

284  {
285  CHECK_NE(kNULLT, type_->get_type());
286  return *(type_.get());
287  }
#define CHECK_NE(x, y)
Definition: Logger.h:206
std::shared_ptr< SQLTypeInfo > type_

◆ operator=() [1/2]

RexSubQuery& RexSubQuery::operator= ( const RexSubQuery )
delete

◆ operator=() [2/2]

RexSubQuery& RexSubQuery::operator= ( RexSubQuery &&  )
delete

◆ setExecutionResult()

void RexSubQuery::setExecutionResult ( const std::shared_ptr< const ExecutionResult result)

Definition at line 51 of file RelAlgDagBuilder.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:205
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
std::shared_ptr< SQLTypeInfo > type_
#define CHECK(condition)
Definition: Logger.h:197

◆ toString()

std::string RexSubQuery::toString ( ) const
inlineoverridevirtual

Implements Rex.

Definition at line 299 of file RelAlgDagBuilder.h.

References run_benchmark_import::result, and to_string().

299  {
300  return "(RexSubQuery " + std::to_string(reinterpret_cast<const uint64_t>(this)) +
301  " id(" + std::to_string(getId()) + "))";
302  }
std::string to_string(char const *&&v)
unsigned getId() const
+ Here is the call graph for this function:

Member Data Documentation

◆ ra_

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

Definition at line 311 of file RelAlgDagBuilder.h.

◆ result_

std::shared_ptr<std::shared_ptr<const ExecutionResult> > RexSubQuery::result_
private

Definition at line 310 of file RelAlgDagBuilder.h.

◆ type_

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

Definition at line 309 of file RelAlgDagBuilder.h.


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