OmniSciDB  d2f719934e
 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 553 of file ParserNode.h.

Constructor & Destructor Documentation

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

Definition at line 555 of file ParserNode.h.

std::unique_ptr< Expr > target_value_
Definition: ParserNode.h:573
std::unique_ptr< Expr > upper_bound_
Definition: ParserNode.h:575
std::unique_ptr< Expr > partition_count_
Definition: ParserNode.h:576
char * t
std::unique_ptr< Expr > lower_bound_
Definition: ParserNode.h:574

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 724 of file ParserNode.cpp.

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

727  {
728  auto target_value = target_value_->analyze(catalog, query, allow_tlist_ref);
729  auto lower_bound = lower_bound_->analyze(catalog, query, allow_tlist_ref);
730  auto upper_bound = upper_bound_->analyze(catalog, query, allow_tlist_ref);
731  auto partition_count = partition_count_->analyze(catalog, query, allow_tlist_ref);
732  return WidthBucketExpr::get(target_value, lower_bound, upper_bound, partition_count);
733 }
DEVICE auto upper_bound(ARGS &&...args)
Definition: gpu_enabled.h:123
std::unique_ptr< Expr > target_value_
Definition: ParserNode.h:573
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:735
std::unique_ptr< Expr > upper_bound_
Definition: ParserNode.h:575
std::unique_ptr< Expr > partition_count_
Definition: ParserNode.h:576
DEVICE auto lower_bound(ARGS &&...args)
Definition: gpu_enabled.h:78
std::unique_ptr< Expr > lower_bound_
Definition: ParserNode.h:574

+ 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 735 of file ParserNode.cpp.

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

739  {
740  std::shared_ptr<Analyzer::Expr> result = makeExpr<Analyzer::WidthBucketExpr>(
741  target_value, lower_bound, upper_bound, partition_count);
742  return result;
743 }
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 558 of file ParserNode.h.

References lower_bound_.

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

Definition at line 560 of file ParserNode.h.

References partition_count_.

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

Definition at line 557 of file ParserNode.h.

References target_value_.

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

Definition at line 559 of file ParserNode.h.

References upper_bound_.

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

Implements Parser::Expr.

Definition at line 1561 of file ParserNode.cpp.

1561  {
1562  std::string str = " WIDTH_BUCKET ";
1563  str += target_value_->to_string();
1564  str += " ";
1565  str += lower_bound_->to_string();
1566  str += " ";
1567  str += upper_bound_->to_string();
1568  str += " ";
1569  str += partition_count_->to_string();
1570  str += " ";
1571  return str;
1572 }
std::unique_ptr< Expr > target_value_
Definition: ParserNode.h:573
std::unique_ptr< Expr > upper_bound_
Definition: ParserNode.h:575
std::unique_ptr< Expr > partition_count_
Definition: ParserNode.h:576
std::unique_ptr< Expr > lower_bound_
Definition: ParserNode.h:574

Member Data Documentation

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

Definition at line 574 of file ParserNode.h.

Referenced by get_lower_bound().

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

Definition at line 576 of file ParserNode.h.

Referenced by get_partition_count().

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

Definition at line 573 of file ParserNode.h.

Referenced by get_target_value().

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

Definition at line 575 of file ParserNode.h.

Referenced by get_upper_bound().


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