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

#include <Analyzer.h>

+ Inheritance diagram for Analyzer::GeoUOper:
+ Collaboration diagram for Analyzer::GeoUOper:

Public Member Functions

 GeoUOper (const Geospatial::GeoBase::GeoOp op, const SQLTypeInfo &ti, const SQLTypeInfo &ti0, 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
 
Geospatial::GeoBase::GeoOp getOp () const
 
const SQLTypeInfo getTypeInfo0 () const
 
const std::vector
< std::shared_ptr
< Analyzer::Expr > > & 
getArgs0 () 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 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 (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 Geospatial::GeoBase::GeoOp op_
 
SQLTypeInfo ti0_
 
const std::vector
< std::shared_ptr
< Analyzer::Expr > > 
args0_
 

Additional Inherited Members

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

Detailed Description

Definition at line 2672 of file Analyzer.h.

Constructor & Destructor Documentation

Analyzer::GeoUOper::GeoUOper ( const Geospatial::GeoBase::GeoOp  op,
const SQLTypeInfo ti,
const SQLTypeInfo ti0,
const std::vector< std::shared_ptr< Analyzer::Expr >> &  args 
)
inline

Definition at line 2674 of file Analyzer.h.

2678  : Expr(ti), op_(op), ti0_(ti0), args0_(args){};
Expr(SQLTypes t, bool notnull)
Definition: Analyzer.h:73
const std::vector< std::shared_ptr< Analyzer::Expr > > args0_
Definition: Analyzer.h:2692
const Geospatial::GeoBase::GeoOp op_
Definition: Analyzer.h:2690
SQLTypeInfo ti0_
Definition: Analyzer.h:2691

Member Function Documentation

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

Implements Analyzer::Expr.

Definition at line 239 of file Analyzer.cpp.

References args0_, Geospatial::GeoBase::kPROJECTION, op_, ti0_, and Analyzer::Expr::type_info.

239  {
241  return makeExpr<GeoUOper>(op_, type_info, type_info, args0_);
242  }
243  return makeExpr<GeoUOper>(op_, type_info, ti0_, args0_);
244 }
const std::vector< std::shared_ptr< Analyzer::Expr > > args0_
Definition: Analyzer.h:2692
SQLTypeInfo type_info
Definition: Analyzer.h:183
const Geospatial::GeoBase::GeoOp op_
Definition: Analyzer.h:2690
SQLTypeInfo ti0_
Definition: Analyzer.h:2691
const std::vector<std::shared_ptr<Analyzer::Expr> >& Analyzer::GeoUOper::getArgs0 ( ) const
inline

Definition at line 2687 of file Analyzer.h.

References args0_.

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

2687 { return args0_; }
const std::vector< std::shared_ptr< Analyzer::Expr > > args0_
Definition: Analyzer.h:2692

+ Here is the caller graph for this function:

Geospatial::GeoBase::GeoOp Analyzer::GeoUOper::getOp ( ) const
inline

Definition at line 2685 of file Analyzer.h.

References op_.

Referenced by CodeGenerator::codegenGeoUOper(), and DeepCopyVisitor::visitGeoUOper().

2685 { return op_; }
const Geospatial::GeoBase::GeoOp op_
Definition: Analyzer.h:2690

+ Here is the caller graph for this function:

const SQLTypeInfo Analyzer::GeoUOper::getTypeInfo0 ( ) const
inline

Definition at line 2686 of file Analyzer.h.

References ti0_.

Referenced by CodeGenerator::codegenGeoUOper(), and DeepCopyVisitor::visitGeoUOper().

2686 { return ti0_; }
SQLTypeInfo ti0_
Definition: Analyzer.h:2691

+ Here is the caller graph for this function:

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

Implements Analyzer::Expr.

Definition at line 2573 of file Analyzer.cpp.

References args0_, expr_list_match(), op_, and ti0_.

2573  {
2574  const auto rhs_geo = dynamic_cast<const GeoUOper*>(&rhs);
2575  if (!rhs_geo) {
2576  return false;
2577  }
2578  if (op_ != rhs_geo->getOp() || ti0_ != rhs_geo->getTypeInfo0() ||
2579  args0_.size() != rhs_geo->getArgs0().size()) {
2580  return false;
2581  }
2582  return expr_list_match(args0_, rhs_geo->getArgs0());
2583 }
GeoUOper(const Geospatial::GeoBase::GeoOp op, const SQLTypeInfo &ti, const SQLTypeInfo &ti0, const std::vector< std::shared_ptr< Analyzer::Expr >> &args)
Definition: Analyzer.h:2674
const std::vector< std::shared_ptr< Analyzer::Expr > > args0_
Definition: Analyzer.h:2692
const Geospatial::GeoBase::GeoOp op_
Definition: Analyzer.h:2690
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:4295
SQLTypeInfo ti0_
Definition: Analyzer.h:2691

+ Here is the call graph for this function:

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

Implements Analyzer::Expr.

Definition at line 3017 of file Analyzer.cpp.

References args0_, Geospatial::GeoBase::kCONCAVEHULL, Geospatial::GeoBase::kCONVEXHULL, Geospatial::GeoBase::kISEMPTY, Geospatial::GeoBase::kISVALID, Geospatial::GeoBase::kPROJECTION, op_, and run_benchmark_import::result.

3017  {
3018  std::string fn;
3019  switch (op_) {
3021  fn = "Geo";
3022  break;
3024  fn = "ST_IsEmpty";
3025  break;
3027  fn = "ST_IsValid";
3028  break;
3030  fn = "ST_IsConcaveHull";
3031  break;
3033  fn = "ST_IsConvexHull";
3034  break;
3035  default:
3036  fn = "Geo_UNKNOWN";
3037  break;
3038  }
3039  std::string result = fn + "(";
3040  for (const auto& arg : args0_) {
3041  result += " " + arg->toString();
3042  }
3043  return result + " ) ";
3044 }
const std::vector< std::shared_ptr< Analyzer::Expr > > args0_
Definition: Analyzer.h:2692
const Geospatial::GeoBase::GeoOp op_
Definition: Analyzer.h:2690

Member Data Documentation

const std::vector<std::shared_ptr<Analyzer::Expr> > Analyzer::GeoUOper::args0_
private

Definition at line 2692 of file Analyzer.h.

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

const Geospatial::GeoBase::GeoOp Analyzer::GeoUOper::op_
private

Definition at line 2690 of file Analyzer.h.

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

SQLTypeInfo Analyzer::GeoUOper::ti0_
private

Definition at line 2691 of file Analyzer.h.

Referenced by deep_copy(), getTypeInfo0(), and operator==().


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