andygrove opened a new pull request, #115:
URL: https://github.com/apache/datafusion-spark/pull/115

   Part of #55
   
   ## Rationale
   
   The recent `#[user_doc]` PRs (#58, #103–#107) attach user documentation to 
most functions, but nothing in the repo renders it. `cargo doc` doesn't show it 
either, since `#[user_doc]` builds a runtime `Documentation` value rather than 
rustdoc, and those PRs cut the rustdoc down to a one-line summary. So the docs 
can't be read anywhere yet.
   
   ## Changes
   
   - Add `crates/docgen` (`datafusion-spark-docgen`, `publish = false`) with a 
`print_functions_docs` binary. It is based on DataFusion's 
`print_functions_docs`. It prints Markdown for all scalar, aggregate and window 
functions returned by `all_default_*_functions()`, grouped by doc section, with 
arguments, examples, alternative syntax and aliases.
     - Sections follow DataFusion's order. Sections DataFusion doesn't define 
(`JSON Functions`, `URL Functions`) come after, sorted by label.
     - Unlike DataFusion, it doesn't fail on undocumented functions, because 
#55 is still in progress. It lists them on stderr instead (11 right now: 
`array_contains`, `map_from_arrays`, `map_from_entries`, `mod`, `monthname`, 
`parse_url`, `pmod`, `spark_cast`, `str_to_map`, `try_parse_url`, `xxhash64`).
   - Add `dev/update_function_docs.sh`, which writes `docs/functions.md`, and 
commit the generated file.
   - Add a `function docs up to date` job to `lint.yml` that regenerates the 
file and fails if it differs from the committed one.
   - Document the workflow in `CONTRIBUTING.md` and `AGENTS.md`.
   
   The published `datafusion-spark` crate is unchanged.
   
   ## Testing
   
   - `cargo fmt --all -- --check`, `cargo clippy --all-targets --all-features 
--workspace -- -D warnings`, `cargo test -p datafusion-spark` and `cargo test 
-p datafusion-spark-sqllogictest` pass.
   - Ran `dev/update_function_docs.sh` and checked the rendered 
`docs/functions.md`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to