Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

AngersZhuuuu
Copy link
Contributor

@AngersZhuuuu AngersZhuuuu commented Dec 17, 2020

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
image

Why are the changes needed?

Complete doc

Does this PR introduce any user-facing change?

No

How was this patch tested?

Not need

@github-actions github-actions bot added the DOCS label Dec 17, 2020
@SparkQA
Copy link

SparkQA commented Dec 17, 2020

Test build #132929 has finished for PR 30816 at commit 93e1c1f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • CREATE TABLE person (id INT, name STRING, age INT, class INT, address STRING);

@SparkQA
Copy link

SparkQA commented Dec 17, 2020

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37532/

@SparkQA
Copy link

SparkQA commented Dec 17, 2020

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/37532/

@SparkQA
Copy link

SparkQA commented Dec 17, 2020

Test build #132938 has finished for PR 30816 at commit 9df29ca.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HyukjinKwon
Copy link
Member

cc @maropu @huaxingao @dilipbiswal FYI

(400, 'Dan', 50, 4, 'Street 4');
SET spark.sql.parser.quotedRegexColumnNames=true;

SELECT `(class|address)?+.+` FROM person;
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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.

@@ -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)
Copy link
Member

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)
Copy link
Member

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?

@maropu maropu changed the title [SPARK-33818][DOC] Doc spark.sql.parser.quotedRegexColumnNames [SPARK-33818][SQL][DOC] Add descriptions about spark.sql.parser.quotedRegexColumnNames in the SQL documents Dec 18, 2020
@AngersZhuuuu
Copy link
Contributor Author

@maropu Have updated as what you said. Can you review again? thanks.

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Test build #133650 has finished for PR 30816 at commit 5f7ca84.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Test build #133653 has finished for PR 30816 at commit aa52dd9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Test build #133656 has finished for PR 30816 at commit 1c042d1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38242/

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38239/

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38242/

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38239/

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38245/

@SparkQA
Copy link

SparkQA commented Jan 5, 2021

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/38245/

```sql
SELECT `(a|b)?+.+` FROM (
SELECT 1 as a, 2 as b, 3 as c
) src
Copy link
Member

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?

Copy link
Contributor Author

@AngersZhuuuu AngersZhuuuu Jan 5, 2021

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...).

@maropu
Copy link
Member

maropu commented Jan 5, 2021

For reviews, could you put the screenshot of the updated doc in the PR description?

@AngersZhuuuu
Copy link
Contributor Author

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.

@AngersZhuuuu
Copy link
Contributor Author

gentle ping @HyukjinKwon @dongjoon-hyun

@dongjoon-hyun
Copy link
Member

Thank you for pinging me, @AngersZhuuuu .

```sql
SELECT `(a|b)?+.+` FROM (
SELECT 1 as a, 2 as b, 3 as c
) src
Copy link
Member

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.

Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a 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.

dongjoon-hyun pushed a commit that referenced this pull request Jan 8, 2021
…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>
xuanyuanking pushed a commit to xuanyuanking/spark that referenced this pull request Sep 29, 2021
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants