OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ScalarExprVisitor< T > Class Template Reference

#include <ScalarExprVisitor.h>

Public Member Functions

visit (const Analyzer::Expr *expr) const
 

Protected Member Functions

virtual T visitVar (const Analyzer::Var *) const
 
virtual T visitColumnVar (const Analyzer::ColumnVar *) const
 
virtual T visitColumnVarTuple (const Analyzer::ExpressionTuple *) const
 
virtual T visitConstant (const Analyzer::Constant *) const
 
virtual T visitUOper (const Analyzer::UOper *uoper) const
 
virtual T visitBinOper (const Analyzer::BinOper *bin_oper) const
 
virtual T visitGeoExpr (const Analyzer::GeoExpr *geo_expr) const
 
virtual T visitInValues (const Analyzer::InValues *in_values) const
 
virtual T visitInIntegerSet (const Analyzer::InIntegerSet *in_integer_set) const
 
virtual T visitCharLength (const Analyzer::CharLengthExpr *char_length) const
 
virtual T visitKeyForString (const Analyzer::KeyForStringExpr *key_for_string) const
 
virtual T visitSampleRatio (const Analyzer::SampleRatioExpr *sample_ratio) const
 
virtual T visitStringOper (const Analyzer::StringOper *string_oper) const
 
virtual T visitCardinality (const Analyzer::CardinalityExpr *cardinality) const
 
virtual T visitLikeExpr (const Analyzer::LikeExpr *like) const
 
virtual T visitRegexpExpr (const Analyzer::RegexpExpr *regexp) const
 
virtual T visitWidthBucket (const Analyzer::WidthBucketExpr *width_bucket_expr) const
 
virtual T visitCaseExpr (const Analyzer::CaseExpr *case_) const
 
virtual T visitDatetruncExpr (const Analyzer::DatetruncExpr *datetrunc) const
 
virtual T visitExtractExpr (const Analyzer::ExtractExpr *extract) const
 
virtual T visitFunctionOperWithCustomTypeHandling (const Analyzer::FunctionOperWithCustomTypeHandling *func_oper) const
 
virtual T visitArrayOper (Analyzer::ArrayExpr const *array_expr) const
 
virtual T visitGeoUOper (const Analyzer::GeoUOper *geo_expr) const
 
virtual T visitGeoBinOper (const Analyzer::GeoBinOper *geo_expr) const
 
virtual T visitFunctionOper (const Analyzer::FunctionOper *func_oper) const
 
virtual T visitWindowFunction (const Analyzer::WindowFunction *window_func) const
 
virtual T visitDatediffExpr (const Analyzer::DatediffExpr *datediff) const
 
virtual T visitDateaddExpr (const Analyzer::DateaddExpr *dateadd) const
 
virtual T visitLikelihood (const Analyzer::LikelihoodExpr *likelihood) const
 
virtual T visitOffsetInFragment (const Analyzer::OffsetInFragment *) const
 
virtual T visitAggExpr (const Analyzer::AggExpr *agg) const
 
virtual T visitRangeJoinOper (const Analyzer::RangeOper *range_oper) const
 
virtual T aggregateResult (const T &aggregate, const T &next_result) const
 
virtual void visitBegin () const
 
virtual T defaultResult () const
 

Detailed Description

template<class T>
class ScalarExprVisitor< T >

Definition at line 23 of file ScalarExprVisitor.h.

Member Function Documentation

template<class T>
virtual T ScalarExprVisitor< T >::aggregateResult ( const T &  aggregate,
const T &  next_result 
) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor, AllColumnVarsVisitor, anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, ColumnVarsVisitor, AllRangeTableIndexVisitor, ScalarExprToSql, anonymous_namespace{JoinFilterPushDown.cpp}::CollectInputColumnsVisitor, MaxRangeTableIndexVisitor, anonymous_namespace{ScalarCodeGenerator.cpp}::UsedColumnExpressions, and UsedColumnsVisitor.

Definition at line 386 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitAggExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitArrayOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitBinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCardinality(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCaseExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCharLength(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDateaddExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDatediffExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDatetruncExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitExtractExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitFunctionOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoBinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoUOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitInValues(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitKeyForString(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitLikeExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitRangeJoinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitRegexpExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitSampleRatio(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitStringOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitUOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitWidthBucket(), and ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitWindowFunction().

386  {
387  return next_result;
388  }

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::defaultResult ( ) const
inlineprotectedvirtual

Reimplemented in JoinCoveredQualVisitor, anonymous_namespace{RelAlgExecutor.cpp}::TextEncodingCastCountVisitor, TransientDictIdVisitor, TransientStringLiteralsVisitor, and ScalarExprToSql.

Definition at line 392 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitAggExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitArrayOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitBinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCardinality(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCaseExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCharLength(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitColumnVar(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitColumnVarTuple(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitConstant(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDateaddExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDatediffExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDatetruncExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitExtractExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitFunctionOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoBinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoUOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitKeyForString(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitLikeExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitOffsetInFragment(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitRangeJoinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitRegexpExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitSampleRatio(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitStringOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitUOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitVar(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitWidthBucket(), and ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitWindowFunction().

392 { return T{}; }

+ Here is the caller graph for this function:

template<class T>
T ScalarExprVisitor< T >::visit ( const Analyzer::Expr expr) const
inline

Definition at line 25 of file ScalarExprVisitor.h.

Referenced by Executor::addTransientStringLiterals(), anonymous_namespace{SerializeToSql.cpp}::agg_to_string(), anonymous_namespace{FromTableReordering.cpp}::build_join_cost_graph(), anonymous_namespace{EquiJoinCondition.cpp}::can_combine_with(), QueryPlanDagCache::collectColVars(), find_push_down_filters(), anonymous_namespace{FromTableReordering.cpp}::get_join_qual_cost(), anonymous_namespace{RelAlgExecutor.cpp}::get_text_cast_counts(), HashJoin::getSyntheticInstance(), HashJoin::normalizeColumnPair(), rewrite_overlaps_conjunction(), strip_join_covered_filter_quals(), anonymous_namespace{QueryMemoryDescriptor.cpp}::target_expr_proj_indices(), anonymous_namespace{SerializeToSql.cpp}::targets_to_string(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitAggExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitArrayOper(), anonymous_namespace{ExpressionRewrite.cpp}::RecursiveOrToInVisitor::visitBinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitBinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCardinality(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCaseExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitCharLength(), MaxRangeTableIndexVisitor::visitColumnVarTuple(), AllRangeTableIndexVisitor::visitColumnVarTuple(), ColumnVarsVisitor::visitColumnVarTuple(), AllColumnVarsVisitor::visitColumnVarTuple(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDateaddExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDatediffExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitDatetruncExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitExtractExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitFunctionOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoBinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitGeoUOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitInIntegerSet(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitInValues(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitKeyForString(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitLikeExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitLikelihood(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitRangeJoinOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitRegexpExpr(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitSampleRatio(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitStringOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitUOper(), ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitWidthBucket(), and ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitWindowFunction().

25  {
26  CHECK(expr);
27  visitBegin();
28  const auto var = dynamic_cast<const Analyzer::Var*>(expr);
29  if (var) {
30  return visitVar(var);
31  }
32  const auto column_var = dynamic_cast<const Analyzer::ColumnVar*>(expr);
33  if (column_var) {
34  return visitColumnVar(column_var);
35  }
36  const auto column_var_tuple = dynamic_cast<const Analyzer::ExpressionTuple*>(expr);
37  if (column_var_tuple) {
38  return visitColumnVarTuple(column_var_tuple);
39  }
40  const auto constant = dynamic_cast<const Analyzer::Constant*>(expr);
41  if (constant) {
42  return visitConstant(constant);
43  }
44  const auto uoper = dynamic_cast<const Analyzer::UOper*>(expr);
45  if (uoper) {
46  return visitUOper(uoper);
47  }
48  const auto bin_oper = dynamic_cast<const Analyzer::BinOper*>(expr);
49  if (bin_oper) {
50  return visitBinOper(bin_oper);
51  }
52  const auto geo_expr = dynamic_cast<const Analyzer::GeoExpr*>(expr);
53  if (geo_expr) {
54  return visitGeoExpr(geo_expr);
55  }
56  const auto in_values = dynamic_cast<const Analyzer::InValues*>(expr);
57  if (in_values) {
58  return visitInValues(in_values);
59  }
60  const auto in_integer_set = dynamic_cast<const Analyzer::InIntegerSet*>(expr);
61  if (in_integer_set) {
62  return visitInIntegerSet(in_integer_set);
63  }
64  const auto char_length = dynamic_cast<const Analyzer::CharLengthExpr*>(expr);
65  if (char_length) {
67  }
68  const auto key_for_string = dynamic_cast<const Analyzer::KeyForStringExpr*>(expr);
69  if (key_for_string) {
70  return visitKeyForString(key_for_string);
71  }
72  const auto sample_ratio = dynamic_cast<const Analyzer::SampleRatioExpr*>(expr);
73  if (sample_ratio) {
75  }
76  const auto width_bucket = dynamic_cast<const Analyzer::WidthBucketExpr*>(expr);
77  if (width_bucket) {
79  }
80  const auto string_oper = dynamic_cast<const Analyzer::StringOper*>(expr);
81  if (string_oper) {
82  return visitStringOper(string_oper);
83  }
84  const auto cardinality = dynamic_cast<const Analyzer::CardinalityExpr*>(expr);
85  if (cardinality) {
86  return visitCardinality(cardinality);
87  }
88  const auto width_bucket_expr = dynamic_cast<const Analyzer::WidthBucketExpr*>(expr);
89  if (width_bucket_expr) {
91  }
92  const auto like_expr = dynamic_cast<const Analyzer::LikeExpr*>(expr);
93  if (like_expr) {
94  return visitLikeExpr(like_expr);
95  }
96  const auto regexp_expr = dynamic_cast<const Analyzer::RegexpExpr*>(expr);
97  if (regexp_expr) {
98  return visitRegexpExpr(regexp_expr);
99  }
100  const auto case_ = dynamic_cast<const Analyzer::CaseExpr*>(expr);
101  if (case_) {
102  return visitCaseExpr(case_);
103  }
104  const auto datetrunc = dynamic_cast<const Analyzer::DatetruncExpr*>(expr);
105  if (datetrunc) {
106  return visitDatetruncExpr(datetrunc);
107  }
108  const auto extract = dynamic_cast<const Analyzer::ExtractExpr*>(expr);
109  if (extract) {
110  return visitExtractExpr(extract);
111  }
112  const auto window_func = dynamic_cast<const Analyzer::WindowFunction*>(expr);
113  if (window_func) {
114  return visitWindowFunction(window_func);
115  }
116  const auto func_with_custom_type_handling =
117  dynamic_cast<const Analyzer::FunctionOperWithCustomTypeHandling*>(expr);
118  if (func_with_custom_type_handling) {
119  return visitFunctionOperWithCustomTypeHandling(func_with_custom_type_handling);
120  }
121  const auto func = dynamic_cast<const Analyzer::FunctionOper*>(expr);
122  if (func) {
123  return visitFunctionOper(func);
124  }
125  const auto array = dynamic_cast<const Analyzer::ArrayExpr*>(expr);
126  if (array) {
127  return visitArrayOper(array);
128  }
129  const auto geo_uop = dynamic_cast<const Analyzer::GeoUOper*>(expr);
130  if (geo_uop) {
131  return visitGeoUOper(geo_uop);
132  }
133  const auto geo_binop = dynamic_cast<const Analyzer::GeoBinOper*>(expr);
134  if (geo_binop) {
135  return visitGeoBinOper(geo_binop);
136  }
137  const auto datediff = dynamic_cast<const Analyzer::DatediffExpr*>(expr);
138  if (datediff) {
139  return visitDatediffExpr(datediff);
140  }
141  const auto dateadd = dynamic_cast<const Analyzer::DateaddExpr*>(expr);
142  if (dateadd) {
143  return visitDateaddExpr(dateadd);
144  }
145  const auto likelihood = dynamic_cast<const Analyzer::LikelihoodExpr*>(expr);
146  if (likelihood) {
147  return visitLikelihood(likelihood);
148  }
149  const auto offset_in_fragment = dynamic_cast<const Analyzer::OffsetInFragment*>(expr);
150  if (offset_in_fragment) {
151  return visitOffsetInFragment(offset_in_fragment);
152  }
153  const auto agg = dynamic_cast<const Analyzer::AggExpr*>(expr);
154  if (agg) {
155  return visitAggExpr(agg);
156  }
157  const auto range_join_oper = dynamic_cast<const Analyzer::RangeOper*>(expr);
158  if (range_join_oper) {
159  return visitRangeJoinOper(range_join_oper);
160  }
161  return defaultResult();
162  }
virtual T visitAggExpr(const Analyzer::AggExpr *agg) const
virtual T visitOffsetInFragment(const Analyzer::OffsetInFragment *) const
virtual T visitGeoBinOper(const Analyzer::GeoBinOper *geo_expr) const
virtual T visitCardinality(const Analyzer::CardinalityExpr *cardinality) const
virtual T visitGeoUOper(const Analyzer::GeoUOper *geo_expr) const
virtual T visitExtractExpr(const Analyzer::ExtractExpr *extract) const
virtual T visitLikelihood(const Analyzer::LikelihoodExpr *likelihood) const
virtual T visitCharLength(const Analyzer::CharLengthExpr *char_length) const
virtual T visitVar(const Analyzer::Var *) const
RUNTIME_EXPORT ALWAYS_INLINE DEVICE int32_t width_bucket(const double target_value, const double lower_bound, const double upper_bound, const double scale_factor, const int32_t partition_count)
virtual T visitGeoExpr(const Analyzer::GeoExpr *geo_expr) const
virtual T visitLikeExpr(const Analyzer::LikeExpr *like) const
virtual void visitBegin() const
virtual T visitColumnVar(const Analyzer::ColumnVar *) const
virtual T visitWindowFunction(const Analyzer::WindowFunction *window_func) const
RUNTIME_EXPORT ALWAYS_INLINE DEVICE int32_t char_length(const char *str, const int32_t str_len)
virtual T visitDatediffExpr(const Analyzer::DatediffExpr *datediff) const
virtual T visitDateaddExpr(const Analyzer::DateaddExpr *dateadd) const
Expression class for string functions The &quot;arg&quot; constructor parameter must be an expression that reso...
Definition: Analyzer.h:1475
virtual T visitRangeJoinOper(const Analyzer::RangeOper *range_oper) const
virtual T visitConstant(const Analyzer::Constant *) const
virtual T visitKeyForString(const Analyzer::KeyForStringExpr *key_for_string) const
virtual T visitCaseExpr(const Analyzer::CaseExpr *case_) const
virtual T visitBinOper(const Analyzer::BinOper *bin_oper) const
virtual T visitInValues(const Analyzer::InValues *in_values) const
virtual T visitInIntegerSet(const Analyzer::InIntegerSet *in_integer_set) const
#define CHECK(condition)
Definition: Logger.h:289
virtual T visitFunctionOperWithCustomTypeHandling(const Analyzer::FunctionOperWithCustomTypeHandling *func_oper) const
virtual T visitFunctionOper(const Analyzer::FunctionOper *func_oper) const
virtual T visitArrayOper(Analyzer::ArrayExpr const *array_expr) const
virtual T defaultResult() const
virtual T visitRegexpExpr(const Analyzer::RegexpExpr *regexp) const
virtual T visitSampleRatio(const Analyzer::SampleRatioExpr *sample_ratio) const
virtual T visitUOper(const Analyzer::UOper *uoper) const
virtual T visitColumnVarTuple(const Analyzer::ExpressionTuple *) const
virtual T visitStringOper(const Analyzer::StringOper *string_oper) const
virtual T visitDatetruncExpr(const Analyzer::DatetruncExpr *datetrunc) const
virtual T visitWidthBucket(const Analyzer::WidthBucketExpr *width_bucket_expr) const
RUNTIME_EXPORT ALWAYS_INLINE DEVICE bool sample_ratio(const double proportion, const int64_t row_offset)
RUNTIME_EXPORT ALWAYS_INLINE DEVICE int32_t width_bucket_expr(const double target_value, const bool reversed, const double lower_bound, const double upper_bound, const int32_t partition_count)

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitAggExpr ( const Analyzer::AggExpr agg) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and ScalarExprToSql.

Definition at line 370 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

370  {
371  T result = defaultResult();
372  if (agg->get_arg()) {
373  return aggregateResult(result, visit(agg->get_arg()));
374  }
375  return defaultResult();
376  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
Expr * get_arg() const
Definition: Analyzer.h:1204
T visit(const Analyzer::Expr *expr) const
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitArrayOper ( Analyzer::ArrayExpr const *  array_expr) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::ArrayElementStringLiteralEncodingVisitor, and DeepCopyVisitor.

Definition at line 299 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

299  {
300  T result = defaultResult();
301  for (size_t i = 0; i < array_expr->getElementCount(); ++i) {
302  result = aggregateResult(result, visit(array_expr->getElement(i)));
303  }
304  return result;
305  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual void ScalarExprVisitor< T >::visitBegin ( ) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{RelAlgExecutor.cpp}::TextEncodingCastCountVisitor.

Definition at line 390 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

390 {}

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitBinOper ( const Analyzer::BinOper bin_oper) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor, anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor, anonymous_namespace{RelAlgExecutor.cpp}::TextEncodingCastCountVisitor, anonymous_namespace{ExpressionRewrite.cpp}::RecursiveOrToInVisitor, DeepCopyVisitor, anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and ScalarExprToSql.

Definition at line 181 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

181  {
182  T result = defaultResult();
183  result = aggregateResult(result, visit(bin_oper->get_left_operand()));
184  result = aggregateResult(result, visit(bin_oper->get_right_operand()));
185  return result;
186  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
const Expr * get_right_operand() const
Definition: Analyzer.h:452
T visit(const Analyzer::Expr *expr) const
virtual T defaultResult() const
const Expr * get_left_operand() const
Definition: Analyzer.h:451

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitCardinality ( const Analyzer::CardinalityExpr cardinality) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and DeepCopyVisitor.

Definition at line 236 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

236  {
237  T result = defaultResult();
238  result = aggregateResult(result, visit(cardinality->get_arg()));
239  return result;
240  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
virtual T defaultResult() const
const Expr * get_arg() const
Definition: Analyzer.h:851

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitCaseExpr ( const Analyzer::CaseExpr case_) const
inlineprotectedvirtual

Reimplemented in TransientDictIdVisitor, DeepCopyVisitor, anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and ScalarExprToSql.

Definition at line 271 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

271  {
272  T result = defaultResult();
273  const auto& expr_pair_list = case_->get_expr_pair_list();
274  for (const auto& expr_pair : expr_pair_list) {
275  result = aggregateResult(result, visit(expr_pair.first.get()));
276  result = aggregateResult(result, visit(expr_pair.second.get()));
277  }
278  result = aggregateResult(result, visit(case_->get_else_expr()));
279  return result;
280  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
const Expr * get_else_expr() const
Definition: Analyzer.h:1261
T visit(const Analyzer::Expr *expr) const
virtual T defaultResult() const
const std::list< std::pair< std::shared_ptr< Analyzer::Expr >, std::shared_ptr< Analyzer::Expr > > > & get_expr_pair_list() const
Definition: Analyzer.h:1258

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitCharLength ( const Analyzer::CharLengthExpr char_length) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and DeepCopyVisitor.

Definition at line 210 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

210  {
211  T result = defaultResult();
212  result = aggregateResult(result, visit(char_length->get_arg()));
213  return result;
214  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_arg() const
Definition: Analyzer.h:712
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitColumnVarTuple ( const Analyzer::ExpressionTuple ) const
inlineprotectedvirtual

Reimplemented in AllColumnVarsVisitor, ColumnVarsVisitor, AllRangeTableIndexVisitor, MaxRangeTableIndexVisitor, and DeepCopyVisitor.

Definition at line 169 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

169  {
170  return defaultResult();
171  }
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitConstant ( const Analyzer::Constant ) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, ScalarExprToSql, and TransientStringLiteralsVisitor.

Definition at line 173 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

173 { return defaultResult(); }
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitDateaddExpr ( const Analyzer::DateaddExpr dateadd) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, and anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor.

Definition at line 355 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

355  {
356  T result = defaultResult();
357  result = aggregateResult(result, visit(dateadd->get_number_expr()));
358  result = aggregateResult(result, visit(dateadd->get_datetime_expr()));
359  return result;
360  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_datetime_expr() const
Definition: Analyzer.h:1352
virtual T defaultResult() const
const Expr * get_number_expr() const
Definition: Analyzer.h:1351

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitDatediffExpr ( const Analyzer::DatediffExpr datediff) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, and anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor.

Definition at line 348 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

348  {
349  T result = defaultResult();
350  result = aggregateResult(result, visit(datediff->get_start_expr()));
351  result = aggregateResult(result, visit(datediff->get_end_expr()));
352  return result;
353  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_start_expr() const
Definition: Analyzer.h:1399
const Expr * get_end_expr() const
Definition: Analyzer.h:1400
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitDatetruncExpr ( const Analyzer::DatetruncExpr datetrunc) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, and anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor.

Definition at line 282 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

282  {
283  T result = defaultResult();
284  result = aggregateResult(result, visit(datetrunc->get_from_expr()));
285  return result;
286  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_from_expr() const
Definition: Analyzer.h:1441
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitExtractExpr ( const Analyzer::ExtractExpr extract) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, and anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor.

Definition at line 288 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

288  {
289  T result = defaultResult();
290  result = aggregateResult(result, visit(extract->get_from_expr()));
291  return result;
292  }
const Expr * get_from_expr() const
Definition: Analyzer.h:1306
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitFunctionOper ( const Analyzer::FunctionOper func_oper) const
inlineprotectedvirtual

Reimplemented in JoinCoveredQualVisitor, anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor, DeepCopyVisitor, ScalarExprToSql, and GeospatialFunctionFinder.

Definition at line 326 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit(), and ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visitFunctionOperWithCustomTypeHandling().

326  {
327  T result = defaultResult();
328  for (size_t i = 0; i < func_oper->getArity(); ++i) {
329  result = aggregateResult(result, visit(func_oper->getArg(i)));
330  }
331  return result;
332  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
size_t getArity() const
Definition: Analyzer.h:2404
T visit(const Analyzer::Expr *expr) const
const Analyzer::Expr * getArg(const size_t i) const
Definition: Analyzer.h:2406
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitFunctionOperWithCustomTypeHandling ( const Analyzer::FunctionOperWithCustomTypeHandling func_oper) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor.

Definition at line 294 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

295  {
296  return visitFunctionOper(func_oper);
297  }
virtual T visitFunctionOper(const Analyzer::FunctionOper *func_oper) const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitGeoBinOper ( const Analyzer::GeoBinOper geo_expr) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor.

Definition at line 315 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

315  {
316  T result = defaultResult();
317  for (const auto& arg : geo_expr->getArgs0()) {
318  result = aggregateResult(result, visit(arg.get()));
319  }
320  for (const auto& arg : geo_expr->getArgs1()) {
321  result = aggregateResult(result, visit(arg.get()));
322  }
323  return result;
324  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
const std::vector< std::shared_ptr< Analyzer::Expr > > & getArgs0() const
Definition: Analyzer.h:2731
T visit(const Analyzer::Expr *expr) const
virtual T defaultResult() const
const std::vector< std::shared_ptr< Analyzer::Expr > > & getArgs1() const
Definition: Analyzer.h:2732

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitGeoExpr ( const Analyzer::GeoExpr geo_expr) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, and GeospatialFunctionFinder.

Definition at line 188 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

188  {
189  T result = defaultResult();
190  const auto geo_expr_children = geo_expr->getChildExprs();
191  for (const auto expr : geo_expr_children) {
192  result = aggregateResult(result, visit(expr));
193  }
194  return result;
195  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
virtual std::vector< Analyzer::Expr * > getChildExprs() const
Definition: Analyzer.h:2860
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitGeoUOper ( const Analyzer::GeoUOper geo_expr) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor.

Definition at line 307 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

307  {
308  T result = defaultResult();
309  for (const auto& arg : geo_expr->getArgs0()) {
310  result = aggregateResult(result, visit(arg.get()));
311  }
312  return result;
313  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const std::vector< std::shared_ptr< Analyzer::Expr > > & getArgs0() const
Definition: Analyzer.h:2701
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitInIntegerSet ( const Analyzer::InIntegerSet in_integer_set) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and DeepCopyVisitor.

Definition at line 206 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

206  {
207  return visit(in_integer_set->get_arg());
208  }
T visit(const Analyzer::Expr *expr) const
const Expr * get_arg() const
Definition: Analyzer.h:689

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitInValues ( const Analyzer::InValues in_values) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, DeepCopyVisitor, and ScalarExprToSql.

Definition at line 197 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

197  {
198  T result = visit(in_values->get_arg());
199  const auto& value_list = in_values->get_value_list();
200  for (const auto& in_value : value_list) {
201  result = aggregateResult(result, visit(in_value.get()));
202  }
203  return result;
204  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const std::list< std::shared_ptr< Analyzer::Expr > > & get_value_list() const
Definition: Analyzer.h:642
const Expr * get_arg() const
Definition: Analyzer.h:640

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitKeyForString ( const Analyzer::KeyForStringExpr key_for_string) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and DeepCopyVisitor.

Definition at line 216 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

216  {
217  T result = defaultResult();
218  result = aggregateResult(result, visit(key_for_string->get_arg()));
219  return result;
220  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_arg() const
Definition: Analyzer.h:761
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitLikeExpr ( const Analyzer::LikeExpr like) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{RelAlgExecutor.cpp}::TextEncodingCastCountVisitor, anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, DeepCopyVisitor, and ScalarExprToSql.

Definition at line 242 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

242  {
243  T result = defaultResult();
244  result = aggregateResult(result, visit(like->get_arg()));
245  result = aggregateResult(result, visit(like->get_like_expr()));
246  if (like->get_escape_expr()) {
247  result = aggregateResult(result, visit(like->get_escape_expr()));
248  }
249  return result;
250  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
const Expr * get_escape_expr() const
Definition: Analyzer.h:908
T visit(const Analyzer::Expr *expr) const
const Expr * get_arg() const
Definition: Analyzer.h:905
const Expr * get_like_expr() const
Definition: Analyzer.h:907
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitLikelihood ( const Analyzer::LikelihoodExpr likelihood) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, and anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor.

Definition at line 362 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

362  {
363  return visit(likelihood->get_arg());
364  }
const Expr * get_arg() const
Definition: Analyzer.h:1141
T visit(const Analyzer::Expr *expr) const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitOffsetInFragment ( const Analyzer::OffsetInFragment ) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor.

Definition at line 366 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

366  {
367  return defaultResult();
368  }
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitRangeJoinOper ( const Analyzer::RangeOper range_oper) const
inlineprotectedvirtual

Definition at line 378 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

378  {
379  T result = defaultResult();
380  result = aggregateResult(result, visit(range_oper->get_left_operand()));
381  result = aggregateResult(result, visit(range_oper->get_right_operand()));
382  return result;
383  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_left_operand() const
Definition: Analyzer.h:548
const Expr * get_right_operand() const
Definition: Analyzer.h:549
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitRegexpExpr ( const Analyzer::RegexpExpr regexp) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and DeepCopyVisitor.

Definition at line 252 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

252  {
253  T result = defaultResult();
254  result = aggregateResult(result, visit(regexp->get_arg()));
255  result = aggregateResult(result, visit(regexp->get_pattern_expr()));
256  if (regexp->get_escape_expr()) {
257  result = aggregateResult(result, visit(regexp->get_escape_expr()));
258  }
259  return result;
260  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
const Expr * get_escape_expr() const
Definition: Analyzer.h:980
const Expr * get_arg() const
Definition: Analyzer.h:977
T visit(const Analyzer::Expr *expr) const
const Expr * get_pattern_expr() const
Definition: Analyzer.h:979
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitSampleRatio ( const Analyzer::SampleRatioExpr sample_ratio) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, and DeepCopyVisitor.

Definition at line 222 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

222  {
223  T result = defaultResult();
224  result = aggregateResult(result, visit(sample_ratio->get_arg()));
225  return result;
226  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_arg() const
Definition: Analyzer.h:806
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitStringOper ( const Analyzer::StringOper string_oper) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor, anonymous_namespace{RelAlgExecutor.cpp}::TextEncodingCastCountVisitor, DeepCopyVisitor, TransientDictIdVisitor, and TransientStringLiteralsVisitor.

Definition at line 228 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

228  {
229  T result = defaultResult();
230  for (const auto& arg : string_oper->getOwnArgs()) {
231  result = aggregateResult(result, visit(arg.get()));
232  }
233  return result;
234  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
virtual T defaultResult() const
std::vector< std::shared_ptr< Analyzer::Expr > > getOwnArgs() const
Definition: Analyzer.h:1568

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitUOper ( const Analyzer::UOper uoper) const
inlineprotectedvirtual

Reimplemented in anonymous_namespace{IRCodegen.cpp}::ExprTableIdVisitor, anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor, anonymous_namespace{RelAlgExecutor.cpp}::TextEncodingCastCountVisitor, TransientDictIdVisitor, anonymous_namespace{ExpressionRewrite.cpp}::OrToInVisitor, TransientStringLiteralsVisitor, DeepCopyVisitor, and ScalarExprToSql.

Definition at line 175 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

175  {
176  T result = defaultResult();
177  result = aggregateResult(result, visit(uoper->get_operand()));
178  return result;
179  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_operand() const
Definition: Analyzer.h:380
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitVar ( const Analyzer::Var ) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, and ScalarExprToSql.

Definition at line 165 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

165 { return defaultResult(); }
virtual T defaultResult() const

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitWidthBucket ( const Analyzer::WidthBucketExpr width_bucket_expr) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor.

Definition at line 262 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

262  {
263  T result = defaultResult();
264  result = aggregateResult(result, visit(width_bucket_expr->get_target_value()));
265  result = aggregateResult(result, visit(width_bucket_expr->get_lower_bound()));
266  result = aggregateResult(result, visit(width_bucket_expr->get_upper_bound()));
267  result = aggregateResult(result, visit(width_bucket_expr->get_partition_count()));
268  return result;
269  }
const Expr * get_partition_count() const
Definition: Analyzer.h:1045
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const Expr * get_target_value() const
Definition: Analyzer.h:1042
virtual T defaultResult() const
const Expr * get_lower_bound() const
Definition: Analyzer.h:1043
const Expr * get_upper_bound() const
Definition: Analyzer.h:1044

+ Here is the caller graph for this function:

template<class T>
virtual T ScalarExprVisitor< T >::visitWindowFunction ( const Analyzer::WindowFunction window_func) const
inlineprotectedvirtual

Reimplemented in DeepCopyVisitor, and ScalarExprToSql.

Definition at line 334 of file ScalarExprVisitor.h.

Referenced by ScalarExprVisitor< std::unordered_set< InputColDescriptor > >::visit().

334  {
335  T result = defaultResult();
336  for (const auto& arg : window_func->getArgs()) {
337  result = aggregateResult(result, visit(arg.get()));
338  }
339  for (const auto& partition_key : window_func->getPartitionKeys()) {
340  result = aggregateResult(result, visit(partition_key.get()));
341  }
342  for (const auto& order_key : window_func->getOrderKeys()) {
343  result = aggregateResult(result, visit(order_key.get()));
344  }
345  return result;
346  }
virtual T aggregateResult(const T &aggregate, const T &next_result) const
T visit(const Analyzer::Expr *expr) const
const std::vector< std::shared_ptr< Analyzer::Expr > > & getOrderKeys() const
Definition: Analyzer.h:2578
const std::vector< std::shared_ptr< Analyzer::Expr > > & getArgs() const
Definition: Analyzer.h:2572
virtual T defaultResult() const
const std::vector< std::shared_ptr< Analyzer::Expr > > & getPartitionKeys() const
Definition: Analyzer.h:2574

+ Here is the caller graph for this function:


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