You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2025/10/04 03:12:52 UTC

[I] docs: Generate SQL documentation reference [sedona-db]

paleolimbot opened a new issue, #180:
URL: https://github.com/apache/sedona-db/issues/180

   Our existing SQL documentation works but is tricky to keep up-to-date with changes to sedona-functions!
   
   https://github.com/apache/sedona-db/blob/11e299392b4d5bd17281dd4892ece764b8138795/docs/reference/sql.md#L20-L26
   
   This file was initially generated from the documentation we've been keeping inline in the functions themselves. For example:
   
   https://github.com/apache/sedona-db/blob/11e299392b4d5bd17281dd4892ece764b8138795/rust/sedona-functions/src/st_dimension.rs#L41-L50
   
   We can recreate the script we used to generate the initial reference section to ensure we keep this all up to date (and potentially generate reference pages for R and Python when we have function wrappers there). Alternatively we could go in the other direction (have extremely carefully formatted markdown reference that we parse into Rust, R, and Python documentation).
   
   It would also be great to have one page per function to allow these pages room to grow as we accumulate experience and examples with these functions!


-- 
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: issues-unsubscribe@sedona.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] docs: Generate SQL documentation reference [sedona-db]

Posted by "yutannihilation (via GitHub)" <gi...@apache.org>.
yutannihilation commented on issue #180:
URL: https://github.com/apache/sedona-db/issues/180#issuecomment-3583449646

   Nice usage of Quarto! Regarding metadata such as changes between versions (e.g. https://github.com/apache/sedona-db/pull/368#discussion_r2565556763), the `description` stores all the information? Or, should it be stored in some other file?


-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] docs: Generate SQL documentation reference [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #180:
URL: https://github.com/apache/sedona-db/issues/180#issuecomment-3584241524

   Currently the only thing that is actually rendered to the docs site is the Markdown file that's edited in that PR. I think initially it was rendered using the `description`s in rust/sedona-functions but may have evolved a little. Probably it would make it easier for contributors to go in the other direction (derive the DataFusion `Documentation` from the markdown file or maybe even just provide a permalink) but really anything that improves on the current situation would be great.


-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] docs: Generate SQL documentation reference [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #180:
URL: https://github.com/apache/sedona-db/issues/180#issuecomment-3581912331

   There are a few potentially useful things we can do here. First, we could formalize the script we use to generate the one file (this would probably be a good time to also split up everything so we have one markdown file per function. I just found this out but apparently it's available from the information schema:
   
   ```python
   import sedona.db
   
   sd = sedona.db.connect()
   
   sd.sql("""
   SELECT DISTINCT routine_name 
   FROM information_schema.routines 
   WHERE routine_type = 'FUNCTION' AND routine_name LIKE 'st%'
   ORDER BY routine_name
   """).show()
   #> ┌────────────────┐
   #> │  routine_name  │
   #> │      utf8      │
   #> ╞════════════════╡
   #> │ st_analyze_agg │
   #> ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
   #> │ st_area        │
   #> ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
   #> │ st_asbinary    │
   #> ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
   ```
   
   I think after we do that generation we might want to have the individual markdown files be the canonical documentation for that function. We can make them `.qmd` files and use Quarto to execute them (among other things, this would let us include plot output in the results so we could visualize some of these functions!).


-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] docs: Generate SQL documentation reference [sedona-db]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #180:
URL: https://github.com/apache/sedona-db/issues/180#issuecomment-3582842810

   (Credit to @petern48 for the SQL to make this happen!)


-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] docs: Generate SQL documentation reference [sedona-db]

Posted by "petern48 (via GitHub)" <gi...@apache.org>.
petern48 commented on issue #180:
URL: https://github.com/apache/sedona-db/issues/180#issuecomment-3648916995

   Relevant: https://github.com/apache/datafusion/issues/19294 (Automatically generate examples documentation in datafusion)


-- 
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: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org