OmniSciDB
a5dc49c757
|
#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 |
int32_t | compute_bucket (double target_const_val) 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 |
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::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 | |
Protected Attributes inherited from Analyzer::Expr | |
SQLTypeInfo | type_info |
bool | contains_agg |
Definition at line 1185 of file Analyzer.h.
|
inline |
Definition at line 1187 of file Analyzer.h.
|
inline |
Definition at line 1243 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 1209 of file Analyzer.h.
References target_value_.
|
inlineoverridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1206 of file Analyzer.h.
References target_value_.
int32_t Analyzer::WidthBucketExpr::compute_bucket | ( | double | target_const_val | ) | const |
Definition at line 3991 of file Analyzer.cpp.
References get_bound_val(), get_partition_count_val(), inline_fp_null_val(), kDOUBLE, gpu_enabled::lower_bound(), lower_bound_, Analyzer::anonymous_namespace{Analyzer.cpp}::ordered_bucket(), gpu_enabled::upper_bound(), and upper_bound_.
Referenced by getExpressionRange().
|
overridevirtual |
Implements Analyzer::Expr.
Definition at line 183 of file Analyzer.cpp.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
overridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 3384 of file Analyzer.cpp.
References Analyzer::Expr::add_unique(), 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 3936 of file Analyzer.cpp.
References CHECK, Analyzer::Expr::deep_copy(), and kDOUBLE.
Referenced by CodeGenerator::codegenConstantWidthBucketExpr(), and compute_bucket().
|
inline |
Definition at line 1199 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 1201 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 3946 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 1198 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 1200 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 1843 of file Analyzer.cpp.
References target_value_.
|
inline |
Definition at line 1246 of file Analyzer.h.
References constant_expr_.
Referenced by CodeGenerator::codegen(), and getExpressionRange().
|
overridevirtual |
Implements Analyzer::Expr.
Definition at line 2505 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 1229 of file Analyzer.h.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
inlineoverridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1222 of file Analyzer.h.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
inlineoverridevirtual |
Reimplemented from Analyzer::Expr.
Definition at line 1215 of file Analyzer.h.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
inline |
Definition at line 1245 of file Analyzer.h.
References constant_expr_.
Referenced by CodeGenerator::codegen().
|
inline |
Definition at line 1244 of file Analyzer.h.
References skip_out_of_bound_check_.
Referenced by CodeGenerator::codegen().
|
overridevirtual |
Implements Analyzer::Expr.
Definition at line 3000 of file Analyzer.cpp.
References lower_bound_, partition_count_, target_value_, and upper_bound_.
|
mutableprivate |
Definition at line 1254 of file Analyzer.h.
Referenced by is_constant_expr(), and set_constant_expr().
|
private |
Definition at line 1250 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 1252 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 1256 of file Analyzer.h.
Referenced by can_skip_out_of_bound_check(), and skip_out_of_bound_check().
|
private |
Definition at line 1249 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 1251 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().