OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
ExecutionResult
getExecutionResult () 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
RelAlgNode
ra_
 

Detailed Description

Definition at line 272 of file RelAlgDagBuilder.h.

Constructor & Destructor Documentation

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

Definition at line 274 of file RelAlgDagBuilder.h.

275  : type_(new SQLTypeInfo(kNULLT, false))
276  , result_(new std::shared_ptr<const ExecutionResult>(nullptr))
277  , ra_(ra) {}
const std::shared_ptr< const RelAlgNode > ra_
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
std::shared_ptr< SQLTypeInfo > type_
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 280 of file RelAlgDagBuilder.h.

283  : 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::RexSubQuery ( const RexSubQuery )
delete
RexSubQuery::RexSubQuery ( RexSubQuery &&  )
delete

Member Function Documentation

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_
std::shared_ptr<const ExecutionResult> RexSubQuery::getExecutionResult ( ) const
inline

Definition at line 298 of file RelAlgDagBuilder.h.

References CHECK, and result_.

298  {
299  CHECK(result_);
300  CHECK(result_.get());
301  return *(result_.get());
302  }
std::shared_ptr< std::shared_ptr< const ExecutionResult > > result_
#define CHECK(condition)
Definition: Logger.h:197
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_
const RelAlgNode* RexSubQuery::getRelAlg ( ) const
inline

Definition at line 306 of file RelAlgDagBuilder.h.

References ra_.

306 { return ra_.get(); }
const std::shared_ptr< const RelAlgNode > ra_
const SQLTypeInfo& RexSubQuery::getType ( ) const
inline

Definition at line 293 of file RelAlgDagBuilder.h.

References CHECK_NE, kNULLT, and type_.

293  {
294  CHECK_NE(kNULLT, type_->get_type());
295  return *(type_.get());
296  }
#define CHECK_NE(x, y)
Definition: Logger.h:206
std::shared_ptr< SQLTypeInfo > type_
RexSubQuery& RexSubQuery::operator= ( const RexSubQuery )
delete
RexSubQuery& RexSubQuery::operator= ( RexSubQuery &&  )
delete
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
std::string RexSubQuery::toString ( ) const
overridevirtual

Implements Rex.

Definition at line 2682 of file RelAlgDagBuilder.cpp.

References cat(), and toString().

2682  {
2683  return cat(::typeName(this), "(", ::toString(ra_.get()), ")");
2684 }
std::string cat(Ts &&...args)
const std::shared_ptr< const RelAlgNode > ra_
std::string toString() const override

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 317 of file RelAlgDagBuilder.h.

Referenced by getRelAlg().

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

Definition at line 316 of file RelAlgDagBuilder.h.

Referenced by getExecutionResult().

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

Definition at line 315 of file RelAlgDagBuilder.h.

Referenced by getType().


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