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

#include <Analyzer.h>

+ Inheritance diagram for Analyzer::GeoExpr:
+ Collaboration diagram for Analyzer::GeoExpr:

Public Member Functions

 GeoExpr (const SQLTypeInfo &ti, const std::vector< std::shared_ptr< Analyzer::Expr >> &args)
 
std::shared_ptr< Analyzer::Exprdeep_copy () const override
 
bool operator== (const Expr &rhs) const override
 
std::string toString () const override
 
const std::vector
< std::shared_ptr
< Analyzer::Expr > > & 
getArgs () const
 
- 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::vector
< std::shared_ptr
< Analyzer::Expr > > 
args_
 

Additional Inherited Members

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

Detailed Description

Definition at line 1463 of file Analyzer.h.

Constructor & Destructor Documentation

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

Definition at line 1465 of file Analyzer.h.

1466  : Expr(ti), args_(args){};
Expr(SQLTypes t, bool notnull)
Definition: Analyzer.h:69
const std::vector< std::shared_ptr< Analyzer::Expr > > args_
Definition: Analyzer.h:1476

Member Function Documentation

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

Implements Analyzer::Expr.

Definition at line 208 of file Analyzer.cpp.

References args_, and Analyzer::Expr::type_info.

208  {
209  return makeExpr<GeoExpr>(type_info, args_);
210 }
SQLTypeInfo type_info
Definition: Analyzer.h:176
const std::vector< std::shared_ptr< Analyzer::Expr > > args_
Definition: Analyzer.h:1476
const std::vector<std::shared_ptr<Analyzer::Expr> >& Analyzer::GeoExpr::getArgs ( ) const
inline

Definition at line 1473 of file Analyzer.h.

References args_.

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

1473 { return args_; }
const std::vector< std::shared_ptr< Analyzer::Expr > > args_
Definition: Analyzer.h:1476

+ Here is the caller graph for this function:

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

Implements Analyzer::Expr.

Definition at line 2270 of file Analyzer.cpp.

References args_, and expr_list_match().

2270  {
2271  const auto rhs_geo = dynamic_cast<const GeoExpr*>(&rhs);
2272  if (!rhs_geo) {
2273  return false;
2274  }
2275  if (args_.size() != rhs_geo->args_.size()) {
2276  return false;
2277  }
2278  return expr_list_match(args_, rhs_geo->args_);
2279 }
GeoExpr(const SQLTypeInfo &ti, const std::vector< std::shared_ptr< Analyzer::Expr >> &args)
Definition: Analyzer.h:1465
bool expr_list_match(const std::vector< std::shared_ptr< Analyzer::Expr >> &lhs, const std::vector< std::shared_ptr< Analyzer::Expr >> &rhs)
Definition: Analyzer.cpp:3043
const std::vector< std::shared_ptr< Analyzer::Expr > > args_
Definition: Analyzer.h:1476

+ Here is the call graph for this function:

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

Implements Analyzer::Expr.

Definition at line 2608 of file Analyzer.cpp.

References args_, and run_benchmark_import::result.

2608  {
2609  // TODO: generate ST_GeomFromText(wkt)
2610  std::string result = "Geo(";
2611  for (const auto& arg : args_) {
2612  result += " " + arg->toString();
2613  }
2614  return result + ") ";
2615 }
const std::vector< std::shared_ptr< Analyzer::Expr > > args_
Definition: Analyzer.h:1476

Member Data Documentation

const std::vector<std::shared_ptr<Analyzer::Expr> > Analyzer::GeoExpr::args_
private

Definition at line 1476 of file Analyzer.h.

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


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