-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-31753][SQL][DOCS] Add missing keywords in the SQL docs #29056
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
update masterbranch
|
cc: @huaxingao |
|
Thanks for the work, @GuoPhilipse ! Please list up the keywords in the PR description that this PR will add. |
|
|
btw, could you update the PR description, too? e.g., remove |
sure ,wil update soon. |
|
also edit the menu-sql.yaml to update the sidebar menu? |
|
@GuoPhilipse Sorry I have more nitpicks on grammar. I know this is very tedious. I went through all these when I did the doc PRs. Thanks a lot for doing this! |
|
Thanks @maropu @huaxingao, really appreciated by your earnest and carefull review. I have leant a lot from this PR. Thanks for your time. |
|
|
||
| ```sql | ||
| PIVOT ( { aggregate_expression [ AS aggregate_expression_alias ] } [ , ... ] | ||
| FOR column_list IN ( expression_list ) ) |
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.
| Specifies an aggregate function name (MIN, MAX, COUNT, SUM, AVG, etc.). | ||
| Note that `FIRST` and `LAST` have an optional `IGNORE NULLS` clause; when the option specified, | ||
| it will returns the first or last value that is not null (or null if all values are null). | ||
| **Syntax:** `[ FIRST | LAST ] ( [ distinct ] expression [ IGNORE NULLS ] ) [ FILTER ( WHERE boolean_expression ) ]` |
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 still need **Syntax:** [ FIRST | LAST ] ( [ distinct ] expression [ IGNORE NULLS ] ) [ FILTER ( WHERE boolean_expression ) ]? It looks verbose to me though.
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.
now have have aggregate functions above and examples in the end, looks enough,let me move it
|
Thanks for the work, @GuoPhilipse ! Looks ok except for one comment. Could you check for the final sign-off? @srowen @dongjoon-hyun @huaxingao @dilipbiswal Note: since all the SQL syntaxes in this update has been implemented in 3.0.0, we can merge this into branch-3.0. |
|
@GuoPhilipse Could you generate HTML docs and check if all things are okay for this udpate? |
|
@GuoPhilipse Btw, we still have more document improvement issues;
As you know, we currently have the two duplicated document pages for built-in functions;
If we finish adding the tags, we might be able to remove the former page. If you're interested in more contributions, feel free to take them over. Its very helpful. cc: @HyukjinKwon @huaxingao |
Thanks @maropu , will glad to take more look on this. |
|
|
ok to test |
|
Note: If nobody has comments, this is just a doc improvement, so I will merge in a few days. |
|
Test build #126368 has finished for PR 29056 at commit
|
### What changes were proposed in this pull request? update sql-ref docs, the following key words will be added in this PR. CASE/ELSE WHEN/THEN MAP KEYS TERMINATED BY NULL DEFINED AS LINES TERMINATED BY ESCAPED BY COLLECTION ITEMS TERMINATED BY PIVOT LATERAL VIEW OUTER? ROW FORMAT SERDE ROW FORMAT DELIMITED FIELDS TERMINATED BY IGNORE NULLS FIRST LAST ### Why are the changes needed? let more users know the sql key words usage ### Does this PR introduce _any_ user-facing change?     ### How was this patch tested? No Closes #29056 from GuoPhilipse/add-missing-keywords. Lead-authored-by: GuoPhilipse <[email protected]> Co-authored-by: GuoPhilipse <[email protected]> Signed-off-by: Takeshi Yamamuro <[email protected]> (cherry picked from commit 8de4333) Signed-off-by: Takeshi Yamamuro <[email protected]>
|
Merged to master/branch-3.0. Thanks, @GuoPhilipse ! |
| | ( col_name1, col_name2, ... ) ] | ||
| [ ROW FORMAT row_format ] | ||
| [ STORED AS file_format ] | ||
| [ LOCATION path ] |
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.
The bucketSpec is still missing in CREATE HIVE FORMAT table, right?
[ CLUSTERED BY ( col_name3, col_name4, ... )
[ SORTED BY ( col_name [ ASC | DESC ], ... ) ]
INTO num_buckets BUCKETS ]
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.
Any reason we did not add it? @huaxingao @GuoPhilipse
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.
Sorry, we missed that.
@GuoPhilipse Could you please have a follow-up to add bucketSpec? Thanks!
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.
Thank you!
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.
Yes, we need it, will add it soon.
What changes were proposed in this pull request?
update sql-ref docs, the following key words will be added in this PR.
CASE/ELSE
WHEN/THEN
MAP KEYS TERMINATED BY
NULL DEFINED AS
LINES TERMINATED BY
ESCAPED BY
COLLECTION ITEMS TERMINATED BY
PIVOT
LATERAL VIEW OUTER?
ROW FORMAT SERDE
ROW FORMAT DELIMITED
FIELDS TERMINATED BY
IGNORE NULLS
FIRST
LAST
Why are the changes needed?
let more users know the sql key words usage
Does this PR introduce any user-facing change?
How was this patch tested?
No