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

[MINOR][DOCS] Fix typos in sql-ref-datatypes.md #31221

Closed
wants to merge 1 commit into from

Conversation

kariya-mitsuru
Copy link
Contributor

@kariya-mitsuru kariya-mitsuru commented Jan 18, 2021

What changes were proposed in this pull request?

Fixing typos in the docs sql-ref-datatypes.md.

Why are the changes needed?

To display '<element_type>' correctly.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manually run jekyll.

before this fix
image

after this fix
image

### What changes were proposed in this pull request?
Fixing typos in the docs sql-ref-datatypes.md.

### Why are the changes needed?
To display '<element_type>' correctly.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Manually run jekyll.
@github-actions github-actions bot added the DOCS label Jan 18, 2021
@kiszk
Copy link
Member

kiszk commented Jan 18, 2021

Could you please attach screen captures in the description if possible?

@kariya-mitsuru
Copy link
Contributor Author

Could you please attach screen captures in the description if possible?

I have attached screen captures of before and after this fix.

@HyukjinKwon
Copy link
Member

ok to test

@@ -193,7 +193,7 @@ The following table shows the type names as well as aliases used in Spark SQL pa
|**BinaryType**|BINARY|
|**DecimalType**|DECIMAL, DEC, NUMERIC|
|**CalendarIntervalType**|INTERVAL|
|**ArrayType**|ARRAY<element_type>|
|**ArrayType**|ARRAY\<element_type>|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting .. why do we have to escape this alone?
Looks good anyway as it works ..

Copy link
Member

@HyukjinKwon HyukjinKwon Jan 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it thinks it's an 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 am also curious about why STRUCT and Map do not require escape.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behavior comes from kramdown which is used by Jekyll.

The element_type is interpreted as an html tag because it consists of only alphabet characters.
On the other hand, field1_name: field1_type, field2_name: field2_type, ...(STRUCT) and key_type, value_type(MAP) contain bare comma, so they cannot be interpreted as html tags.

Strictly speaking, kramdown uses the following regular expression to determine whether it is an html tag or not.

(?m-ix:<((?>(?:[[:alpha:]_][-[:alnum:]._]*:)?[[:alpha:]_][-[:alnum:]._]*))\\s*((?>\\s+(?:[[:alpha:]_][-[:alnum:]._]*:)?[[:alpha:]_][-[:alnum:]._]*(?:\\s*=\\s*(?:\\p{Word}+|(\"|').*?\\3))?)*)\\s*(\\/)?>)

@SparkQA
Copy link

SparkQA commented Jan 18, 2021

Test build #134179 has finished for PR 31221 at commit 3b4698a.

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

@HyukjinKwon
Copy link
Member

Let me merge this one anyway. It looks good and approved by @kiszk and me but it would be great if we can know why (#31221 (comment)).

HyukjinKwon pushed a commit that referenced this pull request Jan 18, 2021
### What changes were proposed in this pull request?
Fixing typos in the docs sql-ref-datatypes.md.

### Why are the changes needed?
To display '<element_type>' correctly.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Manually run jekyll.

before this fix
![image](https://user-images.githubusercontent.com/2217224/104865408-3df33600-597f-11eb-857b-c6223ff9159a.png)

after this fix
![image](https://user-images.githubusercontent.com/2217224/104865458-62e7a900-597f-11eb-8a21-6d838eecaaf2.png)

Closes #31221 from kariya-mitsuru/fix-typo.

Authored-by: Mitsuru Kariya <Mitsuru.Kariya@oss.nttdata.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit 536a725)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@HyukjinKwon
Copy link
Member

Merged to master, branch-3.1 and branch-3.0.

HyukjinKwon pushed a commit that referenced this pull request Jan 18, 2021
### What changes were proposed in this pull request?
Fixing typos in the docs sql-ref-datatypes.md.

### Why are the changes needed?
To display '<element_type>' correctly.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Manually run jekyll.

before this fix
![image](https://user-images.githubusercontent.com/2217224/104865408-3df33600-597f-11eb-857b-c6223ff9159a.png)

after this fix
![image](https://user-images.githubusercontent.com/2217224/104865458-62e7a900-597f-11eb-8a21-6d838eecaaf2.png)

Closes #31221 from kariya-mitsuru/fix-typo.

Authored-by: Mitsuru Kariya <Mitsuru.Kariya@oss.nttdata.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
(cherry picked from commit 536a725)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@SparkQA
Copy link

SparkQA commented Jan 18, 2021

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

@SparkQA
Copy link

SparkQA commented Jan 18, 2021

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

skestle pushed a commit to skestle/spark that referenced this pull request Feb 3, 2021
### What changes were proposed in this pull request?
Fixing typos in the docs sql-ref-datatypes.md.

### Why are the changes needed?
To display '<element_type>' correctly.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Manually run jekyll.

before this fix
![image](https://user-images.githubusercontent.com/2217224/104865408-3df33600-597f-11eb-857b-c6223ff9159a.png)

after this fix
![image](https://user-images.githubusercontent.com/2217224/104865458-62e7a900-597f-11eb-8a21-6d838eecaaf2.png)

Closes apache#31221 from kariya-mitsuru/fix-typo.

Authored-by: Mitsuru Kariya <Mitsuru.Kariya@oss.nttdata.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
@kariya-mitsuru kariya-mitsuru deleted the fix-typo branch February 12, 2021 06:23
xuanyuanking pushed a commit to xuanyuanking/spark that referenced this pull request Sep 29, 2021
### What changes were proposed in this pull request?
Fixing typos in the docs sql-ref-datatypes.md.

### Why are the changes needed?
To display '<element_type>' correctly.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Manually run jekyll.

before this fix
![image](https://user-images.githubusercontent.com/2217224/104865408-3df33600-597f-11eb-857b-c6223ff9159a.png)

after this fix
![image](https://user-images.githubusercontent.com/2217224/104865458-62e7a900-597f-11eb-8a21-6d838eecaaf2.png)

Closes apache#31221 from kariya-mitsuru/fix-typo.

Authored-by: Mitsuru Kariya <Mitsuru.Kariya@oss.nttdata.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
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.

4 participants