datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Migrate documentation for remaining window functions to window_functions.md

Open alamb opened this issue 1 year ago • 3 comments

Is your feature request related to a problem or challenge?

As part of https://github.com/apache/datafusion/issues/12740 this ticket is to migrate all the existing documentation for the above named functions from the static documentation to code and to remove them from the static file.

Here is the current static content:

  • doc source: https://github.com/apache/datafusion/blob/main/docs/source/user-guide/sql/window_functions.md
  • rendered: https://datafusion.apache.org/user-guide/sql/window_functions.html
  • Code source: https://github.com/apache/datafusion/tree/main/datafusion/functions-window/src

Need Functions: (see source)

Describe the solution you'd like

One (or more) PRs that

  1. port the documentation for the above named functions from the static docs to code
  2. Bonus points: add sql examples should be added for all functions
  3. Remove the documentation from the static docs
  4. Run ./dev/update_function_docs.sh to update the dynamic documentation

Here are some example PRs of doing this:

  1. https://github.com/apache/datafusion/pull/12840 from @jonathanc-n
  2. https://github.com/apache/datafusion/pull/12775 from @Omega359
  3. https://github.com/apache/datafusion/pull/12742

Describe alternatives you've considered

No response

Additional context

No response

alamb avatar Oct 15 '24 10:10 alamb

take

buraksenn avatar Oct 15 '24 11:10 buraksenn

I started working on this but I think this needs to be done after #8709 epic finishes since window functions are in progress of refactoring and they need to be refactored such that their documents are added in datafusion/functions-window/src instead of datafusion/expr/src/window_function.rs. I will track those changes and open a PR if it is okay

buraksenn avatar Oct 16 '24 13:10 buraksenn

Thanks @buraksenn -- that sounds great. Thank you

alamb avatar Oct 16 '24 16:10 alamb

Would it be possible to add documentation for lead/lag prior to waiting for all the remaining window functions to be migrated over?

Omega359 avatar Oct 24 '24 13:10 Omega359

@Omega359 added lead/lag window function docs in the PR above

buraksenn avatar Oct 24 '24 14:10 buraksenn

I think this is now done (thank you @buraksenn and @Omega359 )

I am hoping that we can merge https://github.com/apache/datafusion/pull/12938 and then that will prevent any new functions from being added that don't have documentation (aka it will ensure that the ported window functions are documented)

alamb avatar Oct 24 '24 20:10 alamb