OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 size_t get_num_column_vars (const 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 (std::function< bool(const Expr *)> f, 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 687 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 1706 of file Analyzer.cpp.

1709  : Expr(kBOOLEAN, not_null), arg(a), value_list(l) {}
Expr(SQLTypes t, bool notnull)
Definition: Analyzer.h:70
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:703
constexpr double a
Definition: Utm.h:32
const std::vector< int64_t > value_list
Definition: Analyzer.h:704

Member Function Documentation

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

Implements Analyzer::Expr.

Definition at line 2910 of file Analyzer.cpp.

References arg, SQLTypeInfo::get_notnull(), Analyzer::Expr::get_type_info(), and value_list.

2910  {
2911  return std::make_shared<InIntegerSet>(arg, value_list, get_type_info().get_notnull());
2912 }
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:703
const SQLTypeInfo & get_type_info() const
Definition: Analyzer.h:79
const std::vector< int64_t > value_list
Definition: Analyzer.h:704
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:398

+ Here is the call graph for this function:

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

Definition at line 693 of file Analyzer.h.

References arg.

Referenced by CodeGenerator::codegen(), DeepCopyVisitor::visitInIntegerSet(), and ScalarExprVisitor< std::set< shared::TableKey > >::visitInIntegerSet().

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

+ Here is the caller graph for this function:

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

Definition at line 695 of file Analyzer.h.

References value_list.

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

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

+ Here is the caller graph for this function:

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

Implements Analyzer::Expr.

Definition at line 2914 of file Analyzer.cpp.

References arg, and value_list.

2914  {
2915  if (!dynamic_cast<const InIntegerSet*>(&rhs)) {
2916  return false;
2917  }
2918  const auto& rhs_in_integer_set = static_cast<const InIntegerSet&>(rhs);
2919  return *arg == *rhs_in_integer_set.arg && value_list == rhs_in_integer_set.value_list;
2920 }
InIntegerSet(const std::shared_ptr< const Analyzer::Expr > a, const std::vector< int64_t > &values, const bool not_null)
Definition: Analyzer.cpp:1706
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:703
const std::vector< int64_t > value_list
Definition: Analyzer.h:704
std::string Analyzer::InIntegerSet::toString ( ) const
overridevirtual

Implements Analyzer::Expr.

Definition at line 2922 of file Analyzer.cpp.

References arg, to_string(), and value_list.

2922  {
2923  std::string str{"(IN_INTEGER_SET "};
2924  str += arg->toString();
2925  str += "( ";
2926  int cnt = 0;
2927  bool shorted_value_list_str = false;
2928  for (const auto e : value_list) {
2929  str += std::to_string(e) + " ";
2930  cnt++;
2931  if (cnt > 4) {
2932  shorted_value_list_str = true;
2933  break;
2934  }
2935  }
2936  if (shorted_value_list_str) {
2937  str += "... | ";
2938  str += "Total # values: ";
2939  str += std::to_string(value_list.size());
2940  }
2941  str += ") ";
2942  return str;
2943 }
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:703
std::string to_string(char const *&&v)
const std::vector< int64_t > value_list
Definition: Analyzer.h:704

+ 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 703 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 704 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: