Skip to content

Minor: Add documentation to AggregateWindowExpr::get_result_column #16479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion datafusion/physical-expr/src/window/window_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub struct WindowPhysicalExpressions {
}

/// Extension trait that adds common functionality to [`AggregateWindowExpr`]s
pub trait AggregateWindowExpr: WindowExpr {
pub trait : WindowExpr {
/// Get the accumulator for the window expression. Note that distinct
/// window expressions may return distinct accumulators; e.g. sliding
/// (non-sliding) expressions will return sliding (normal) accumulators.
Expand Down Expand Up @@ -263,6 +263,15 @@ pub trait AggregateWindowExpr: WindowExpr {

/// Calculates the window expression result for the given record batch.
/// Assumes that `record_batch` belongs to a single partition.
///
/// # Arguments
/// * `accumulator`: The accumulator to use for the calculation.
/// * `record_batch`: batch belonging to the current partition (see [`PartitionBatchState`]).
/// * `most_recent_row`: the batch that contains the most recent row, if available (see [`PartitionBatchState`]).
/// * `last_range`: The last range of rows that were processed (see [`WindowAggState`]).
/// * `window_frame_ctx`: Details about the window frame (see [`WindowFrameContext`]).
/// * `idx`: The index of the current row in the record batch.
/// * `not_end`: is the current row not the end of the partition (see [`PartitionBatchState`]).
#[allow(clippy::too_many_arguments)]
fn get_result_column(
&self,
Expand Down
Loading