docs: Update HOWTOs for adding new functions#18089
Merged
Jefffrey merged 7 commits intoapache:mainfrom Oct 24, 2025
Merged
Conversation
Jefffrey
commented
Oct 16, 2025
Comment on lines
-156
to
-166
| ## How to add/edit documentation for UDFs | ||
|
|
||
| Documentations for the UDF documentations are generated from code (related [github issue]). To generate markdown run `./update_function_docs.sh`. | ||
|
|
||
| This is necessary after adding new UDF implementation or modifying existing implementation which requires to update documentation. | ||
|
|
||
| ```bash | ||
| ./dev/update_function_docs.sh | ||
| ``` | ||
|
|
||
| [github issue]: https://github.com/apache/datafusion/issues/12740 |
Contributor
Author
There was a problem hiding this comment.
Decided to consolidate with the Adding new functions section above as it has same steps
comphead
reviewed
Oct 16, 2025
comphead
reviewed
Oct 16, 2025
| - Scalar functions are further grouped into modules for families of functions (e.g. string, math, datetime). | ||
| Functions should be added to the relevant module; if a new module needs to be created then a new [Rust feature] | ||
| should also be added to allow DataFusion users to conditionally compile the modules as needed | ||
| - Aggregate functions can optionally implement a [`GroupsAccumulator`] for better performance |
Contributor
There was a problem hiding this comment.
would be nice to add what exactly needed to implement from GroupsAccumulator to achieve performance
Contributor
Author
There was a problem hiding this comment.
I prefer to keep this to high level steps; ideally such details would be present in the GroupsAccumulator doc itself in my opinion
comphead
reviewed
Oct 16, 2025
comphead
reviewed
Oct 16, 2025
| markdown document [here][fn-doc-home] (see the documents for [scalar][fn-doc-scalar], | ||
| [aggregate][fn-doc-aggregate] and [window][fn-doc-window] functions) | ||
|
|
||
| - You _should not_ manually update the markdown document after running the script as those manual |
Contributor
There was a problem hiding this comment.
In fact the CI will also complain :)
comphead
reviewed
Oct 16, 2025
| ## How to update protobuf/gen dependencies | ||
|
|
||
| The prost/tonic code can be generated by running `./regen.sh`, which in turn invokes the Rust binary located in `./gen` | ||
| For the `proto` and `proto-common` crates, the prost/tonic code is generated by running their respective `./regen.sh` scripts, |
Contributor
There was a problem hiding this comment.
would be nice to provide relative path
Contributor
Author
There was a problem hiding this comment.
Updated the sh block below 👍
comphead
reviewed
Oct 16, 2025
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
comphead
approved these changes
Oct 23, 2025
tschwarzinger
pushed a commit
to tschwarzinger/datafusion
that referenced
this pull request
Nov 2, 2025
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes apache#123` indicates that this PR will close issue apache#123. --> - Closes apache#12220 ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> Updating documentation on adding new functions; aggregate instructions were old, and adding in other types too (window, table) ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Updated instructions for adding new functions to DataFusion. Also did some other touchups on the docs. ## Are these changes tested? Doc changes only. <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? Doc changes only. <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> --------- Co-authored-by: Oleks V <comphead@users.noreply.github.com>
EeshanBembi
pushed a commit
to EeshanBembi/datafusion
that referenced
this pull request
Nov 24, 2025
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes apache#123` indicates that this PR will close issue apache#123. --> - Closes apache#12220 ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> Updating documentation on adding new functions; aggregate instructions were old, and adding in other types too (window, table) ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Updated instructions for adding new functions to DataFusion. Also did some other touchups on the docs. ## Are these changes tested? Doc changes only. <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? Doc changes only. <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> --------- Co-authored-by: Oleks V <comphead@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Updating documentation on adding new functions; aggregate instructions were old, and adding in other types too (window, table)
What changes are included in this PR?
Updated instructions for adding new functions to DataFusion. Also did some other touchups on the docs.
Are these changes tested?
Doc changes only.
Are there any user-facing changes?
Doc changes only.