OmniSciDB  a667adc9c8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor Class Reference
+ Inheritance diagram for anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor:
+ Collaboration diagram for anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor:

Protected Member Functions

std::set< int > visitColumnVar (const Analyzer::ColumnVar *col_expr) const final
 
std::set< int > visitFunctionOper (const Analyzer::FunctionOper *func_expr) const final
 
std::set< int > visitBinOper (const Analyzer::BinOper *bin_oper) const final
 
std::set< int > visitUOper (const Analyzer::UOper *u_oper) const final
 
std::set< int > aggregateResult (const std::set< int > &aggregate, const std::set< int > &next_result) const final
 
- Protected Member Functions inherited from ScalarExprVisitor< std::set< int > >
virtual std::set< int > visitVar (const Analyzer::Var *) const
 
virtual std::set< int > visitColumnVarTuple (const Analyzer::ExpressionTuple *) const
 
virtual std::set< int > visitConstant (const Analyzer::Constant *) const
 
virtual std::set< int > visitInValues (const Analyzer::InValues *in_values) const
 
virtual std::set< int > visitInIntegerSet (const Analyzer::InIntegerSet *in_integer_set) const
 
virtual std::set< int > visitCharLength (const Analyzer::CharLengthExpr *char_length) const
 
virtual std::set< int > visitKeyForString (const Analyzer::KeyForStringExpr *key_for_string) const
 
virtual std::set< int > visitSampleRatio (const Analyzer::SampleRatioExpr *sample_ratio) const
 
virtual std::set< int > visitLower (const Analyzer::LowerExpr *lower_expr) const
 
virtual std::set< int > visitCardinality (const Analyzer::CardinalityExpr *cardinality) const
 
virtual std::set< int > visitLikeExpr (const Analyzer::LikeExpr *like) const
 
virtual std::set< int > visitRegexpExpr (const Analyzer::RegexpExpr *regexp) const
 
virtual std::set< int > visitCaseExpr (const Analyzer::CaseExpr *case_) const
 
virtual std::set< int > visitDatetruncExpr (const Analyzer::DatetruncExpr *datetrunc) const
 
virtual std::set< int > visitExtractExpr (const Analyzer::ExtractExpr *extract) const
 
virtual std::set< int > visitFunctionOperWithCustomTypeHandling (const Analyzer::FunctionOperWithCustomTypeHandling *func_oper) const
 
virtual std::set< int > visitArrayOper (Analyzer::ArrayExpr const *array_expr) const
 
virtual std::set< int > visitGeoUOper (const Analyzer::GeoUOper *geo_expr) const
 
virtual std::set< int > visitGeoBinOper (const Analyzer::GeoBinOper *geo_expr) const
 
virtual std::set< int > visitWindowFunction (const Analyzer::WindowFunction *window_func) const
 
virtual std::set< int > visitDatediffExpr (const Analyzer::DatediffExpr *datediff) const
 
virtual std::set< int > visitDateaddExpr (const Analyzer::DateaddExpr *dateadd) const
 
virtual std::set< int > visitLikelihood (const Analyzer::LikelihoodExpr *likelihood) const
 
virtual std::set< int > visitOffsetInFragment (const Analyzer::OffsetInFragment *) const
 
virtual std::set< int > visitAggExpr (const Analyzer::AggExpr *agg) const
 
virtual std::set< int > defaultResult () const
 

Additional Inherited Members

- Public Member Functions inherited from ScalarExprVisitor< std::set< int > >
std::set< int > visit (const Analyzer::Expr *expr) const
 

Detailed Description

Definition at line 456 of file IRCodegen.cpp.

Member Function Documentation

std::set<int> anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor::aggregateResult ( const std::set< int > &  aggregate,
const std::set< int > &  next_result 
) const
inlinefinalprotectedvirtual

Reimplemented from ScalarExprVisitor< std::set< int > >.

Definition at line 480 of file IRCodegen.cpp.

481  {
482  auto ret = aggregate; // copy
483  for (const auto& el : next_result) {
484  ret.insert(el);
485  }
486  return ret;
487  }
std::set<int> anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor::visitBinOper ( const Analyzer::BinOper bin_oper) const
inlinefinalprotectedvirtual

Reimplemented from ScalarExprVisitor< std::set< int > >.

Definition at line 470 of file IRCodegen.cpp.

470  {
471  std::set<int> ret;
472  ret = aggregateResult(ret, visit(bin_oper->get_left_operand()));
473  return aggregateResult(ret, visit(bin_oper->get_right_operand()));
474  }
std::set< int > aggregateResult(const std::set< int > &aggregate, const std::set< int > &next_result) const final
Definition: IRCodegen.cpp:480
const Expr * get_right_operand() const
Definition: Analyzer.h:443
std::set< int > visit(const Analyzer::Expr *expr) const
const Expr * get_left_operand() const
Definition: Analyzer.h:442
std::set<int> anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor::visitColumnVar ( const Analyzer::ColumnVar col_expr) const
inlinefinalprotectedvirtual

Reimplemented from ScalarExprVisitor< std::set< int > >.

Definition at line 458 of file IRCodegen.cpp.

458  {
459  return {col_expr->get_table_id()};
460  }
int get_table_id() const
Definition: Analyzer.h:194
std::set<int> anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor::visitFunctionOper ( const Analyzer::FunctionOper func_expr) const
inlinefinalprotectedvirtual

Reimplemented from ScalarExprVisitor< std::set< int > >.

Definition at line 462 of file IRCodegen.cpp.

References i.

462  {
463  std::set<int> ret;
464  for (size_t i = 0; i < func_expr->getArity(); i++) {
465  ret = aggregateResult(ret, visit(func_expr->getArg(i)));
466  }
467  return ret;
468  }
size_t getArity() const
Definition: Analyzer.h:1360
std::set< int > aggregateResult(const std::set< int > &aggregate, const std::set< int > &next_result) const final
Definition: IRCodegen.cpp:480
std::set< int > visit(const Analyzer::Expr *expr) const
const Analyzer::Expr * getArg(const size_t i) const
Definition: Analyzer.h:1362
std::set<int> anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor::visitUOper ( const Analyzer::UOper u_oper) const
inlinefinalprotectedvirtual

Reimplemented from ScalarExprVisitor< std::set< int > >.

Definition at line 476 of file IRCodegen.cpp.

476  {
477  return visit(u_oper->get_operand());
478  }
std::set< int > visit(const Analyzer::Expr *expr) const
const Expr * get_operand() const
Definition: Analyzer.h:371

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