Skip to content

docs: Dcument WindowFn and add comments - #24118

Draft
alamb wants to merge 1 commit into
apache:mainfrom
alamb:alamb/document-window-fn
Draft

docs: Dcument WindowFn and add comments#24118
alamb wants to merge 1 commit into
apache:mainfrom
alamb:alamb/document-window-fn

Conversation

@alamb

@alamb alamb commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • N/A (documentation only)

Rationale for this change

The WindowFn enum in datafusion-physical-expr has no documentation, and its Builtin variant name is misleading:

What changes are included in this PR?

Doc comments on WindowFn and its two variants, including links to the WindowExpr implementations that create each variant.

Are these changes tested?

By CI

Are there any user-facing changes?

Improved API documentation only; no code changes.

@github-actions github-actions Bot added the physical-expr Changes to the physical-expr crates label Aug 5, 2026
@alamb
alamb force-pushed the alamb/document-window-fn branch from b7418cb to 69c5f08 Compare August 5, 2026 19:43
@alamb alamb changed the title docs: Document WindowFn and its variants docs: Rename WindowFn to WindowFnState and add comments Aug 5, 2026
@alamb
alamb force-pushed the alamb/document-window-fn branch from 69c5f08 to eaa18f9 Compare August 5, 2026 19:46
@alamb alamb changed the title docs: Rename WindowFn to WindowFnState and add comments docs: Dcument WindowFn and add comments Aug 5, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alamb
alamb force-pushed the alamb/document-window-fn branch from eaa18f9 to f368ba0 Compare August 5, 2026 19:48
/// State for incrementally evaluating a window function
/// within a partition, created by [`WindowExpr::create_window_fn`].
#[derive(Debug)]
pub enum WindowFn {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This struct is not technically pub as it is in a mod (not `pub mod), though it somehow appears in the WindowExpr trait 🤷

It might be nice to fix the naming but I think for now just documenting it is helpful

https://docs.rs/datafusion/latest/datafusion/physical_expr/window/trait.WindowExpr.html#tymethod.create_window_fn

@alamb alamb added the documentation Improvements or additions to documentation label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant