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::WindowSegmentTree Class Reference
Inheritance diagram for duckdb::WindowSegmentTree:
Collaboration diagram for duckdb::WindowSegmentTree:

Public Member Functions

 WindowSegmentTree (const BoundWindowExpression &wexpr, WindowSharedExpressions &shared)
unique_ptr< GlobalSinkState > GetGlobalState (ClientContext &context, idx_t group_count, const ValidityMask &partition_mask) const override
unique_ptr< LocalSinkState > GetLocalState (ExecutionContext &context, const GlobalSinkState &gstate) const override
void Finalize (ExecutionContext &context, CollectionPtr collection, const FrameStats &stats, OperatorSinkInput &sink) override
void Evaluate (ExecutionContext &context, const DataChunk &bounds, Vector &result, idx_t count, idx_t row_idx, OperatorSinkInput &sink) const override
Public Member Functions inherited from duckdb::WindowAggregator
 WindowAggregator (const BoundWindowExpression &wexpr)
 WindowAggregator (const BoundWindowExpression &wexpr, WindowSharedExpressions &shared)
virtual void Sink (ExecutionContext &context, DataChunk &sink_chunk, DataChunk &coll_chunk, idx_t input_idx, optional_ptr< SelectionVector > filter_sel, idx_t filtered, OperatorSinkInput &sink)

Static Public Member Functions

static bool CanAggregate (const BoundWindowExpression &wexpr)
Static Public Member Functions inherited from duckdb::WindowAggregator
template<typename OP>
static void EvaluateSubFrames (const DataChunk &bounds, const WindowExcludeMode exclude_mode, idx_t count, idx_t row_idx, SubFrames &frames, OP operation)

Additional Inherited Members

Public Types inherited from duckdb::WindowAggregator
using CollectionPtr = optional_ptr<WindowCollection>
Public Attributes inherited from duckdb::WindowAggregator
const BoundWindowExpression & wexpr
 The window function.
const AggregateObject aggr
 A description of the aggregator.
vector< LogicalType > arg_types
 The argument types for the function.
const LogicalType result_type
 The result type of the window function.
const idx_t state_size
 The size of a single aggregate state.
const WindowExcludeMode exclude_mode
 The window exclusion clause.
vector< column_t > child_idx
 Partition collection column indicies.

Constructor & Destructor Documentation

◆ WindowSegmentTree()

duckdb::WindowSegmentTree::WindowSegmentTree ( const BoundWindowExpression & wexpr,
WindowSharedExpressions & shared )
257575 : WindowAggregator(wexpr, shared) {
257576}
const BoundWindowExpression & wexpr
The window function.
Definition duckdb.cpp:164034

Member Function Documentation

◆ CanAggregate()

bool duckdb::WindowSegmentTree::CanAggregate ( const BoundWindowExpression & wexpr)
static
257562 {
257563 if (!wexpr.aggregate) {
257564 return false;
257565 }
257566
257567 if (!wexpr.aggregate->CanAggregate()) {
257568 return false;
257569 }
257570
257571 return !wexpr.distinct && wexpr.arg_orders.empty();
257572}

◆ GetGlobalState()

unique_ptr< GlobalSinkState > duckdb::WindowSegmentTree::GetGlobalState ( ClientContext & context,
idx_t group_count,
const ValidityMask & partition_mask ) const
overridevirtual

Reimplemented from duckdb::WindowAggregator.

257732 {
257733 return make_uniq<WindowSegmentTreeGlobalState>(context, *this, group_count);
257734}

◆ GetLocalState()

unique_ptr< LocalSinkState > duckdb::WindowSegmentTree::GetLocalState ( ExecutionContext & context,
const GlobalSinkState & gstate ) const
overridevirtual

Implements duckdb::WindowAggregator.

257737 {
257738 return make_uniq<WindowSegmentTreeLocalState>(context);
257739}

◆ Finalize()

void duckdb::WindowSegmentTree::Finalize ( ExecutionContext & context,
CollectionPtr collection,
const FrameStats & stats,
OperatorSinkInput & sink )
overridevirtual

Reimplemented from duckdb::WindowAggregator.

257696 {
257697 WindowAggregator::Finalize(context, collection, stats, sink);
257698
257699 auto &gasink = sink.global_state.Cast<WindowSegmentTreeGlobalState>();
257700 ++gasink.finalized;
257701}

◆ Evaluate()

void duckdb::WindowSegmentTree::Evaluate ( ExecutionContext & context,
const DataChunk & bounds,
Vector & result,
idx_t count,
idx_t row_idx,
OperatorSinkInput & sink ) const
overridevirtual

Implements duckdb::WindowAggregator.

257942 {
257943 const auto &gtstate = sink.global_state.Cast<WindowSegmentTreeGlobalState>();
257944 auto &ltstate = sink.local_state.Cast<WindowSegmentTreeLocalState>();
257945 ltstate.Evaluate(context, gtstate, bounds, result, count, row_idx);
257946}

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