OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Analyzer::RangeOper Class Reference

#include <Analyzer.h>

+ Inheritance diagram for Analyzer::RangeOper:
+ Collaboration diagram for Analyzer::RangeOper:

Public Member Functions

 RangeOper (const bool l_inclusive, const bool r_inclusive, std::shared_ptr< Analyzer::Expr > l, std::shared_ptr< Analyzer::Expr > r)
 
const Exprget_left_operand () const
 
const Exprget_right_operand () const
 
std::shared_ptr< Analyzer::Exprdeep_copy () const override
 
bool operator== (const Expr &rhs) const override
 
std::string toString () 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
 
- 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 ()
 
std::shared_ptr< Analyzer::Exprget_shared_ptr ()
 
const SQLTypeInfoget_type_info () const
 
void set_type_info (const SQLTypeInfo &ti)
 
bool get_contains_agg () const
 
void set_contains_agg (bool a)
 
virtual std::shared_ptr
< Analyzer::Expr
add_cast (const SQLTypeInfo &new_type_info)
 
virtual void check_group_by (const std::list< std::shared_ptr< Analyzer::Expr >> &groupby) const
 
virtual std::shared_ptr
< Analyzer::Expr
normalize_simple_predicate (int &rte_idx) const
 
virtual void group_predicates (std::list< const Expr * > &scan_predicates, std::list< const Expr * > &join_predicates, std::list< const Expr * > &const_predicates) const
 
virtual std::shared_ptr
< Analyzer::Expr
rewrite_with_targetlist (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const
 
virtual std::shared_ptr
< Analyzer::Expr
rewrite_with_child_targetlist (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const
 
virtual std::shared_ptr
< Analyzer::Expr
rewrite_agg_to_var (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const
 
virtual void print () const
 
virtual void add_unique (std::list< const Expr * > &expr_list) const
 
virtual void find_expr (bool(*f)(const Expr *), std::list< const Expr * > &expr_list) const
 
std::shared_ptr< Analyzer::Exprdecompress ()
 
virtual void get_domain (DomainSet &domain_set) const
 

Private Attributes

bool left_inclusive_
 
bool right_inclusive_
 
std::shared_ptr< Analyzer::Exprleft_operand_
 
std::shared_ptr< Analyzer::Exprright_operand_
 

Additional Inherited Members

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

Detailed Description

RangeOper

Definition at line 523 of file Analyzer.h.

Constructor & Destructor Documentation

Analyzer::RangeOper::RangeOper ( const bool  l_inclusive,
const bool  r_inclusive,
std::shared_ptr< Analyzer::Expr l,
std::shared_ptr< Analyzer::Expr r 
)
inline

Definition at line 525 of file Analyzer.h.

References CHECK, left_operand_, and right_operand_.

529  : Expr(SQLTypeInfo(kNULLT), /*not_null=*/false)
530  , left_inclusive_(l_inclusive)
531  , right_inclusive_(r_inclusive)
532  , left_operand_(l)
533  , right_operand_(r) {
536  }
Expr(SQLTypes t, bool notnull)
Definition: Analyzer.h:68
std::shared_ptr< Analyzer::Expr > right_operand_
Definition: Analyzer.h:563
#define CHECK(condition)
Definition: Logger.h:209
std::shared_ptr< Analyzer::Expr > left_operand_
Definition: Analyzer.h:562

Member Function Documentation

void Analyzer::RangeOper::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 550 of file Analyzer.h.

References left_operand_, and right_operand_.

553  {
554  left_operand_->collect_column_var(colvar_set, include_agg);
555  right_operand_->collect_column_var(colvar_set, include_agg);
556  }
std::shared_ptr< Analyzer::Expr > right_operand_
Definition: Analyzer.h:563
std::shared_ptr< Analyzer::Expr > left_operand_
Definition: Analyzer.h:562
void Analyzer::RangeOper::collect_rte_idx ( std::set< int > &  rte_idx_set) const
inlineoverridevirtual

Reimplemented from Analyzer::Expr.

Definition at line 545 of file Analyzer.h.

References left_operand_, and right_operand_.

545  {
546  left_operand_->collect_rte_idx(rte_idx_set);
547  right_operand_->collect_rte_idx(rte_idx_set);
548  }
std::shared_ptr< Analyzer::Expr > right_operand_
Definition: Analyzer.h:563
std::shared_ptr< Analyzer::Expr > left_operand_
Definition: Analyzer.h:562
std::shared_ptr< Analyzer::Expr > Analyzer::RangeOper::deep_copy ( ) const
overridevirtual

Implements Analyzer::Expr.

Definition at line 109 of file Analyzer.cpp.

References left_inclusive_, left_operand_, right_inclusive_, and right_operand_.

109  {
110  return makeExpr<RangeOper>(left_inclusive_,
112  left_operand_->deep_copy(),
113  right_operand_->deep_copy());
114 }
std::shared_ptr< Analyzer::Expr > right_operand_
Definition: Analyzer.h:563
std::shared_ptr< Analyzer::Expr > left_operand_
Definition: Analyzer.h:562
const Expr* Analyzer::RangeOper::get_left_operand ( ) const
inline

Definition at line 538 of file Analyzer.h.

References left_operand_.

Referenced by RangeJoinHashTable::getInstance(), and RangeJoinHashTable::isInnerColCompressed().

538 { return left_operand_.get(); }
std::shared_ptr< Analyzer::Expr > left_operand_
Definition: Analyzer.h:562

+ Here is the caller graph for this function:

const Expr* Analyzer::RangeOper::get_right_operand ( ) const
inline

Definition at line 539 of file Analyzer.h.

References right_operand_.

Referenced by RangeJoinHashTable::reifyWithLayout().

539 { return right_operand_.get(); }
std::shared_ptr< Analyzer::Expr > right_operand_
Definition: Analyzer.h:563

+ Here is the caller graph for this function:

bool Analyzer::RangeOper::operator== ( const Expr rhs) const
overridevirtual

Implements Analyzer::Expr.

Definition at line 2214 of file Analyzer.cpp.

References left_inclusive_, left_operand_, right_inclusive_, and right_operand_.

2214  {
2215  if (typeid(rhs) != typeid(RangeOper)) {
2216  return false;
2217  }
2218  const RangeOper& rhs_rg = dynamic_cast<const RangeOper&>(rhs);
2219  return left_inclusive_ == rhs_rg.left_inclusive_ &&
2220  right_inclusive_ == rhs_rg.right_inclusive_ &&
2221  *left_operand_ == *rhs_rg.left_operand_ &&
2222  *right_operand_ == *rhs_rg.right_operand_;
2223 }
RangeOper(const bool l_inclusive, const bool r_inclusive, std::shared_ptr< Analyzer::Expr > l, std::shared_ptr< Analyzer::Expr > r)
Definition: Analyzer.h:525
std::shared_ptr< Analyzer::Expr > right_operand_
Definition: Analyzer.h:563
std::shared_ptr< Analyzer::Expr > left_operand_
Definition: Analyzer.h:562
std::string Analyzer::RangeOper::toString ( ) const
overridevirtual

Implements Analyzer::Expr.

Definition at line 2642 of file Analyzer.cpp.

References left_inclusive_, left_operand_, right_inclusive_, and right_operand_.

Referenced by RangeJoinHashTable::getInstance().

2642  {
2643  const std::string lhs = left_inclusive_ ? "[" : "(";
2644  const std::string rhs = right_inclusive_ ? "]" : ")";
2645  return "(RangeOper " + lhs + " " + left_operand_->toString() + " , " +
2646  right_operand_->toString() + " " + rhs + " )";
2647 }
std::shared_ptr< Analyzer::Expr > right_operand_
Definition: Analyzer.h:563
std::shared_ptr< Analyzer::Expr > left_operand_
Definition: Analyzer.h:562

+ Here is the caller graph for this function:

Member Data Documentation

bool Analyzer::RangeOper::left_inclusive_
private

Definition at line 560 of file Analyzer.h.

Referenced by deep_copy(), operator==(), and toString().

std::shared_ptr<Analyzer::Expr> Analyzer::RangeOper::left_operand_
private
bool Analyzer::RangeOper::right_inclusive_
private

Definition at line 561 of file Analyzer.h.

Referenced by deep_copy(), operator==(), and toString().

std::shared_ptr<Analyzer::Expr> Analyzer::RangeOper::right_operand_
private

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