-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-31390][SQL][DOCS] Document Window Function #28157
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
Conversation
cc @maropu Could you please review? Thanks a lot! |
Test build #120990 has finished for PR 28157 at commit
|
// |Chloe|Engineering| 23000| | ||
// +-----+-----------+------+ | ||
|
||
val windowSpec = Window.partitionBy("dept").orderBy("salary") |
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.
We don't need to write this document in the same SQL way with #28120?
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 will make it consistent with Kevin's PR. I really want to keep the function tables simple, though, because the user can refer to API docs for details. Are you OK with the functions tables, or you want me to change those too?
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.
Ah, I see. I personally think its better to follow the SQL format here, too.
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.
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.
oh, my bad. Yea, the consistent format is better, so I personally think its better to follow the Kevin's format.
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 really want to keep the function tables simple, though, because the user can refer to API docs for details.
Probably, users who wanna see simpler built-in function docs can check
https://spark.apache.org/docs/3.0.0-preview/api/sql/index.html. So, I think it is better to write this page as detailed as possible.
docs/sql-ref-functions-builtin.md
Outdated
* [Aggregate Functions](sql-ref-functions-builtin-aggregate.html) | ||
* [Array Functions](sql-ref-functions-builtin-array.html) | ||
* [Date and Time Functions](sql-ref-functions-builtin-date-time.html) | ||
Spark SQL defines built-in functions to use, a complete list of which can be found [here](api/sql/). Among them, Spark SQL has several special categories of built-in functions: [Aggregate Functions](sql-ref-functions-builtin-aggregate.html) to operate on a group of rows and return a single value, and [Window Functions](sql-ref-functions-builtin-window.html) to operate on a group of rows but return values for each row in the group. |
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.
nit: add a blank line here.
Test build #121060 has finished for PR 28157 at commit
|
Discussed with @HyukjinKwon offline. I will remove the Types of Window Function section because it is mainly listing the function names and descriptions, which should be automatically documented by ExpressionDescription, we don't want to duplicate the work here. Thanks Hyukjin! |
Also cc @gatorsmile |
Test build #121164 has finished for PR 28157 at commit
|
Test build #121163 has finished for PR 28157 at commit
|
retest this please |
Test build #121180 has finished for PR 28157 at commit
|
@huaxingao I think its better to say something about why this closed for the others reviewers. |
We've opened the new PR for this jira based on the discussion: #28203 (comment) |
What changes were proposed in this pull request?
Document Window Function
Why are the changes needed?
To make SQL reference complete
Does this PR introduce any user-facing change?
Yes
How was this patch tested?
Manually build and check