-
Notifications
You must be signed in to change notification settings - Fork 38
chore(docs): Add a validation script for SQL reference #428
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
paleolimbot
left a comment
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 know you're still working here...this is great! Even as we restructure the SQL docs these checks are great to have will still apply somewhere.
This could get run in https://github.com/apache/sedona-db/blob/main/ci/scripts/build-docs.sh so that we can enforce this in CI.
Co-authored-by: Dewey Dunnington <[email protected]>
|
Thanks! Yeah, it's always good to have a validation. What I'm still wondering is when we should enforce it... Before making this check mandatory, I hope this script can have some functionality to insert the new section to |
| WHEN 'rs' THEN 'raster' | ||
| ELSE 'unknown' | ||
| END AS data_type, | ||
| count(*) OVER (PARTITION BY description) > 1 as has_alias |
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.
It seems the information about aliases cannot be retrieved by SQL. I added a tweak to guess it from description, but I'm not sure if this is reliable enough.
I might rewrite the validation script by using Rust just like DataFusion does to generate the documentation.
Related to #180.
It seems it's a bit hard to tackle #180 directly, so this pull request adds a simple validation script to check if the document reflects the implementation correctly. This checks, (1) if the functions listed in the reference matches with the actual implementation, and (2) if the functions are sorted in alphabetical order.
I need to check if each one is actual problem or just a false-positive, but this is the current result:
TODO:
sql.md