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

#include <Analyzer.h>

+ Inheritance diagram for Analyzer::FunctionOperWithCustomTypeHandling:
+ Collaboration diagram for Analyzer::FunctionOperWithCustomTypeHandling:

Public Member Functions

 FunctionOperWithCustomTypeHandling (const SQLTypeInfo &ti, const std::string &name, const std::vector< std::shared_ptr< Analyzer::Expr >> &args)
 
std::shared_ptr< Analyzer::Exprdeep_copy () const override
 
bool operator== (const Expr &rhs) const override
 
- Public Member Functions inherited from Analyzer::FunctionOper
 FunctionOper (const SQLTypeInfo &ti, const std::string &name, const std::vector< std::shared_ptr< Analyzer::Expr >> &args)
 
std::string getName () const
 
size_t getArity () const
 
const Analyzer::ExprgetArg (const size_t i) const
 
std::shared_ptr< Analyzer::ExprgetOwnArg (const size_t i) const
 
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
 
void find_expr (std::function< bool(const Expr *)> f, std::list< const Expr * > &expr_list) 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 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
 
std::shared_ptr< Analyzer::Exprdecompress ()
 
virtual void get_domain (DomainSet &domain_set) const
 

Additional Inherited Members

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

Detailed Description

Definition at line 2775 of file Analyzer.h.

Constructor & Destructor Documentation

Analyzer::FunctionOperWithCustomTypeHandling::FunctionOperWithCustomTypeHandling ( const SQLTypeInfo ti,
const std::string &  name,
const std::vector< std::shared_ptr< Analyzer::Expr >> &  args 
)
inline

Definition at line 2777 of file Analyzer.h.

2781  : FunctionOper(ti, name, args) {}
string name
Definition: setup.in.py:72
FunctionOper(const SQLTypeInfo &ti, const std::string &name, const std::vector< std::shared_ptr< Analyzer::Expr >> &args)
Definition: Analyzer.h:2739

Member Function Documentation

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

Reimplemented from Analyzer::FunctionOper.

Definition at line 3904 of file Analyzer.cpp.

References Analyzer::FunctionOper::getArg(), Analyzer::FunctionOper::getArity(), Analyzer::FunctionOper::getName(), and Analyzer::Expr::type_info.

3904  {
3905  std::vector<std::shared_ptr<Analyzer::Expr>> args_copy;
3906  for (size_t i = 0; i < getArity(); ++i) {
3907  args_copy.push_back(getArg(i)->deep_copy());
3908  }
3909  return makeExpr<Analyzer::FunctionOperWithCustomTypeHandling>(
3910  type_info, getName(), args_copy);
3911 }
std::shared_ptr< Analyzer::Expr > deep_copy() const override
Definition: Analyzer.cpp:3904
size_t getArity() const
Definition: Analyzer.h:2746
SQLTypeInfo type_info
Definition: Analyzer.h:180
const Analyzer::Expr * getArg(const size_t i) const
Definition: Analyzer.h:2748
std::string getName() const
Definition: Analyzer.h:2744

+ Here is the call graph for this function:

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

Reimplemented from Analyzer::FunctionOper.

Definition at line 3913 of file Analyzer.cpp.

References Analyzer::Expr::get_type_info(), Analyzer::FunctionOper::getArg(), Analyzer::FunctionOper::getArity(), Analyzer::FunctionOper::getName(), and Analyzer::Expr::type_info.

3913  {
3914  if (type_info != rhs.get_type_info()) {
3915  return false;
3916  }
3917  const auto rhs_func_oper =
3918  dynamic_cast<const FunctionOperWithCustomTypeHandling*>(&rhs);
3919  if (!rhs_func_oper) {
3920  return false;
3921  }
3922  if (getName() != rhs_func_oper->getName()) {
3923  return false;
3924  }
3925  if (getArity() != rhs_func_oper->getArity()) {
3926  return false;
3927  }
3928  for (size_t i = 0; i < getArity(); ++i) {
3929  if (!(*getArg(i) == *(rhs_func_oper->getArg(i)))) {
3930  return false;
3931  }
3932  }
3933  return true;
3934 }
size_t getArity() const
Definition: Analyzer.h:2746
SQLTypeInfo type_info
Definition: Analyzer.h:180
FunctionOperWithCustomTypeHandling(const SQLTypeInfo &ti, const std::string &name, const std::vector< std::shared_ptr< Analyzer::Expr >> &args)
Definition: Analyzer.h:2777
const Analyzer::Expr * getArg(const size_t i) const
Definition: Analyzer.h:2748
std::string getName() const
Definition: Analyzer.h:2744

+ Here is the call graph for this function:


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