OmniSciDB  29e35f4d58
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::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::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 1467 of file Analyzer.h.

Constructor & Destructor Documentation

◆ GeoExpr()

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

Definition at line 1469 of file Analyzer.h.

References operator==().

1470  : 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:1480
+ Here is the call graph for this function:

Member Function Documentation

◆ deep_copy()

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

Implements Analyzer::Expr.

Definition at line 208 of file Analyzer.cpp.

References 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:1480

◆ getArgs()

const std::vector<std::shared_ptr<Analyzer::Expr> >& Analyzer::GeoExpr::getArgs ( ) const
inline

Definition at line 1477 of file Analyzer.h.

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

1477 { return args_; }
const std::vector< std::shared_ptr< Analyzer::Expr > > args_
Definition: Analyzer.h:1480
+ Here is the caller graph for this function:

◆ operator==()

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

Implements Analyzer::Expr.

Definition at line 2275 of file Analyzer.cpp.

References expr_list_match().

2275  {
2276  const auto rhs_geo = dynamic_cast<const GeoExpr*>(&rhs);
2277  if (!rhs_geo) {
2278  return false;
2279  }
2280  if (args_.size() != rhs_geo->args_.size()) {
2281  return false;
2282  }
2283  return expr_list_match(args_, rhs_geo->args_);
2284 }
GeoExpr(const SQLTypeInfo &ti, const std::vector< std::shared_ptr< Analyzer::Expr >> &args)
Definition: Analyzer.h:1469
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:3051
const std::vector< std::shared_ptr< Analyzer::Expr > > args_
Definition: Analyzer.h:1480
+ Here is the call graph for this function:

◆ toString()

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

Implements Analyzer::Expr.

Definition at line 2616 of file Analyzer.cpp.

References Analyzer::InIntegerSet::arg, and run_benchmark_import::result.

2616  {
2617  // TODO: generate ST_GeomFromText(wkt)
2618  std::string result = "Geo(";
2619  for (const auto& arg : args_) {
2620  result += " " + arg->toString();
2621  }
2622  return result + ") ";
2623 }
const std::vector< std::shared_ptr< Analyzer::Expr > > args_
Definition: Analyzer.h:1480

Member Data Documentation

◆ args_

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

Definition at line 1480 of file Analyzer.h.


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