OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Parser::WidthBucketExpr Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::WidthBucketExpr:
+ Collaboration diagram for Parser::WidthBucketExpr:

Public Member Functions

 WidthBucketExpr (Expr *t, Expr *l, Expr *u, Expr *p)
 
const Exprget_target_value () const
 
const Exprget_lower_bound () const
 
const Exprget_upper_bound () const
 
const Exprget_partition_count () const
 
std::shared_ptr< Analyzer::Expranalyze (const Catalog_Namespace::Catalog &catalog, Analyzer::Query &query, TlistRefType allow_tlist_ref=TLIST_NONE) const override
 
std::string to_string () const override
 
- Public Member Functions inherited from Parser::Node
virtual ~Node ()
 

Static Public Member Functions

static std::shared_ptr
< Analyzer::Expr
get (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)
 

Private Attributes

std::unique_ptr< Exprtarget_value_
 
std::unique_ptr< Exprlower_bound_
 
std::unique_ptr< Exprupper_bound_
 
std::unique_ptr< Exprpartition_count_
 

Additional Inherited Members

- Public Types inherited from Parser::Expr
enum  TlistRefType { TLIST_NONE, TLIST_REF, TLIST_COPY }
 

Detailed Description

Definition at line 555 of file ParserNode.h.

Constructor & Destructor Documentation

Parser::WidthBucketExpr::WidthBucketExpr ( Expr t,
Expr l,
Expr u,
Expr p 
)
inline

Definition at line 557 of file ParserNode.h.

std::unique_ptr< Expr > target_value_
Definition: ParserNode.h:575
std::unique_ptr< Expr > upper_bound_
Definition: ParserNode.h:577
std::unique_ptr< Expr > partition_count_
Definition: ParserNode.h:578
std::unique_ptr< Expr > lower_bound_
Definition: ParserNode.h:576

Member Function Documentation

std::shared_ptr< Analyzer::Expr > Parser::WidthBucketExpr::analyze ( const Catalog_Namespace::Catalog catalog,
Analyzer::Query query,
TlistRefType  allow_tlist_ref = TLIST_NONE 
) const
overridevirtual

Implements Parser::Expr.

Definition at line 858 of file ParserNode.cpp.

References gpu_enabled::lower_bound(), and gpu_enabled::upper_bound().

861  {
862  auto target_value = target_value_->analyze(catalog, query, allow_tlist_ref);
863  auto lower_bound = lower_bound_->analyze(catalog, query, allow_tlist_ref);
864  auto upper_bound = upper_bound_->analyze(catalog, query, allow_tlist_ref);
865  auto partition_count = partition_count_->analyze(catalog, query, allow_tlist_ref);
866  return WidthBucketExpr::get(target_value, lower_bound, upper_bound, partition_count);
867 }
DEVICE auto upper_bound(ARGS &&...args)
Definition: gpu_enabled.h:123
std::unique_ptr< Expr > target_value_
Definition: ParserNode.h:575
static std::shared_ptr< Analyzer::Expr > get(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)
Definition: ParserNode.cpp:869
std::unique_ptr< Expr > upper_bound_
Definition: ParserNode.h:577
std::unique_ptr< Expr > partition_count_
Definition: ParserNode.h:578
DEVICE auto lower_bound(ARGS &&...args)
Definition: gpu_enabled.h:78
std::unique_ptr< Expr > lower_bound_
Definition: ParserNode.h:576

+ Here is the call graph for this function:

std::shared_ptr< Analyzer::Expr > Parser::WidthBucketExpr::get ( 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 
)
static

Definition at line 869 of file ParserNode.cpp.

References gpu_enabled::lower_bound(), run_benchmark_import::result, and gpu_enabled::upper_bound().

873  {
874  std::shared_ptr<Analyzer::Expr> result = makeExpr<Analyzer::WidthBucketExpr>(
875  target_value, lower_bound, upper_bound, partition_count);
876  return result;
877 }
DEVICE auto upper_bound(ARGS &&...args)
Definition: gpu_enabled.h:123
DEVICE auto lower_bound(ARGS &&...args)
Definition: gpu_enabled.h:78

+ Here is the call graph for this function:

const Expr* Parser::WidthBucketExpr::get_lower_bound ( ) const
inline

Definition at line 560 of file ParserNode.h.

References lower_bound_.

560 { return lower_bound_.get(); }
std::unique_ptr< Expr > lower_bound_
Definition: ParserNode.h:576
const Expr* Parser::WidthBucketExpr::get_partition_count ( ) const
inline

Definition at line 562 of file ParserNode.h.

References partition_count_.

562 { return partition_count_.get(); }
std::unique_ptr< Expr > partition_count_
Definition: ParserNode.h:578
const Expr* Parser::WidthBucketExpr::get_target_value ( ) const
inline

Definition at line 559 of file ParserNode.h.

References target_value_.

559 { return target_value_.get(); }
std::unique_ptr< Expr > target_value_
Definition: ParserNode.h:575
const Expr* Parser::WidthBucketExpr::get_upper_bound ( ) const
inline

Definition at line 561 of file ParserNode.h.

References upper_bound_.

561 { return upper_bound_.get(); }
std::unique_ptr< Expr > upper_bound_
Definition: ParserNode.h:577
std::string Parser::WidthBucketExpr::to_string ( ) const
overridevirtual

Implements Parser::Expr.

Definition at line 2272 of file ParserNode.cpp.

2272  {
2273  std::string str = " WIDTH_BUCKET ";
2274  str += target_value_->to_string();
2275  str += " ";
2276  str += lower_bound_->to_string();
2277  str += " ";
2278  str += upper_bound_->to_string();
2279  str += " ";
2280  str += partition_count_->to_string();
2281  str += " ";
2282  return str;
2283 }
std::unique_ptr< Expr > target_value_
Definition: ParserNode.h:575
std::unique_ptr< Expr > upper_bound_
Definition: ParserNode.h:577
std::unique_ptr< Expr > partition_count_
Definition: ParserNode.h:578
std::unique_ptr< Expr > lower_bound_
Definition: ParserNode.h:576

Member Data Documentation

std::unique_ptr<Expr> Parser::WidthBucketExpr::lower_bound_
private

Definition at line 576 of file ParserNode.h.

Referenced by get_lower_bound().

std::unique_ptr<Expr> Parser::WidthBucketExpr::partition_count_
private

Definition at line 578 of file ParserNode.h.

Referenced by get_partition_count().

std::unique_ptr<Expr> Parser::WidthBucketExpr::target_value_
private

Definition at line 575 of file ParserNode.h.

Referenced by get_target_value().

std::unique_ptr<Expr> Parser::WidthBucketExpr::upper_bound_
private

Definition at line 577 of file ParserNode.h.

Referenced by get_upper_bound().


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