alamb commented on PR #19367: URL: https://github.com/apache/datafusion/pull/19367#issuecomment-4415112764
> Thank you for working on this. > > I feel the current solution may be hard to maintain if we rely on macros. > > Ideally, each metric should expose a required `doc` API, so the documentation can be generated more directly and reliably. The challenge is that metric sets are currently built at runtime. 🤔 > > I don't think this is something AI can implement directly with a trivial prompt now. We may need to first do some plumbing, figure out the right design, and then carry it out gradually. I agree with @2010YOUY01 -- Thank you @aaron-ang What I would suggest we do is something similar to what @Omega359 did for the function comments 1. Make an api similar to [`Documentation`](https://docs.rs/datafusion/latest/datafusion/logical_expr/struct.Documentation.html) / [ScalarUDFImpl::documentation](https://docs.rs/datafusion/latest/datafusion/logical_expr/trait.ScalarUDFImpl.html#method.documentation) 2. Implement that API for the different metrics that we have 3. Update `dev/update_function_docs.sh` so it uses that new API to automatically generate the API docs If we want to pursue this strategy I suggest this implementation order 1. A Proof of Concept PR that shows how the plumbng would work (no need to actually put docs in for all metrics yet) 2. THen we'll break it up itno smaller PRs for review (API, registry, script/docs, etc) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
