OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Analyzer::InIntegerSet Class Reference

#include <Analyzer.h>

+ Inheritance diagram for Analyzer::InIntegerSet:
+ Collaboration diagram for Analyzer::InIntegerSet:

Public Member Functions

 InIntegerSet (const std::shared_ptr< const Analyzer::Expr > a, const std::vector< int64_t > &values, const bool not_null)
 
const Exprget_arg () const
 
const std::vector< int64_t > & get_value_list () const
 
std::shared_ptr< Analyzer::Exprdeep_copy () const override
 
bool operator== (const Expr &rhs) const override
 
std::string toString () 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 void collect_rte_idx (std::set< int > &rte_idx_set) const
 
virtual void collect_column_var (std::set< const ColumnVar *, bool(*)(const ColumnVar *, const ColumnVar *)> &colvar_set, bool include_agg) 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

const std::shared_ptr< const
Analyzer::Expr
arg
 
const std::vector< int64_t > value_list
 

Additional Inherited Members

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

Detailed Description

Definition at line 621 of file Analyzer.h.

Constructor & Destructor Documentation

Analyzer::InIntegerSet::InIntegerSet ( const std::shared_ptr< const Analyzer::Expr a,
const std::vector< int64_t > &  values,
const bool  not_null 
)

Definition at line 1474 of file Analyzer.cpp.

1477  : Expr(kBOOLEAN, not_null), arg(a), value_list(l) {}
Expr(SQLTypes t, bool notnull)
Definition: Analyzer.h:69
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:637
const std::vector< int64_t > value_list
Definition: Analyzer.h:638

Member Function Documentation

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

Implements Analyzer::Expr.

Definition at line 2428 of file Analyzer.cpp.

References arg, SQLTypeInfoCore< TYPE_FACET_PACK >::get_notnull(), Analyzer::Expr::get_type_info(), and value_list.

2428  {
2429  return std::make_shared<InIntegerSet>(arg, value_list, get_type_info().get_notnull());
2430 }
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:637
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:333
const SQLTypeInfo & get_type_info() const
Definition: Analyzer.h:78
const std::vector< int64_t > value_list
Definition: Analyzer.h:638

+ Here is the call graph for this function:

const Expr* Analyzer::InIntegerSet::get_arg ( ) const
inline

Definition at line 627 of file Analyzer.h.

References arg.

Referenced by CodeGenerator::codegen(), DeepCopyVisitor::visitInIntegerSet(), and ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitInIntegerSet().

627 { return arg.get(); }
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:637

+ Here is the caller graph for this function:

const std::vector<int64_t>& Analyzer::InIntegerSet::get_value_list ( ) const
inline

Definition at line 629 of file Analyzer.h.

References value_list.

Referenced by CodeGenerator::codegen(), and DeepCopyVisitor::visitInIntegerSet().

629 { return value_list; }
const std::vector< int64_t > value_list
Definition: Analyzer.h:638

+ Here is the caller graph for this function:

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

Implements Analyzer::Expr.

Definition at line 2432 of file Analyzer.cpp.

References arg, and value_list.

2432  {
2433  if (!dynamic_cast<const InIntegerSet*>(&rhs)) {
2434  return false;
2435  }
2436  const auto& rhs_in_integer_set = static_cast<const InIntegerSet&>(rhs);
2437  return *arg == *rhs_in_integer_set.arg && value_list == rhs_in_integer_set.value_list;
2438 }
InIntegerSet(const std::shared_ptr< const Analyzer::Expr > a, const std::vector< int64_t > &values, const bool not_null)
Definition: Analyzer.cpp:1474
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:637
const std::vector< int64_t > value_list
Definition: Analyzer.h:638
std::string Analyzer::InIntegerSet::toString ( ) const
overridevirtual

Implements Analyzer::Expr.

Definition at line 2440 of file Analyzer.cpp.

References arg, to_string(), and value_list.

2440  {
2441  std::string str{"(IN_INTEGER_SET "};
2442  str += arg->toString();
2443  str += "( ";
2444  for (const auto e : value_list) {
2445  str += std::to_string(e) + " ";
2446  }
2447  str += ") ";
2448  return str;
2449 }
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:637
std::string to_string(char const *&&v)
const std::vector< int64_t > value_list
Definition: Analyzer.h:638

+ Here is the call graph for this function:

Member Data Documentation

const std::shared_ptr<const Analyzer::Expr> Analyzer::InIntegerSet::arg
private

Definition at line 637 of file Analyzer.h.

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

const std::vector<int64_t> Analyzer::InIntegerSet::value_list
private

Definition at line 638 of file Analyzer.h.

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


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