Skip to content
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

Remove old static documentation function pages (Aggregate/Scalar) #12741

Closed
Tracked by #12740
alamb opened this issue Oct 3, 2024 · 6 comments · Fixed by #13161
Closed
Tracked by #12740

Remove old static documentation function pages (Aggregate/Scalar) #12741

alamb opened this issue Oct 3, 2024 · 6 comments · Fixed by #13161
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented Oct 3, 2024

Part of #12740

Is your feature request related to a problem or challenge?

@Omega359 added the infrastructure to automatically create documentation from code in #12668

For a while this will result in a transition period where we have two copies of most function documentation:

  1. A "static" one (e.g. https://datafusion.apache.org/user-guide/sql/scalar_functions.html)
  2. A "auto generated" one (e.g. TODO WHEN MERGED)

Describe the solution you'd like

Once all the documentation for functions has been migrated to the new auto generated pages, we should remove the static pages

Describe alternatives you've considered

Basically this means for the scalar, window and aggregate functions:

  1. Delete the static file docs/source/user-guide/sql/scalar_functions.md
  2. Rename the _new files like docs/source/user-guide/sql/scalar_functions_new.md to docs/source/user-guide/sql/scalar_functions.md
  3. Update the index page docs/source/user-guide/sql/index.rst to remove the _new entries
  4. Update the script dev/update_function_docs.sh so it writes to the scalar_functions.md file

Additional context

We need to complete porting all documentation first

@alamb alamb added the enhancement New feature or request label Oct 3, 2024
@alamb alamb added the good first issue Good for newcomers label Oct 26, 2024
@alamb
Copy link
Contributor Author

alamb commented Oct 26, 2024

I think we are in the position that someone could pretty easily remove the Aggregate and Scalar functions page. We need to wait for #8709 before we can remove the window function one (but @jcsherin and @jatin510 are pretty close)

https://datafusion.apache.org/user-guide/sql/index.html

Screenshot 2024-10-26 at 6 32 09 AM
Screenshot 2024-10-26 at 6 32 13 AM

@Omega359
Copy link
Contributor

My only concern is what to do with the functions that have postgresql-style syntax options (2 of which are still on the scalar doc page):

  • extract - it's data_part, but with different syntax
  • position - it's strpos, but with different syntax
  • substring, it's substr, but with different syntax
  • trim, it's one of the trim functions, but with different syntax

Should we put those into the special functions page?

@jonathanc-n
Copy link
Contributor

@Omega359 I'm thinking we can probably put them as aliases?

@Omega359
Copy link
Contributor

That may work though it doesn't help in documenting the difference in syntax. I was also wondering about add an alternative_syntax(...) section to the Documentation struct for functions like these.

@jonathanc-n
Copy link
Contributor

Yeah that could work, I can add an issue for that.

@Omega359
Copy link
Contributor

take

@alamb alamb changed the title Remove old static function pages Remove old static documentation function pages (Aggregate/Scalar) Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
3 participants