OmniSciDB  c07336695a
Analyzer::Subquery Class Reference

#include <Analyzer.h>

+ Inheritance diagram for Analyzer::Subquery:
+ Collaboration diagram for Analyzer::Subquery:

Public Member Functions

 Subquery (const SQLTypeInfo &ti, Query *q)
 
 ~Subquery () override
 
const Queryget_parsetree () const
 
std::shared_ptr< Analyzer::Expradd_cast (const SQLTypeInfo &new_type_info) override
 
std::shared_ptr< Analyzer::Exprdeep_copy () const override
 
void group_predicates (std::list< const Expr *> &scan_predicates, std::list< const Expr *> &join_predicates, std::list< const Expr *> &const_predicates) const override
 
void collect_rte_idx (std::set< int > &rte_idx_set) const override
 
void collect_column_var (std::set< const ColumnVar *, bool(*)(const ColumnVar *, const ColumnVar *)> &colvar_set, bool include_agg) const override
 
std::shared_ptr< Analyzer::Exprrewrite_with_targetlist (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const override
 
std::shared_ptr< Analyzer::Exprrewrite_with_child_targetlist (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const override
 
std::shared_ptr< Analyzer::Exprrewrite_agg_to_var (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const override
 
bool operator== (const Expr &rhs) const override
 
std::string toString () const override
 
void find_expr (bool(*f)(const Expr *), std::list< const Expr *> &expr_list) const override
 
- Public Member Functions inherited from Analyzer::Expr
 Expr (SQLTypes t, bool notnull)
 
 Expr (SQLTypes t, int d, bool notnull)
 
 Expr (SQLTypes t, int d, int s, bool notnull)
 
 Expr (const SQLTypeInfo &ti, bool has_agg=false)
 
virtual ~Expr ()
 
const SQLTypeInfoget_type_info () const
 
void set_type_info (const SQLTypeInfo &ti)
 
bool get_contains_agg () const
 
void set_contains_agg (bool a)
 
virtual void check_group_by (const std::list< std::shared_ptr< Analyzer::Expr >> &groupby) const
 
virtual std::shared_ptr< Analyzer::Exprnormalize_simple_predicate (int &rte_idx) const
 
virtual void print () const
 
virtual void add_unique (std::list< const Expr *> &expr_list) const
 
std::shared_ptr< Analyzer::Exprdecompress ()
 
virtual void get_domain (DomainSet &domain_set) const
 

Private Attributes

Queryparsetree
 

Additional Inherited Members

- Protected Attributes inherited from Analyzer::Expr
SQLTypeInfo type_info
 
bool contains_agg
 

Detailed Description

Definition at line 520 of file Analyzer.h.

Constructor & Destructor Documentation

◆ Subquery()

Analyzer::Subquery::Subquery ( const SQLTypeInfo ti,
Query q 
)
inline

Definition at line 522 of file Analyzer.h.

523  : Expr(ti), parsetree(q) /*, plan(nullptr)*/ {}
Query * parsetree
Definition: Analyzer.h:565
Expr(SQLTypes t, bool notnull)
Definition: Analyzer.h:69

◆ ~Subquery()

Analyzer::Subquery::~Subquery ( )
override

Definition at line 47 of file Analyzer.cpp.

47  {
48  delete parsetree;
49 }
Query * parsetree
Definition: Analyzer.h:565

Member Function Documentation

◆ add_cast()

std::shared_ptr< Analyzer::Expr > Analyzer::Subquery::add_cast ( const SQLTypeInfo new_type_info)
overridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 1249 of file Analyzer.cpp.

References CHECK.

1249  {
1250  // not supported yet.
1251  CHECK(false);
1252  return nullptr;
1253 }
#define CHECK(condition)
Definition: Logger.h:187

◆ collect_column_var()

void Analyzer::Subquery::collect_column_var ( std::set< const ColumnVar *, bool(*)(const ColumnVar *, const ColumnVar *)> &  colvar_set,
bool  include_agg 
) const
inlineoverridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 536 of file Analyzer.h.

References CHECK.

539  {
540  CHECK(false);
541  }
#define CHECK(condition)
Definition: Logger.h:187

◆ collect_rte_idx()

void Analyzer::Subquery::collect_rte_idx ( std::set< int > &  rte_idx_set) const
inlineoverridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 535 of file Analyzer.h.

References CHECK.

535 { CHECK(false); }
#define CHECK(condition)
Definition: Logger.h:187

◆ deep_copy()

std::shared_ptr< Analyzer::Expr > Analyzer::Subquery::deep_copy ( ) const
overridevirtual

Implements Analyzer::Expr.

Definition at line 108 of file Analyzer.cpp.

References CHECK.

108  {
109  // not supported yet.
110  CHECK(false);
111  return nullptr;
112 }
#define CHECK(condition)
Definition: Logger.h:187

◆ find_expr()

void Analyzer::Subquery::find_expr ( bool(*)(const Expr *)  f,
std::list< const Expr *> &  expr_list 
) const
inlineoverridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 559 of file Analyzer.h.

References CHECK.

560  {
561  CHECK(false);
562  }
#define CHECK(condition)
Definition: Logger.h:187

◆ get_parsetree()

const Query* Analyzer::Subquery::get_parsetree ( ) const
inline

Definition at line 525 of file Analyzer.h.

525 { return parsetree; }
Query * parsetree
Definition: Analyzer.h:565

◆ group_predicates()

void Analyzer::Subquery::group_predicates ( std::list< const Expr *> &  scan_predicates,
std::list< const Expr *> &  join_predicates,
std::list< const Expr *> &  const_predicates 
) const
inlineoverridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 530 of file Analyzer.h.

References CHECK.

532  {
533  CHECK(false);
534  }
#define CHECK(condition)
Definition: Logger.h:187

◆ operator==()

bool Analyzer::Subquery::operator== ( const Expr rhs) const
inlineoverridevirtual

Implements Analyzer::Expr.

Definition at line 554 of file Analyzer.h.

References CHECK.

554  {
555  CHECK(false);
556  return false;
557  }
#define CHECK(condition)
Definition: Logger.h:187

◆ rewrite_agg_to_var()

std::shared_ptr<Analyzer::Expr> Analyzer::Subquery::rewrite_agg_to_var ( const std::vector< std::shared_ptr< TargetEntry >> &  tlist) const
inlineoverridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 550 of file Analyzer.h.

551  {
552  abort();
553  }

◆ rewrite_with_child_targetlist()

std::shared_ptr<Analyzer::Expr> Analyzer::Subquery::rewrite_with_child_targetlist ( const std::vector< std::shared_ptr< TargetEntry >> &  tlist) const
inlineoverridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 546 of file Analyzer.h.

547  {
548  abort();
549  }

◆ rewrite_with_targetlist()

std::shared_ptr<Analyzer::Expr> Analyzer::Subquery::rewrite_with_targetlist ( const std::vector< std::shared_ptr< TargetEntry >> &  tlist) const
inlineoverridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 542 of file Analyzer.h.

543  {
544  abort();
545  }

◆ toString()

std::string Analyzer::Subquery::toString ( ) const
overridevirtual

Implements Analyzer::Expr.

Definition at line 2372 of file Analyzer.cpp.

2372  {
2373  return "(Subquery ) ";
2374 }

Member Data Documentation

◆ parsetree

Query* Analyzer::Subquery::parsetree
private

Definition at line 565 of file Analyzer.h.


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