-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-33818][SQL][DOC] Add descriptions about spark.sql.parser.quotedRegexColumnNames
in the SQL documents
#30816
Conversation
Test build #132929 has finished for PR 30816 at commit
|
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #132938 has finished for PR 30816 at commit
|
cc @maropu @huaxingao @dilipbiswal FYI |
(400, 'Dan', 50, 4, 'Street 4'); | ||
SET spark.sql.parser.quotedRegexColumnNames=true; | ||
|
||
SELECT `(class|address)?+.+` FROM person; |
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 need a dedicated page for this functionality? How about adding some simple SELECT examples in the top SELECT page? IMHO its okay to add them in https://spark.apache.org/docs/latest/sql-ref-syntax-qry-select.html cc: @HyukjinKwon @gatorsmile
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.
Wait for their advise and I will update later.
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.
Yeah, I would prefer to don't have a dedicated page.
docs/sql-ref-syntax-qry-select.md
Outdated
@@ -175,3 +180,4 @@ SELECT [ hints , ... ] [ ALL | DISTINCT ] { named_expression [ , ... ] } | |||
* [CASE Clause](sql-ref-syntax-qry-select-case.html) | |||
* [PIVOT Clause](sql-ref-syntax-qry-select-pivot.html) | |||
* [LATERAL VIEW Clause](sql-ref-syntax-qry-select-lateral-view.html) | |||
* [Regex Column Names](sql-ref-syntax-qry-select-regex-column.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.
I think its better to avoid abbreviation forms (e.g., Regex
) in user's docs.
* [DISTRIBUTE BY Clause](sql-ref-syntax-qry-select-distribute-by.html) | ||
* [LIMIT Clause](sql-ref-syntax-qry-select-limit.html) | ||
* [CASE Clause](sql-ref-syntax-qry-select-case.html) | ||
* [LATERAL VIEW Clause](sql-ref-syntax-qry-select-lateral-view.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.
All the pages above are related to this option?
spark.sql.parser.quotedRegexColumnNames
spark.sql.parser.quotedRegexColumnNames
in the SQL documents
@maropu Have updated as what you said. Can you review again? thanks. |
Test build #133650 has finished for PR 30816 at commit
|
Test build #133653 has finished for PR 30816 at commit
|
Test build #133656 has finished for PR 30816 at commit
|
Kubernetes integration test starting |
Kubernetes integration test starting |
Kubernetes integration test status failure |
Kubernetes integration test status success |
Kubernetes integration test starting |
Kubernetes integration test status failure |
docs/sql-ref-syntax-qry-select.md
Outdated
```sql | ||
SELECT `(a|b)?+.+` FROM ( | ||
SELECT 1 as a, 2 as b, 3 as c | ||
) src |
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.
How about moving this example into the bottom of this page just like the other SQL references?
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.
How about moving this example into the bottom of this page just like the other SQL references?
Here we just show a example usage and look good. Only move this one SQL to bottom is strange and reader may ignore it(To be honest, for example, me...).
For reviews, could you put the screenshot of the updated doc in the PR description? |
Yea, add whole page snapshot about changed place, looks pretty fine. |
gentle ping @HyukjinKwon @dongjoon-hyun |
Thank you for pinging me, @AngersZhuuuu . |
docs/sql-ref-syntax-qry-select.md
Outdated
```sql | ||
SELECT `(a|b)?+.+` FROM ( | ||
SELECT 1 as a, 2 as b, 3 as c | ||
) src |
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.
Do we need this src
? I think we can omit this.
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.
spark-sql> SELECT a FROM (SELECT 1 as a, 2 as b, 3 as c);
1
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.
Do we need this
src
? I think we can omit this.
Ur, not need, Omit this.
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.
+1, LGTM. Thank you, @AngersZhuuuu , @maropu , @HyukjinKwon and all.
Merged to master/3.1.
…edRegexColumnNames` in the SQL documents ### What changes were proposed in this pull request? According to #30805 (comment), doc `spark.sql.parser.quotedRegexColumnNames` since we need user know about this in doc and it's useful. ![image](https://user-images.githubusercontent.com/46485123/103656543-afa4aa80-4fa3-11eb-8cd3-a9d1b87a3489.png) ![image](https://user-images.githubusercontent.com/46485123/103656551-b2070480-4fa3-11eb-9ce7-95cc424242a6.png) ### Why are the changes needed? Complete doc ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Not need Closes #30816 from AngersZhuuuu/SPARK-33818. Authored-by: angerszhu <angers.zhu@gmail.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com> (cherry picked from commit 9b54da4) Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
…edRegexColumnNames` in the SQL documents ### What changes were proposed in this pull request? According to apache#30805 (comment), doc `spark.sql.parser.quotedRegexColumnNames` since we need user know about this in doc and it's useful. ![image](https://user-images.githubusercontent.com/46485123/103656543-afa4aa80-4fa3-11eb-8cd3-a9d1b87a3489.png) ![image](https://user-images.githubusercontent.com/46485123/103656551-b2070480-4fa3-11eb-9ce7-95cc424242a6.png) ### Why are the changes needed? Complete doc ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Not need Closes apache#30816 from AngersZhuuuu/SPARK-33818. Authored-by: angerszhu <angers.zhu@gmail.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
What changes were proposed in this pull request?
According to #30805 (comment),
doc
spark.sql.parser.quotedRegexColumnNames
since we need user know about this in doc and it's useful.Why are the changes needed?
Complete doc
Does this PR introduce any user-facing change?
No
How was this patch tested?
Not need