OmniSciDB  04ee39c94c
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 ()
 
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::Expradd_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::Exprnormalize_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::Exprrewrite_with_targetlist (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const
 
virtual std::shared_ptr< Analyzer::Exprrewrite_with_child_targetlist (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const
 
virtual std::shared_ptr< Analyzer::Exprrewrite_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::Exprarg
 
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 620 of file Analyzer.h.

Constructor & Destructor Documentation

◆ InIntegerSet()

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

Definition at line 1466 of file Analyzer.cpp.

1469  : 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:636
const std::vector< int64_t > value_list
Definition: Analyzer.h:637

Member Function Documentation

◆ deep_copy()

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

Implements Analyzer::Expr.

Definition at line 2387 of file Analyzer.cpp.

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

Referenced by Analyzer::FunctionOper::deep_copy(), and Analyzer::FunctionOperWithCustomTypeHandling::deep_copy().

2387  {
2388  return std::make_shared<InIntegerSet>(arg, value_list, get_type_info().get_notnull());
2389 }
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:330
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:636
const std::vector< int64_t > value_list
Definition: Analyzer.h:637
const SQLTypeInfo & get_type_info() const
Definition: Analyzer.h:77
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_arg()

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

Definition at line 626 of file Analyzer.h.

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

626 { return arg.get(); }
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:636
+ Here is the caller graph for this function:

◆ get_value_list()

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

Definition at line 628 of file Analyzer.h.

References operator==().

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

628 { return value_list; }
const std::vector< int64_t > value_list
Definition: Analyzer.h:637
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==()

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

Implements Analyzer::Expr.

Definition at line 2391 of file Analyzer.cpp.

References arg, and value_list.

2391  {
2392  if (!dynamic_cast<const InIntegerSet*>(&rhs)) {
2393  return false;
2394  }
2395  const auto& rhs_in_integer_set = static_cast<const InIntegerSet&>(rhs);
2396  return *arg == *rhs_in_integer_set.arg && value_list == rhs_in_integer_set.value_list;
2397 }
InIntegerSet(const std::shared_ptr< const Analyzer::Expr > a, const std::vector< int64_t > &values, const bool not_null)
Definition: Analyzer.cpp:1466
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:636
const std::vector< int64_t > value_list
Definition: Analyzer.h:637

◆ toString()

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

Implements Analyzer::Expr.

Definition at line 2399 of file Analyzer.cpp.

References arg, to_string(), and value_list.

2399  {
2400  std::string str{"(IN_INTEGER_SET "};
2401  str += arg->toString();
2402  str += "( ";
2403  for (const auto e : value_list) {
2404  str += std::to_string(e) + " ";
2405  }
2406  str += ") ";
2407  return str;
2408 }
const std::shared_ptr< const Analyzer::Expr > arg
Definition: Analyzer.h:636
std::string to_string(char const *&&v)
const std::vector< int64_t > value_list
Definition: Analyzer.h:637
+ Here is the call graph for this function:

Member Data Documentation

◆ arg

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

Definition at line 636 of file Analyzer.h.

Referenced by deep_copy(), Analyzer::InValues::find_expr(), Analyzer::CharLengthExpr::find_expr(), Analyzer::KeyForStringExpr::find_expr(), Analyzer::CardinalityExpr::find_expr(), Analyzer::LikeExpr::find_expr(), Analyzer::RegexpExpr::find_expr(), Analyzer::LikelihoodExpr::find_expr(), Analyzer::AggExpr::find_expr(), Analyzer::CharLengthExpr::group_predicates(), Analyzer::KeyForStringExpr::group_predicates(), Analyzer::CardinalityExpr::group_predicates(), Analyzer::LikeExpr::group_predicates(), Analyzer::RegexpExpr::group_predicates(), Analyzer::LikelihoodExpr::group_predicates(), Analyzer::AggExpr::group_predicates(), Analyzer::InValues::operator==(), operator==(), Analyzer::CharLengthExpr::operator==(), Analyzer::KeyForStringExpr::operator==(), Analyzer::CardinalityExpr::operator==(), Analyzer::LikeExpr::operator==(), Analyzer::RegexpExpr::operator==(), Analyzer::LikelihoodExpr::operator==(), Analyzer::AggExpr::operator==(), Analyzer::InValues::rewrite_agg_to_var(), Analyzer::InValues::rewrite_with_child_targetlist(), Analyzer::AggExpr::rewrite_with_child_targetlist(), Analyzer::InValues::rewrite_with_targetlist(), Analyzer::InValues::toString(), toString(), Analyzer::CharLengthExpr::toString(), Analyzer::KeyForStringExpr::toString(), Analyzer::CardinalityExpr::toString(), Analyzer::LikeExpr::toString(), Analyzer::RegexpExpr::toString(), Analyzer::LikelihoodExpr::toString(), Analyzer::AggExpr::toString(), Analyzer::FunctionOper::toString(), and Analyzer::WindowFunction::toString().

◆ value_list


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