OmniSciDB
c1a53651b2
|
#include <Analyzer.h>
Public Member Functions | |
WidthBucketExpr (const std::shared_ptr< Analyzer::Expr > target_value, const std::shared_ptr< Analyzer::Expr > lower_bound, const std::shared_ptr< Analyzer::Expr > upper_bound, const std::shared_ptr< Analyzer::Expr > partition_count) | |
const Expr * | get_target_value () const |
const Expr * | get_lower_bound () const |
const Expr * | get_upper_bound () const |
const Expr * | get_partition_count () const |
std::shared_ptr< Analyzer::Expr > | deep_copy () const override |
void | group_predicates (std::list< const Expr * > &scan_predicates, std::list< const Expr * > &join_predicates, std::list< const Expr * > &const_predicates) const override |
void | collect_rte_idx (std::set< int > &rte_idx_set) const override |
void | collect_column_var (std::set< const ColumnVar *, bool(*)(const ColumnVar *, const ColumnVar *)> &colvar_set, bool include_agg) const override |
std::shared_ptr< Analyzer::Expr > | rewrite_with_targetlist (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const override |
std::shared_ptr< Analyzer::Expr > | rewrite_with_child_targetlist (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const override |
std::shared_ptr< Analyzer::Expr > | rewrite_agg_to_var (const std::vector< std::shared_ptr< TargetEntry >> &tlist) const override |
double | get_bound_val (const Analyzer::Expr *bound_expr) const |
int32_t | get_partition_count_val () const |
template<typename T > | |
int32_t | compute_bucket (T target_const_val, SQLTypeInfo &ti) const |
bool | operator== (const Expr &rhs) const override |
std::string | toString () const override |
void | find_expr (std::function< bool(const Expr *)> f, std::list< const Expr * > &expr_list) const override |
bool | can_skip_out_of_bound_check () const |
void | skip_out_of_bound_check () const |
void | set_constant_expr () const |
bool | is_constant_expr () const |
![]() | |
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::Expr > | get_shared_ptr () |
const SQLTypeInfo & | get_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 size_t | get_num_column_vars (const bool include_agg) const |
virtual void | print () const |
virtual void | add_unique (std::list< const Expr * > &expr_list) const |
std::shared_ptr< Analyzer::Expr > | decompress () |
virtual void | get_domain (DomainSet &domain_set) const |
Private Attributes | |
std::shared_ptr< Analyzer::Expr > | target_value_ |
std::shared_ptr< Analyzer::Expr > | lower_bound_ |
std::shared_ptr< Analyzer::Expr > | upper_bound_ |
std::shared_ptr< Analyzer::Expr > | partition_count_ |
bool | constant_expr_ |
bool | skip_out_of_bound_check_ |
Additional Inherited Members | |
![]() | |
SQLTypeInfo | type_info |
bool | contains_agg |
Definition at line 1033 of file Analyzer.h.
|
inline |
Definition at line 1035 of file Analyzer.h.
|
inline |
Definition at line 1121 of file Analyzer.h.
References skip_out_of_bound_check_.
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenConstantWidthBucketExpr(), and CodeGenerator::codegenWidthBucketExpr().
|
inlineoverridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1057 of file Analyzer.h.
References target_value_.
|
inlineoverridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1054 of file Analyzer.h.
References target_value_.
|
inline |
Definition at line 1087 of file Analyzer.h.
References get_bound_val(), get_partition_count_val(), inline_fp_null_val(), inline_int_null_val(), SQLTypeInfo::is_integer(), lower_bound_, run_benchmark_import::res, heavydb.dtypes::T, and upper_bound_.
Referenced by getExpressionRange().
|
overridevirtual |
Implements Analyzer::Expr.
Definition at line 166 of file Analyzer.cpp.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
overridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 3230 of file Analyzer.cpp.
References Analyzer::Expr::add_unique(), anonymous_namespace{Utm.h}::f, lower_bound_, partition_count_, target_value_, and upper_bound_.
double Analyzer::WidthBucketExpr::get_bound_val | ( | const Analyzer::Expr * | bound_expr | ) | const |
Definition at line 3752 of file Analyzer.cpp.
References CHECK, Analyzer::Expr::deep_copy(), and kDOUBLE.
Referenced by CodeGenerator::codegenConstantWidthBucketExpr(), and compute_bucket().
|
inline |
Definition at line 1047 of file Analyzer.h.
References lower_bound_.
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenConstantWidthBucketExpr(), CodeGenerator::codegenWidthBucketExpr(), operator==(), DeepCopyVisitor::visitWidthBucket(), and ScalarExprVisitor< std::set< shared::TableKey > >::visitWidthBucket().
|
inline |
Definition at line 1049 of file Analyzer.h.
References partition_count_.
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenConstantWidthBucketExpr(), CodeGenerator::codegenWidthBucketExpr(), getExpressionRange(), operator==(), DeepCopyVisitor::visitWidthBucket(), and ScalarExprVisitor< std::set< shared::TableKey > >::visitWidthBucket().
int32_t Analyzer::WidthBucketExpr::get_partition_count_val | ( | ) | const |
Definition at line 3762 of file Analyzer.cpp.
References Analyzer::Constant::get_constval(), kBIGINT, kINT, kSMALLINT, kTINYINT, and partition_count_.
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenConstantWidthBucketExpr(), compute_bucket(), and getExpressionRange().
|
inline |
Definition at line 1046 of file Analyzer.h.
References target_value_.
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenConstantWidthBucketExpr(), CodeGenerator::codegenWidthBucketExpr(), getExpressionRange(), operator==(), DeepCopyVisitor::visitWidthBucket(), and ScalarExprVisitor< std::set< shared::TableKey > >::visitWidthBucket().
|
inline |
Definition at line 1048 of file Analyzer.h.
References upper_bound_.
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenConstantWidthBucketExpr(), CodeGenerator::codegenWidthBucketExpr(), operator==(), DeepCopyVisitor::visitWidthBucket(), and ScalarExprVisitor< std::set< shared::TableKey > >::visitWidthBucket().
|
overridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1784 of file Analyzer.cpp.
References target_value_.
|
inline |
Definition at line 1124 of file Analyzer.h.
References constant_expr_.
Referenced by CodeGenerator::codegen(), and getExpressionRange().
|
overridevirtual |
Implements Analyzer::Expr.
Definition at line 2402 of file Analyzer.cpp.
References get_lower_bound(), get_partition_count(), get_target_value(), get_upper_bound(), lower_bound_, partition_count_, target_value_, and upper_bound_.
|
inlineoverridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1077 of file Analyzer.h.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
inlineoverridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1070 of file Analyzer.h.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
inlineoverridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1063 of file Analyzer.h.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
inline |
Definition at line 1123 of file Analyzer.h.
References constant_expr_.
Referenced by CodeGenerator::codegen().
|
inline |
Definition at line 1122 of file Analyzer.h.
References skip_out_of_bound_check_.
Referenced by CodeGenerator::codegen().
|
overridevirtual |
Implements Analyzer::Expr.
Definition at line 2871 of file Analyzer.cpp.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
mutableprivate |
Definition at line 1132 of file Analyzer.h.
Referenced by is_constant_expr(), and set_constant_expr().
|
private |
Definition at line 1128 of file Analyzer.h.
Referenced by compute_bucket(), deep_copy(), find_expr(), get_lower_bound(), operator==(), rewrite_agg_to_var(), rewrite_with_child_targetlist(), rewrite_with_targetlist(), and toString().
|
private |
Definition at line 1130 of file Analyzer.h.
Referenced by deep_copy(), find_expr(), get_partition_count(), get_partition_count_val(), operator==(), rewrite_agg_to_var(), rewrite_with_child_targetlist(), rewrite_with_targetlist(), and toString().
|
mutableprivate |
Definition at line 1134 of file Analyzer.h.
Referenced by can_skip_out_of_bound_check(), and skip_out_of_bound_check().
|
private |
Definition at line 1127 of file Analyzer.h.
Referenced by collect_column_var(), collect_rte_idx(), deep_copy(), find_expr(), get_target_value(), group_predicates(), operator==(), rewrite_agg_to_var(), rewrite_with_child_targetlist(), rewrite_with_targetlist(), and toString().
|
private |
Definition at line 1129 of file Analyzer.h.
Referenced by compute_bucket(), deep_copy(), find_expr(), get_upper_bound(), operator==(), rewrite_agg_to_var(), rewrite_with_child_targetlist(), rewrite_with_targetlist(), and toString().