OmniSciDB  a5dc49c757
 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 859 of file ParserNode.cpp.

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

862  {
863  auto target_value = target_value_->analyze(catalog, query, allow_tlist_ref);
864  auto lower_bound = lower_bound_->analyze(catalog, query, allow_tlist_ref);
865  auto upper_bound = upper_bound_->analyze(catalog, query, allow_tlist_ref);
866  auto partition_count = partition_count_->analyze(catalog, query, allow_tlist_ref);
867  return WidthBucketExpr::get(target_value, lower_bound, upper_bound, partition_count);
868 }
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:870
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 870 of file ParserNode.cpp.

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

874  {
875  std::shared_ptr<Analyzer::Expr> result = makeExpr<Analyzer::WidthBucketExpr>(
876  target_value, lower_bound, upper_bound, partition_count);
877  return result;
878 }
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 2282 of file ParserNode.cpp.

2282  {
2283  std::string str = " WIDTH_BUCKET ";
2284  str += target_value_->to_string();
2285  str += " ";
2286  str += lower_bound_->to_string();
2287  str += " ";
2288  str += upper_bound_->to_string();
2289  str += " ";
2290  str += partition_count_->to_string();
2291  str += " ";
2292  return str;
2293 }
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: