Skip to content

Conversation

@dilipbiswal
Copy link
Contributor

@dilipbiswal dilipbiswal commented May 1, 2020

What changes were proposed in this pull request?

This PR is to clean up the markdown file in remaining pages in sql reference. The first one was done by @gatorsmile in 28415

  • Replace HTML table by MD table
  • sql-ref-ansi-compliance.md

Screen Shot 2020-05-01 at 4 36 35 PM

- **sql-ref-datatypes.md (Scala)**

Screen Shot 2020-05-01 at 4 37 30 PM

Screen Shot 2020-05-01 at 4 39 18 PM

- **sql-ref-datatypes.md (Java)**

Screen Shot 2020-05-01 at 4 41 24 PM

Screen Shot 2020-05-01 at 4 41 39 PM

- **sql-ref-datatypes.md (Python)**

Screen Shot 2020-05-01 at 4 43 36 PM

Screen Shot 2020-05-01 at 4 43 54 PM

- **sql-ref-datatypes.md (R)**

Screen Shot 2020-05-01 at 4 45 16 PM

Screen Shot 2020-05-01 at 4 45 36 PM

- **sql-ref-datatypes.md (SQL)**

Screen Shot 2020-05-01 at 4 48 02 PM

- **sql-ref-syntax-qry-select-tvf.md**

Screen Shot 2020-05-01 at 4 49 32 PM

Why are the changes needed?

Make the doc cleaner and easily editable by MD editors

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manually using jekyll serve

@dilipbiswal
Copy link
Contributor Author

cc @huaxingao @gatorsmile

@SparkQA
Copy link

SparkQA commented May 2, 2020

Test build #122182 has finished for PR 28433 at commit 4debc83.

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

</tr>
</table>
|Property Name|Default|Meaning|Since Version|
|--- |--- |--- |--- |
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you align the --- with the column header?

|Property Name|Default|Meaning|Since Version|
|-------------|-------|-------|-------------|

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@huaxingao Done.

@dilipbiswal
Copy link
Contributor Author

cc @maropu

@SparkQA
Copy link

SparkQA commented May 2, 2020

Test build #122186 has finished for PR 28433 at commit c419b93.

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

| 3| Infinity|
+---------+---------+
{% endhighlight %}
{% endhighlight %}
Copy link
Member

Choose a reason for hiding this comment

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

What's a difference here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maropu Fixed.

|**''**|single quote|literal|'|
|**[**|optional section start|||
|**]**|optional section end|||
|**[**|optional section start| | |
Copy link
Member

Choose a reason for hiding this comment

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

Need the space between |s? But, no space between |s in line 59?

Copy link
Member

Choose a reason for hiding this comment

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

it would be nicer if we have an extra space between | and |

Yes. Line 59 is needed too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maropu
Copy link
Member

maropu commented May 2, 2020

Replace HTML table by MD table

All the fixes in docs/sql-ref-* addressed in this PR? I found the tag in sql-ref-null-semantics.md, too;

$ls sql-ref* | xargs grep "<table " .
sql-ref-ansi-compliance.md:<table class="table">
sql-ref-ansi-compliance.md:<table class="table">
sql-ref-datatypes.md:<table class="table">
sql-ref-datatypes.md:<table class="table">
sql-ref-datatypes.md:<table class="table">
sql-ref-datatypes.md:<table class="table">
sql-ref-datatypes.md:<table class="table">
sql-ref-datetime-pattern.md:<table class="table">
sql-ref-null-semantics.md:<table class="tsclass" border="1">
sql-ref-null-semantics.md:<table class="tsclass" border="1">
sql-ref-null-semantics.md:<table class="tsclass" border="1">
sql-ref-null-semantics.md:<table class="tsclass" border="1">
sql-ref-syntax-qry-select-tvf.md:<table class="table">

@dilipbiswal
Copy link
Contributor Author

@maropu sorry, i missed sql-ref-null-semantics.md. I have added it now.

Copy link
Member

@maropu maropu left a comment

Choose a reason for hiding this comment

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

Looks okay

@SparkQA
Copy link

SparkQA commented May 2, 2020

Test build #122193 has finished for PR 28433 at commit 15da96c.

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

</table>
|Function|Argument Type(s)|Description|
|--------|----------------|-----------|
|**range** ( end )|Long|Creates a table with a single *LongType* column named *id*, containing<br> rows in a range from 0 to *end* (exclusive) with step value 1.|
Copy link
Member

Choose a reason for hiding this comment

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

Nit, but can we preserve the italics on end for example?

</table>
|Property Name|Default|Meaning|Since Version|
|-------------|-------|-------|-------------|
|`spark.sql.ansi.enabled`|false|(Experimental) When true, Spark tries to conform to the ANSI SQL specification: <br> 1. Spark will throw a runtime exception if an overflow occurs in any operation on integral/decimal field. <br> 2. Spark will forbid using the reserved keywords of ANSI SQL as identifiers in the SQL parser.|3.0.0|
Copy link
Member

Choose a reason for hiding this comment

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

Also not a big deal, but if you can search/replace <br> for <br/> that's slightly more correct.

Copy link
Member

Choose a reason for hiding this comment

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

For long table cells is there any standard way to wrap the markdown? the markdown source is harder to read now, but not terrible.

Copy link
Contributor Author

@dilipbiswal dilipbiswal May 2, 2020

Choose a reason for hiding this comment

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

@srowen Replaced <br> with <br/> for all the files in this PR. Will look at other files and follow-up if needed. About the wrapping in markdown, i couldn't find any markup syntax to control the cell width. I tried specifying a style for table in the doc and that seems to work ok.

@SparkQA
Copy link

SparkQA commented May 2, 2020

Test build #122220 has finished for PR 28433 at commit 028746b.

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

@dilipbiswal
Copy link
Contributor Author

@maropu @srowen Can this get in now, if there are no other comments ? The reason i ask is @huaxingao has a big PR which is changing a lot of files. If this can get in first then she can rebase and push ?

@maropu
Copy link
Member

maropu commented May 5, 2020

Looks fine and I'll merge this first.

@maropu maropu closed this in 5052d95 May 5, 2020
maropu pushed a commit that referenced this pull request May 5, 2020
### What changes were proposed in this pull request?
This PR is to clean up the markdown file in remaining pages in sql reference. The first one was done by gatorsmile in  [28415](#28415)

- Replace HTML table by MD table
- **sql-ref-ansi-compliance.md**
<img width="967" alt="Screen Shot 2020-05-01 at 4 36 35 PM" src="https://user-images.githubusercontent.com/14225158/80848981-1cbca080-8bca-11ea-8a5d-63174b31c800.png">
- **sql-ref-datatypes.md (Scala)**
<img width="967" alt="Screen Shot 2020-05-01 at 4 37 30 PM" src="https://user-images.githubusercontent.com/14225158/80849057-6a390d80-8bca-11ea-8866-ab08bab31432.png">
<img width="967" alt="Screen Shot 2020-05-01 at 4 39 18 PM" src="https://user-images.githubusercontent.com/14225158/80849061-6c9b6780-8bca-11ea-834c-eb93d3ab47ae.png">
- **sql-ref-datatypes.md (Java)**
<img width="967" alt="Screen Shot 2020-05-01 at 4 41 24 PM" src="https://user-images.githubusercontent.com/14225158/80849138-b3895d00-8bca-11ea-9d3b-555acad2086c.png">
<img width="967" alt="Screen Shot 2020-05-01 at 4 41 39 PM" src="https://user-images.githubusercontent.com/14225158/80849140-b6844d80-8bca-11ea-9ca9-1812b6a76c02.png">
- **sql-ref-datatypes.md (Python)**
<img width="967" alt="Screen Shot 2020-05-01 at 4 43 36 PM" src="https://user-images.githubusercontent.com/14225158/80849202-0400ba80-8bcb-11ea-96a5-7caecbf9dbbf.png">
<img width="967" alt="Screen Shot 2020-05-01 at 4 43 54 PM" src="https://user-images.githubusercontent.com/14225158/80849205-06fbab00-8bcb-11ea-8f00-6df52b151684.png">
- **sql-ref-datatypes.md (R)**
<img width="967" alt="Screen Shot 2020-05-01 at 4 45 16 PM" src="https://user-images.githubusercontent.com/14225158/80849288-5fcb4380-8bcb-11ea-8277-8589b5bb31bc.png">
<img width="967" alt="Screen Shot 2020-05-01 at 4 45 36 PM" src="https://user-images.githubusercontent.com/14225158/80849294-62c63400-8bcb-11ea-9438-b4f1193bc757.png">
- **sql-ref-datatypes.md (SQL)**
<img width="967" alt="Screen Shot 2020-05-01 at 4 48 02 PM" src="https://user-images.githubusercontent.com/14225158/80849336-986b1d00-8bcb-11ea-9736-5fb40496b681.png">
- **sql-ref-syntax-qry-select-tvf.md**
<img width="967" alt="Screen Shot 2020-05-01 at 4 49 32 PM" src="https://user-images.githubusercontent.com/14225158/80849399-d10af680-8bcb-11ea-8dc2-e3e750e21a59.png">

### Why are the changes needed?
Make the doc cleaner and easily editable by MD editors

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

### How was this patch tested?
Manually using jekyll serve

Closes #28433 from dilipbiswal/sql-doc-table-cleanup.

Authored-by: Dilip Biswal <[email protected]>
Signed-off-by: Takeshi Yamamuro <[email protected]>
(cherry picked from commit 5052d95)
Signed-off-by: Takeshi Yamamuro <[email protected]>
@dilipbiswal
Copy link
Contributor Author

Thanks a lot @maropu @huaxingao @srowen @gatorsmile

@maropu
Copy link
Member

maropu commented May 5, 2020

Thanks! Merged to master/3.0. If @srowen has more comments, please ping @huaxingao so that she can include more fixes in her PR (#28451).

@maropu
Copy link
Member

maropu commented May 5, 2020

Ur, the jira ID is incorrect? @dilipbiswal

@maropu maropu changed the title [SPARK-31030] [DOCS] [FOLLOWUP] Replace HTML Table by Markdown Table [SPARK-31030][SQL][DOCS][FOLLOWUP] Replace HTML Table by Markdown Table May 5, 2020
@dilipbiswal
Copy link
Contributor Author

@maropu Thanks for fixing the title.

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.

6 participants