-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs: Update HOWTOs for adding new functions #18089
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
base: main
Are you sure you want to change the base?
Conversation
## 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to consolidate with the Adding new functions
section above as it has same steps
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to add what exactly needed to implement from GroupsAccumulator
to achieve performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to keep this to high level steps; ideally such details would be present in the GroupsAccumulator
doc itself in my opinion
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact the CI will also complain :)
## 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to provide relative path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the sh block below 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Jefffrey
Co-authored-by: Oleks V <[email protected]>
Co-authored-by: Oleks V <[email protected]>
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.