-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-49073][SQL][DOCS] Improve the doc sql-ref-syntax-qry-select.md
#47552
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
|
|
||
| An expression with an assigned name. In general, it denotes a column expression. | ||
|
|
||
| **Syntax:** `expression [[AS] 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.
I have already moved this up.
sql-ref-syntax-qry-select.mdsql-ref-syntax-qry-select.md
|
I don't see these link for parameters anywhere in the spark docs, so not sure we should just add them for the select page |
|
I understand your concern that it may result in WDYT @HyukjinKwon ? |
docs/sql-ref-syntax-qry-select.md
Outdated
| out repeated subquery blocks in the FROM clause and improves readability of the query. | ||
|
|
||
| * **hints** | ||
| * **[hints](sql-ref-syntax-qry-select-hints.html)** |
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.
If we go ahead with this, we should probably do it for all? I would separate the PR
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.
Okay,
I will restore the related clickable parameter first in this pr, and I will do it in another separate PR.
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.
Done.
| While `select_statement` is defined as | ||
| ```sql | ||
| SELECT [ hints , ... ] [ ALL | DISTINCT ] { [ [ named_expression | regex_column_names | star ] [ , ... ] | TRANSFORM (...) ] } | ||
| SELECT [ hints , ... ] [ ALL | DISTINCT ] { [ [ named_expression | regex_column_names | star_clause ] [ , ... ] | TRANSFORM (...) ] } |
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 wonder if we should do star [ except_clause ] instead of having except_clause inside the star_clause.
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 am referring to this doc https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-qry-select.html, as follows:

Based on my understanding, I think one possible reason is that EXCEPT cannot exist independently of STAR, which seems to emphasize this relationship.
Co-authored-by: Allison Wang <[email protected]>
|
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |

What changes were proposed in this pull request?
The pr aims to update the explanation for
star_clausein the docsql-ref-syntax-qry-select.md.Why are the changes needed?
star_clausenow supportsEXCEPT ..semantics, so the original explanation ofstar_clauseis outdated, let's update it.Does this PR introduce any user-facing change?
Yes, only for docs.
How was this patch tested?
Manually test.
Was this patch authored or co-authored using generative AI tooling?
No.