Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::DistinctWindowedOptimizer Class Reference
Inheritance diagram for duckdb::DistinctWindowedOptimizer:
Collaboration diagram for duckdb::DistinctWindowedOptimizer:

Public Member Functions

 DistinctWindowedOptimizer (ExpressionRewriter &rewriter)
unique_ptr< Expression > Apply (LogicalOperator &op, vector< reference< Expression > > &bindings, bool &changes_made, bool is_root) override
Public Member Functions inherited from duckdb::Rule
 Rule (ExpressionRewriter &rewriter)
ClientContext & GetContext () const

Static Public Member Functions

static unique_ptr< Expression > Apply (ClientContext &context, BoundWindowExpression &wexpr, bool &changes_made)

Additional Inherited Members

Public Attributes inherited from duckdb::Rule
ExpressionRewriter & rewriter
 The expression rewriter this rule belongs to.
unique_ptr< ExpressionMatcher > root
 The expression matcher of the rule.

Constructor & Destructor Documentation

◆ DistinctWindowedOptimizer()

duckdb::DistinctWindowedOptimizer::DistinctWindowedOptimizer ( ExpressionRewriter & rewriter)
explicit
320716 : Rule(rewriter) {
320717 root = make_uniq<ExpressionMatcher>();
320718 root->expr_class = ExpressionClass::BOUND_WINDOW;
320719}
ExpressionRewriter & rewriter
The expression rewriter this rule belongs to.
Definition duckdb.cpp:69564
unique_ptr< ExpressionMatcher > root
The expression matcher of the rule.
Definition duckdb.cpp:69566

Member Function Documentation

◆ Apply() [1/2]

unique_ptr< Expression > duckdb::DistinctWindowedOptimizer::Apply ( ClientContext & context,
BoundWindowExpression & wexpr,
bool & changes_made )
static
320722 {
320723 if (!wexpr.distinct) {
320724 // no DISTINCT defined
320725 return nullptr;
320726 }
320727 if (!wexpr.aggregate) {
320728 // not an aggregate
320729 return nullptr;
320730 }
320731 if (wexpr.aggregate->GetDistinctDependent() == AggregateDistinctDependent::NOT_DISTINCT_DEPENDENT) {
320732 // not a distinct-sensitive aggregate but we have an DISTINCT modifier - remove it
320733 wexpr.distinct = false;
320734 changes_made = true;
320735 return nullptr;
320736 }
320737 return nullptr;
320738}

◆ Apply() [2/2]

unique_ptr< Expression > duckdb::DistinctWindowedOptimizer::Apply ( LogicalOperator & op,
vector< reference< Expression > > & bindings,
bool & changes_made,
bool is_root )
overridevirtual

Implements duckdb::Rule.

320741 {
320742 auto &wexpr = bindings[0].get().Cast<BoundWindowExpression>();
320743 return Apply(rewriter.context, wexpr, changes_made);
320744}

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