OmniSciDB  ca0c39ec8f
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Analyzer::Expr Class Referenceabstract

#include <Analyzer.h>

+ Inheritance diagram for Analyzer::Expr:
+ Collaboration diagram for Analyzer::Expr:

Public Member Functions

 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
deep_copy () const =0
 
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 bool operator== (const Expr &rhs) const =0
 
virtual std::string toString () const =0
 
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
 

Protected Attributes

SQLTypeInfo type_info
 
bool contains_agg
 

Detailed Description

Definition at line 71 of file Analyzer.h.

Constructor & Destructor Documentation

Analyzer::Expr::Expr ( SQLTypes  t,
bool  notnull 
)
inline

Definition at line 73 of file Analyzer.h.

73 : type_info(t, notnull), contains_agg(false) {}
SQLTypeInfo type_info
Definition: Analyzer.h:183
bool contains_agg
Definition: Analyzer.h:184
Analyzer::Expr::Expr ( SQLTypes  t,
int  d,
bool  notnull 
)
inline

Definition at line 74 of file Analyzer.h.

75  : type_info(t, d, 0, notnull), contains_agg(false) {}
SQLTypeInfo type_info
Definition: Analyzer.h:183
bool contains_agg
Definition: Analyzer.h:184
Analyzer::Expr::Expr ( SQLTypes  t,
int  d,
int  s,
bool  notnull 
)
inline

Definition at line 76 of file Analyzer.h.

77  : type_info(t, d, s, notnull), contains_agg(false) {}
SQLTypeInfo type_info
Definition: Analyzer.h:183
bool contains_agg
Definition: Analyzer.h:184
Analyzer::Expr::Expr ( const SQLTypeInfo ti,
bool  has_agg = false 
)
inline

Definition at line 78 of file Analyzer.h.

79  : type_info(ti), contains_agg(has_agg) {}
SQLTypeInfo type_info
Definition: Analyzer.h:183
bool contains_agg
Definition: Analyzer.h:184
virtual Analyzer::Expr::~Expr ( )
inlinevirtual

Definition at line 80 of file Analyzer.h.

80 {}

Member Function Documentation

std::shared_ptr< Analyzer::Expr > Analyzer::Expr::add_cast ( const SQLTypeInfo new_type_info)
virtual

Reimplemented in Analyzer::GeoOperator, Analyzer::GeoConstant, Analyzer::CaseExpr, Analyzer::Subquery, Analyzer::UOper, and Analyzer::Constant.

Definition at line 728 of file Analyzer.cpp.

References contains_agg, SQLTypeInfo::get_comp_param(), SQLTypeInfo::get_compression(), get_num_column_vars(), SQLTypeInfo::get_type_name(), SQLTypeInfo::is_castable(), SQLTypeInfo::is_number(), SQLTypeInfo::is_string(), SQLTypeInfo::is_time(), kCAST, kENCODING_DICT, TRANSIENT_DICT, TRANSIENT_DICT_ID, and type_info.

Referenced by Analyzer::Constant::add_cast(), Analyzer::UOper::add_cast(), and Parser::QuerySpec::analyze_group_by().

728  {
729  if (new_type_info == type_info) {
730  return shared_from_this();
731  }
732  if (new_type_info.is_string() && type_info.is_string() &&
733  new_type_info.get_compression() == kENCODING_DICT &&
735  (new_type_info.get_comp_param() == type_info.get_comp_param() ||
736  new_type_info.get_comp_param() == TRANSIENT_DICT(type_info.get_comp_param()))) {
737  return shared_from_this();
738  }
739  if (!type_info.is_castable(new_type_info)) {
740  if (type_info.is_string() && (new_type_info.is_number() || new_type_info.is_time())) {
741  throw std::runtime_error("Cannot CAST from " + type_info.get_type_name() + " to " +
742  new_type_info.get_type_name() +
743  ". Consider using TRY_CAST instead.");
744  }
745  throw std::runtime_error("Cannot CAST from " + type_info.get_type_name() + " to " +
746  new_type_info.get_type_name());
747  }
748  // @TODO(wei) temporary restriction until executor can support this.
749  const bool has_non_literal_operands = get_num_column_vars(true) > 0UL;
750  if (has_non_literal_operands && new_type_info.is_string() &&
751  new_type_info.get_compression() == kENCODING_DICT &&
752  new_type_info.get_comp_param() <= TRANSIENT_DICT_ID) {
754  throw std::runtime_error(
755  "Implict casts of TEXT ENCODING NONE to TEXT ENCODED DICT are not allowed "
756  "for non-literal arguments. Consider adding an explicit conversion to a "
757  "dictionary-encoded text type with ENCODE_TEXT(<none-encoded text arg>).");
758  }
759  throw std::runtime_error(
760  "Internal error: Cannot apply transient dictionary encoding "
761  "to non-literal expression.");
762  }
763  return makeExpr<UOper>(new_type_info, contains_agg, kCAST, shared_from_this());
764 }
Definition: sqldefs.h:48
bool is_number() const
Definition: sqltypes.h:580
SQLTypeInfo type_info
Definition: Analyzer.h:183
bool is_time() const
Definition: sqltypes.h:581
bool is_castable(const SQLTypeInfo &new_type_info) const
Definition: sqltypes.h:695
#define TRANSIENT_DICT_ID
Definition: sqltypes.h:309
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:387
std::string get_type_name() const
Definition: sqltypes.h:503
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:388
bool is_string() const
Definition: sqltypes.h:575
virtual size_t get_num_column_vars(const bool include_agg) const
Definition: Analyzer.cpp:58
bool contains_agg
Definition: Analyzer.h:184
#define TRANSIENT_DICT(ID)
Definition: sqltypes.h:310

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Analyzer::Expr::add_unique ( std::list< const Expr * > &  expr_list) const
virtual
virtual void Analyzer::Expr::check_group_by ( const std::list< std::shared_ptr< Analyzer::Expr >> &  groupby) const
inlinevirtual
virtual void Analyzer::Expr::collect_column_var ( std::set< const ColumnVar *, bool(*)(const ColumnVar *, const ColumnVar *)> &  colvar_set,
bool  include_agg 
) const
inlinevirtual
std::shared_ptr< Analyzer::Expr > Analyzer::Expr::decompress ( )

Definition at line 714 of file Analyzer.cpp.

References contains_agg, SQLTypeInfo::get_compression(), SQLTypeInfo::get_dimension(), SQLTypeInfo::get_notnull(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), kCAST, kENCODING_NONE, and type_info.

714  {
716  return shared_from_this();
717  }
718  SQLTypeInfo new_type_info(type_info.get_type(),
723  0,
725  return makeExpr<UOper>(new_type_info, contains_agg, kCAST, shared_from_this());
726 }
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:380
HOST DEVICE int get_scale() const
Definition: sqltypes.h:384
Definition: sqldefs.h:48
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:379
SQLTypeInfo type_info
Definition: Analyzer.h:183
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:387
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:381
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:386
bool contains_agg
Definition: Analyzer.h:184

+ Here is the call graph for this function:

virtual std::shared_ptr<Analyzer::Expr> Analyzer::Expr::deep_copy ( ) const
pure virtual

Implemented in Analyzer::GeoTransformOperator, Analyzer::GeoOperator, Analyzer::GeoConstant, Analyzer::GeoBinOper, Analyzer::GeoUOper, Analyzer::ArrayExpr, Analyzer::WindowFunction, Analyzer::WindowFrame, Analyzer::OffsetInFragment, Analyzer::FunctionOperWithCustomTypeHandling, Analyzer::FunctionOper, Analyzer::TryStringCastOper, Analyzer::Base64DecodeStringOper, Analyzer::Base64EncodeStringOper, Analyzer::JsonValueStringOper, Analyzer::RegexpSubstrStringOper, Analyzer::RegexpReplaceStringOper, Analyzer::SplitPartStringOper, Analyzer::ReplaceStringOper, Analyzer::OverlayStringOper, Analyzer::SubstringStringOper, Analyzer::TrimStringOper, Analyzer::PadStringOper, Analyzer::ConcatStringOper, Analyzer::RepeatStringOper, Analyzer::ReverseStringOper, Analyzer::InitCapStringOper, Analyzer::UpperStringOper, Analyzer::LowerStringOper, Analyzer::StringOper, Analyzer::DatetruncExpr, Analyzer::DatediffExpr, Analyzer::DateaddExpr, Analyzer::ExtractExpr, Analyzer::CaseExpr, Analyzer::AggExpr, Analyzer::LikelihoodExpr, Analyzer::WidthBucketExpr, Analyzer::RegexpExpr, Analyzer::LikeExpr, Analyzer::CardinalityExpr, Analyzer::SampleRatioExpr, Analyzer::KeyForStringExpr, Analyzer::CharLengthExpr, Analyzer::InIntegerSet, Analyzer::InValues, Analyzer::Subquery, Analyzer::RangeOper, Analyzer::BinOper, Analyzer::UOper, Analyzer::Constant, Analyzer::Var, Analyzer::ExpressionTuple, Analyzer::ColumnVar, and Analyzer::Estimator.

Referenced by QueryRewriter::generateCaseForDomainValues(), Analyzer::WidthBucketExpr::get_bound_val(), rewrite_agg_to_var(), rewrite_with_child_targetlist(), rewrite_with_targetlist(), and DeepCopyVisitor::visitGeoExpr().

+ Here is the caller graph for this function:

virtual void Analyzer::Expr::find_expr ( bool(*)(const Expr *)  f,
std::list< const Expr * > &  expr_list 
) const
inlinevirtual

Reimplemented in Analyzer::StringOper, Analyzer::DatetruncExpr, Analyzer::DatediffExpr, Analyzer::DateaddExpr, Analyzer::ExtractExpr, Analyzer::CaseExpr, Analyzer::AggExpr, Analyzer::LikelihoodExpr, Analyzer::WidthBucketExpr, Analyzer::RegexpExpr, Analyzer::LikeExpr, Analyzer::CardinalityExpr, Analyzer::SampleRatioExpr, Analyzer::KeyForStringExpr, Analyzer::CharLengthExpr, Analyzer::InValues, Analyzer::Subquery, Analyzer::BinOper, and Analyzer::UOper.

Definition at line 166 of file Analyzer.h.

References add_unique(), and anonymous_namespace{Utm.h}::f.

Referenced by anonymous_namespace{LogicalIR.cpp}::contains_unsafe_division().

167  {
168  if (f(this)) {
169  add_unique(expr_list);
170  }
171  }
virtual void add_unique(std::list< const Expr * > &expr_list) const
Definition: Analyzer.cpp:3078
constexpr double f
Definition: Utm.h:31

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual void Analyzer::Expr::get_domain ( DomainSet domain_set) const
inlinevirtual

Reimplemented in Analyzer::CaseExpr.

Definition at line 180 of file Analyzer.h.

180 { domain_set.clear(); }
size_t Analyzer::Expr::get_num_column_vars ( const bool  include_agg) const
virtual

Definition at line 58 of file Analyzer.cpp.

References collect_column_var(), and Analyzer::ColumnVar::colvar_comp().

Referenced by add_cast(), and anonymous_namespace{RelAlgExecutor.cpp}::TextEncodingCastCountVisitor::visitUOper().

58  {
59  std::set<const Analyzer::ColumnVar*,
60  bool (*)(const Analyzer::ColumnVar*, const Analyzer::ColumnVar*)>
62  collect_column_var(colvar_set, include_agg);
63  return colvar_set.size();
64 }
static bool colvar_comp(const ColumnVar *l, const ColumnVar *r)
Definition: Analyzer.h:216
virtual void collect_column_var(std::set< const ColumnVar *, bool(*)(const ColumnVar *, const ColumnVar *)> &colvar_set, bool include_agg) const
Definition: Analyzer.h:120

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::shared_ptr<Analyzer::Expr> Analyzer::Expr::get_shared_ptr ( )
inline

Definition at line 81 of file Analyzer.h.

81 { return shared_from_this(); }
const SQLTypeInfo& Analyzer::Expr::get_type_info ( ) const
inline

Definition at line 82 of file Analyzer.h.

References type_info.

Referenced by Analyzer::GeoConstant::add_cast(), Analyzer::GeoOperator::add_cast(), Parser::ArrayLiteral::analyze(), spatial_type::AreaPerimeter::AreaPerimeter(), CodeGenerator::beginArgsNullcheck(), anonymous_namespace{ExtensionsIR.cpp}::call_requires_custom_type_handling(), Executor::canSkipFragmentForFpQual(), spatial_type::Centroid::Centroid(), anonymous_namespace{IRCodegen.cpp}::check_valid_join_qual(), CodeGenerator::checkExpressionRanges(), spatial_type::Transform::codegen(), spatial_type::PointAccessors::codegen(), spatial_type::PointConstructor::codegen(), CodeGenerator::codegen(), GroupByAndAggregate::codegenAggArg(), GroupByAndAggregate::codegenApproxQuantile(), CodeGenerator::codegenArith(), CodeGenerator::codegenArrayAt(), CodeGenerator::codegenArrayExpr(), CodeGenerator::codegenCast(), CodeGenerator::codegenCmp(), CodeGenerator::codegenCmpDecimalConst(), CodeGenerator::codegenColVar(), GroupByAndAggregate::codegenCountDistinct(), CodeGenerator::codegenDeciDiv(), CodeGenerator::codegenDictLike(), CodeGenerator::codegenDictRegexp(), CodeGenerator::codegenFixedLengthColVar(), CodeGenerator::codegenFixedLengthColVarInWindow(), CodeGenerator::codegenFpArith(), Executor::codegenFrameBoundExpr(), CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenFunctionOperCastArgs(), CodeGenerator::codegenFunctionOperNullArg(), CodeGenerator::codegenFunctionOperWithCustomTypeHandling(), CodeGenerator::codegenGeoBinOper(), CodeGenerator::codegenGeoColumnVar(), CodeGenerator::codegenGeoUOper(), CodeGenerator::codegenHoistedConstants(), CodeGenerator::codegenIntArith(), CodeGenerator::codegenIntConst(), spatial_type::NPoints::codegenLoads(), spatial_type::NRings::codegenLoads(), spatial_type::PointConstructor::codegenLoads(), CodeGenerator::codegenLogical(), CodeGenerator::codegenLogicalShortCircuit(), CodeGenerator::codegenOuterJoinNullPlaceholder(), CodeGenerator::codegenPerRowStringOper(), CodeGenerator::codegenPseudoStringOper(), CodeGenerator::codegenQualifierCmp(), PerfectJoinHashTable::codegenSlot(), CodeGenerator::codegenUMinus(), Executor::codegenWindowFrameBound(), ScalarCodeGenerator::compile(), CodeGenerator::createInValuesBitmap(), Analyzer::InIntegerSet::deep_copy(), Analyzer::StringOper::deep_copy(), spatial_type::Distance::Distance(), CodeGenerator::endArgsNullcheck(), Parser::anonymous_namespace{ParserNode.cpp}::expr_is_null(), anonymous_namespace{ExtensionsIR.cpp}::ext_func_call_requires_nullcheck(), PerfectJoinHashTable::genChunkKey(), anonymous_namespace{WindowFunctionIR.cpp}::get_adjusted_window_type_info(), anonymous_namespace{GroupByAndAggregate.cpp}::get_agg_count(), get_agg_type(), anonymous_namespace{ColumnIR.cpp}::get_col_bit_width(), anonymous_namespace{ColumnIR.cpp}::get_col_decoder(), anonymous_namespace{FromTableReordering.cpp}::get_join_qual_cost(), anonymous_namespace{RelAlgExecutor.cpp}::get_logical_type_for_expr(), Analyzer::StringOper::get_return_type(), target_info::get_target_info_impl(), PerfectJoinHashTable::getAlternativeCacheKey(), getExpressionRange(), PerfectJoinHashTable::getHashJoinArgs(), getLeafColumnRange(), spatial_type::PointConstructor::getNullCheckCodegen(), CgenState::getOrAddLiteral(), spatial_type::Codegen::getTypeInfo(), GroupByAndAggregate::gpuCanHandleOrderEntries(), Executor::groupByColumnCodegen(), CodeGenerator::hashJoinLhs(), anonymous_namespace{GroupByAndAggregate.cpp}::init_count_distinct_descriptors(), Analyzer::anonymous_namespace{Analyzer.cpp}::is_expr_nullable(), RangeJoinHashTable::isInnerColCompressed(), anonymous_namespace{CompareIR.cpp}::lower_bw_eq(), WindowFunctionContext::makeComparator(), ColumnFetcher::makeJoinColumn(), anonymous_namespace{DateTimePlusRewrite.cpp}::match_const_integer(), anonymous_namespace{WindowExpressionRewrite.cpp}::matches_gt_bigint_zero(), CodeGenerator::needCastForHashJoinLhs(), HashJoin::normalizeColumnPair(), Analyzer::Constant::operator==(), Analyzer::FunctionOper::operator==(), Analyzer::FunctionOperWithCustomTypeHandling::operator==(), Analyzer::GeoConstant::operator==(), QueryMemoryDescriptor::pick_target_compact_width(), spatial_type::PointConstructor::PointConstructor(), pre_translate_string_ops(), anonymous_namespace{DateTimePlusRewrite.cpp}::remove_cast_to_date(), remove_cast_to_int(), Analyzer::ColumnVar::rewrite_agg_to_var(), Analyzer::Var::rewrite_agg_to_var(), Analyzer::AggExpr::rewrite_agg_to_var(), Analyzer::ColumnVar::rewrite_with_child_targetlist(), anonymous_namespace{LogicalIR.cpp}::should_defer_eval(), Analyzer::BinOper::simple_predicate_has_simple_cast(), Analyzer::ColumnVar::toString(), spatial_type::Transform::Transform(), translate_dict_strings(), RelAlgTranslator::translateIntervalExprForWindowFraming(), RelAlgTranslator::translateWindowFunction(), var_ref(), DeepCopyVisitor::visitAggExpr(), DeepCopyVisitor::visitArrayOper(), anonymous_namespace{ExpressionRewrite.cpp}::ArrayElementStringLiteralEncodingVisitor::visitArrayOper(), DeepCopyVisitor::visitBinOper(), anonymous_namespace{ExpressionRewrite.cpp}::RecursiveOrToInVisitor::visitBinOper(), anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitBinOper(), DeepCopyVisitor::visitCaseExpr(), TransientDictIdVisitor::visitCaseExpr(), anonymous_namespace{JoinFilterPushDown.cpp}::BindFilterToOutermostVisitor::visitColumnVar(), TransientStringLiteralsVisitor::visitConstant(), ScalarExprToSql::visitConstant(), DeepCopyVisitor::visitDateaddExpr(), DeepCopyVisitor::visitDatediffExpr(), DeepCopyVisitor::visitDatetruncExpr(), DeepCopyVisitor::visitExtractExpr(), DeepCopyVisitor::visitFunctionOper(), DeepCopyVisitor::visitFunctionOperWithCustomTypeHandling(), DeepCopyVisitor::visitGeoBinOper(), DeepCopyVisitor::visitGeoUOper(), DeepCopyVisitor::visitInIntegerSet(), TransientStringLiteralsVisitor::visitStringOper(), TransientDictIdVisitor::visitStringOper(), anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitStringOper(), ScalarExprToSql::visitUOper(), DeepCopyVisitor::visitUOper(), TransientStringLiteralsVisitor::visitUOper(), TransientDictIdVisitor::visitUOper(), anonymous_namespace{RelAlgExecutor.cpp}::TextEncodingCastCountVisitor::visitUOper(), anonymous_namespace{ExpressionRewrite.cpp}::ConstantFoldingVisitor::visitUOper(), DeepCopyVisitor::visitWindowFunction(), and anonymous_namespace{WindowExpressionRewrite.cpp}::window_sum_and_count_match().

82 { return type_info; }
SQLTypeInfo type_info
Definition: Analyzer.h:183
virtual void Analyzer::Expr::group_predicates ( std::list< const Expr * > &  scan_predicates,
std::list< const Expr * > &  join_predicates,
std::list< const Expr * > &  const_predicates 
) const
inlinevirtual
virtual std::shared_ptr<Analyzer::Expr> Analyzer::Expr::normalize_simple_predicate ( int &  rte_idx) const
inlinevirtual

Reimplemented in Analyzer::BinOper.

Definition at line 98 of file Analyzer.h.

98  {
99  rte_idx = -1;
100  return nullptr;
101  }
virtual void Analyzer::Expr::print ( ) const
inlinevirtual

Definition at line 157 of file Analyzer.h.

References toString().

157 { std::cout << toString(); }
virtual std::string toString() const =0

+ Here is the call graph for this function:

virtual std::shared_ptr<Analyzer::Expr> Analyzer::Expr::rewrite_agg_to_var ( const std::vector< std::shared_ptr< TargetEntry >> &  tlist) const
inlinevirtual

Reimplemented in Analyzer::StringOper, Analyzer::DatetruncExpr, Analyzer::DatediffExpr, Analyzer::DateaddExpr, Analyzer::ExtractExpr, Analyzer::CaseExpr, Analyzer::AggExpr, Analyzer::LikelihoodExpr, Analyzer::WidthBucketExpr, Analyzer::RegexpExpr, Analyzer::LikeExpr, Analyzer::CardinalityExpr, Analyzer::SampleRatioExpr, Analyzer::KeyForStringExpr, Analyzer::CharLengthExpr, Analyzer::InValues, Analyzer::Subquery, Analyzer::BinOper, Analyzer::UOper, Analyzer::Var, and Analyzer::ColumnVar.

Definition at line 151 of file Analyzer.h.

References deep_copy().

152  {
153  return deep_copy();
154  }
virtual std::shared_ptr< Analyzer::Expr > deep_copy() const =0

+ Here is the call graph for this function:

virtual std::shared_ptr<Analyzer::Expr> Analyzer::Expr::rewrite_with_child_targetlist ( const std::vector< std::shared_ptr< TargetEntry >> &  tlist) const
inlinevirtual

Reimplemented in Analyzer::StringOper, Analyzer::DatetruncExpr, Analyzer::DatediffExpr, Analyzer::DateaddExpr, Analyzer::ExtractExpr, Analyzer::CaseExpr, Analyzer::AggExpr, Analyzer::LikelihoodExpr, Analyzer::WidthBucketExpr, Analyzer::RegexpExpr, Analyzer::LikeExpr, Analyzer::CardinalityExpr, Analyzer::SampleRatioExpr, Analyzer::KeyForStringExpr, Analyzer::CharLengthExpr, Analyzer::InValues, Analyzer::Subquery, Analyzer::BinOper, Analyzer::UOper, Analyzer::Var, and Analyzer::ColumnVar.

Definition at line 141 of file Analyzer.h.

References deep_copy().

142  {
143  return deep_copy();
144  };
virtual std::shared_ptr< Analyzer::Expr > deep_copy() const =0

+ Here is the call graph for this function:

virtual std::shared_ptr<Analyzer::Expr> Analyzer::Expr::rewrite_with_targetlist ( const std::vector< std::shared_ptr< TargetEntry >> &  tlist) const
inlinevirtual

Reimplemented in Analyzer::StringOper, Analyzer::DatetruncExpr, Analyzer::DatediffExpr, Analyzer::DateaddExpr, Analyzer::ExtractExpr, Analyzer::CaseExpr, Analyzer::AggExpr, Analyzer::LikelihoodExpr, Analyzer::WidthBucketExpr, Analyzer::RegexpExpr, Analyzer::LikeExpr, Analyzer::CardinalityExpr, Analyzer::SampleRatioExpr, Analyzer::KeyForStringExpr, Analyzer::CharLengthExpr, Analyzer::InValues, Analyzer::Subquery, Analyzer::BinOper, Analyzer::UOper, Analyzer::Var, and Analyzer::ColumnVar.

Definition at line 132 of file Analyzer.h.

References deep_copy().

133  {
134  return deep_copy();
135  };
virtual std::shared_ptr< Analyzer::Expr > deep_copy() const =0

+ Here is the call graph for this function:

void Analyzer::Expr::set_contains_agg ( bool  a)
inline

Definition at line 85 of file Analyzer.h.

References anonymous_namespace{Utm.h}::a, and contains_agg.

85 { contains_agg = a; }
constexpr double a
Definition: Utm.h:32
bool contains_agg
Definition: Analyzer.h:184
void Analyzer::Expr::set_type_info ( const SQLTypeInfo ti)
inline

Definition at line 83 of file Analyzer.h.

References type_info.

Referenced by anonymous_namespace{RelAlgExecutor.cpp}::anonymous_namespace{RelAlgExecutor.cpp}::conditionally_change_arg_to_int_type().

83 { type_info = ti; }
SQLTypeInfo type_info
Definition: Analyzer.h:183

+ Here is the caller graph for this function:

Member Data Documentation

SQLTypeInfo Analyzer::Expr::type_info
protected

Definition at line 183 of file Analyzer.h.

Referenced by add_cast(), Analyzer::Constant::add_cast(), Analyzer::UOper::add_cast(), Analyzer::CaseExpr::add_cast(), Analyzer::Constant::cast_from_string(), Analyzer::Constant::cast_number(), Analyzer::Constant::cast_string(), Analyzer::Constant::cast_to_string(), Analyzer::Constant::Constant(), decompress(), Analyzer::ColumnVar::deep_copy(), Analyzer::Var::deep_copy(), Analyzer::Constant::deep_copy(), Analyzer::UOper::deep_copy(), Analyzer::BinOper::deep_copy(), Analyzer::AggExpr::deep_copy(), Analyzer::CaseExpr::deep_copy(), Analyzer::ExtractExpr::deep_copy(), Analyzer::DateaddExpr::deep_copy(), Analyzer::DatediffExpr::deep_copy(), Analyzer::DatetruncExpr::deep_copy(), Analyzer::FunctionOper::deep_copy(), Analyzer::FunctionOperWithCustomTypeHandling::deep_copy(), Analyzer::WindowFunction::deep_copy(), Analyzer::ArrayExpr::deep_copy(), Analyzer::GeoUOper::deep_copy(), Analyzer::GeoBinOper::deep_copy(), Analyzer::GeoConstant::deep_copy(), Analyzer::GeoOperator::deep_copy(), Analyzer::GeoTransformOperator::deep_copy(), Analyzer::Constant::do_cast(), Analyzer::ColumnVar::get_comp_param(), Analyzer::ColumnVar::get_compression(), get_type_info(), Analyzer::ColumnVar::group_predicates(), Analyzer::GeoConstant::makePhysicalConstant(), Analyzer::BinOper::normalize_simple_predicate(), Analyzer::Constant::operator==(), Analyzer::FunctionOper::operator==(), Analyzer::FunctionOperWithCustomTypeHandling::operator==(), Analyzer::GeoConstant::operator==(), Analyzer::GeoConstant::physicalCols(), Analyzer::UOper::rewrite_agg_to_var(), Analyzer::BinOper::rewrite_agg_to_var(), Analyzer::CaseExpr::rewrite_agg_to_var(), Analyzer::ExtractExpr::rewrite_agg_to_var(), Analyzer::DateaddExpr::rewrite_agg_to_var(), Analyzer::DatediffExpr::rewrite_agg_to_var(), Analyzer::DatetruncExpr::rewrite_agg_to_var(), Analyzer::UOper::rewrite_with_child_targetlist(), Analyzer::BinOper::rewrite_with_child_targetlist(), Analyzer::AggExpr::rewrite_with_child_targetlist(), Analyzer::CaseExpr::rewrite_with_child_targetlist(), Analyzer::ExtractExpr::rewrite_with_child_targetlist(), Analyzer::DateaddExpr::rewrite_with_child_targetlist(), Analyzer::DatediffExpr::rewrite_with_child_targetlist(), Analyzer::DatetruncExpr::rewrite_with_child_targetlist(), Analyzer::UOper::rewrite_with_targetlist(), Analyzer::BinOper::rewrite_with_targetlist(), Analyzer::CaseExpr::rewrite_with_targetlist(), Analyzer::ExtractExpr::rewrite_with_targetlist(), Analyzer::DateaddExpr::rewrite_with_targetlist(), Analyzer::DatediffExpr::rewrite_with_targetlist(), Analyzer::DatetruncExpr::rewrite_with_targetlist(), Analyzer::Constant::set_null_value(), set_type_info(), Analyzer::Constant::toString(), Analyzer::UOper::toString(), and Analyzer::Constant::~Constant().


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