OmniSciDB  04ee39c94c
RexSubQuery Class Reference

#include <RelAlgAbstractInterpreter.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
 
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 259 of file RelAlgAbstractInterpreter.h.

Constructor & Destructor Documentation

◆ RexSubQuery() [1/4]

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

Definition at line 261 of file RelAlgAbstractInterpreter.h.

262  : type_(new SQLTypeInfo(kNULLT, false))
263  , result_(new std::shared_ptr<const ExecutionResult>(nullptr))
264  , ra_(ra) {}
const std::shared_ptr< const RelAlgNode > ra_
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
std::shared_ptr< SQLTypeInfo > type_
SQLTypeInfoCore< ArrayContextTypeSizer, ExecutorTypePackaging, DateTimeFacilities > SQLTypeInfo
Definition: sqltypes.h:823

◆ 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 267 of file RelAlgAbstractInterpreter.h.

270  : 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 54 of file RelAlgAbstractInterpreter.cpp.

54  {
55  return std::make_unique<RexSubQuery>(type_, result_, ra_->deepCopy());
56 }
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 285 of file RelAlgAbstractInterpreter.h.

References CHECK.

285  {
286  CHECK(result_);
287  CHECK(result_.get());
288  return *(result_.get());
289  }
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
#define CHECK(condition)
Definition: Logger.h:187

◆ getRelAlg()

const RelAlgNode* RexSubQuery::getRelAlg ( ) const
inline

Definition at line 291 of file RelAlgAbstractInterpreter.h.

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

◆ getType()

const SQLTypeInfo& RexSubQuery::getType ( ) const
inline

Definition at line 280 of file RelAlgAbstractInterpreter.h.

References CHECK_NE, and kNULLT.

280  {
281  CHECK_NE(kNULLT, type_->get_type());
282  return *(type_.get());
283  }
#define CHECK_NE(x, y)
Definition: Logger.h:196
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 45 of file RelAlgAbstractInterpreter.cpp.

References CHECK, CHECK_EQ, and run-benchmark-import::result.

46  {
47  auto row_set = result->getRows();
48  CHECK(row_set);
49  CHECK_EQ(size_t(1), row_set->colCount());
50  *(type_.get()) = row_set->getColType(0);
51  (*(result_.get())) = result;
52 }
#define CHECK_EQ(x, y)
Definition: Logger.h:195
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
std::shared_ptr< SQLTypeInfo > type_
#define CHECK(condition)
Definition: Logger.h:187

◆ toString()

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

Implements Rex.

Definition at line 293 of file RelAlgAbstractInterpreter.h.

References run-benchmark-import::result, and to_string().

293  {
294  return "(RexSubQuery " + std::to_string(reinterpret_cast<const uint64_t>(this)) + ")";
295  }
std::string to_string(char const *&&v)
+ Here is the call graph for this function:

Member Data Documentation

◆ ra_

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

Definition at line 304 of file RelAlgAbstractInterpreter.h.

◆ result_

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

Definition at line 303 of file RelAlgAbstractInterpreter.h.

◆ type_

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

Definition at line 302 of file RelAlgAbstractInterpreter.h.


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