Skip to content

Conversation

@lucaspompeun
Copy link
Contributor

What changes were proposed in this pull request?

Correction of code highlights in SQL protobuf documentation.

old version:
image
new version:
image

Why are the changes needed?

To help spark users to understand python, scala and java code examples.

Does this PR introduce any user-facing change?

Yes, it improve user-facing documentation

How was this patch tested?

Comparing visual structure in the old and the new version in vscode markdown preview and github markdown preview.

@github-actions github-actions bot added the DOCS label Mar 31, 2023
@lucaspompeun lucaspompeun changed the title correction of protobuf sql docuentation correction of protobuf sql documentation Mar 31, 2023
@lucaspompeun lucaspompeun changed the title correction of protobuf sql documentation [SPARK-42987][DOCS] Correction of protobuf sql documentation Mar 31, 2023
@lucaspompeun
Copy link
Contributor Author

I'have corrected the problem that cause build error in github workflow

@HyukjinKwon
Copy link
Member

cc @SandishKumarHN and @rangadi

Copy link

@rangadi rangadi left a comment

Choose a reason for hiding this comment

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

Thanks for the updates Lucas.
This looks great.

A few more fixes if you could:

  • add two space indentation for code sample (first screenshot)
  • Replace comment string First, via the protobuf descriptor file, and then via the protobuf message class name. with Via Protobuf descriptor file, or via shaded Java class
  • In SQL Type conversion table:
    • Add one more row : Any maps to StructType

image

@lucaspompeun
Copy link
Contributor Author

lucaspompeun commented Apr 3, 2023

@rangadi The adition of any should be added in wich table? Protobuf -> Spark SQL or Spark SQL -> Protobuf?

@lucaspompeun
Copy link
Contributor Author

@rangadi the first two fixes were made

@rangadi
Copy link

rangadi commented Apr 3, 2023

@lucaspompeun thanks for the updates. LGTM.

Any is for 'Protobuf -> Spark SQL' type table.

@lucaspompeun
Copy link
Contributor Author

@rangadi Done!

@rangadi
Copy link

rangadi commented Apr 4, 2023

Thanks.
@HyukjinKwon please merge when you get a chance.

@HyukjinKwon
Copy link
Member

HyukjinKwon commented Apr 10, 2023

Merged to master.

yaooqinn added a commit that referenced this pull request Oct 13, 2023
### What changes were proposed in this pull request?

This PR restores the [Protobuf Data Source Guide](https://spark.apache.org/docs/latest/sql-data-sources-protobuf.html#python)'s code tabs which #40614 removed for markdown syntax fixes

In this PR, we introduce a hidden div to hold the code-block marker of markdown, then make both the liquid and markdown happy.

### Why are the changes needed?

improve doc readability and consistency.

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

yes, doc change

### How was this patch tested?

#### Doc build

![image](https://github.com/apache/spark/assets/8326978/8aefeee0-92b2-4048-a3f6-108e4c3f309d)

#### markdown editor and view

![image](https://github.com/apache/spark/assets/8326978/283b0820-390a-4540-8713-647c40f956ac)

### Was this patch authored or co-authored using generative AI tooling?

no

Closes #43361 from yaooqinn/SPARK-45532.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
yaooqinn added a commit that referenced this pull request Oct 13, 2023
### What changes were proposed in this pull request?

This PR restores the [Protobuf Data Source Guide](https://spark.apache.org/docs/latest/sql-data-sources-protobuf.html#python)'s code tabs which #40614 removed for markdown syntax fixes

In this PR, we introduce a hidden div to hold the code-block marker of markdown, then make both the liquid and markdown happy.

### Why are the changes needed?

improve doc readability and consistency.

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

yes, doc change

### How was this patch tested?

#### Doc build

![image](https://github.com/apache/spark/assets/8326978/8aefeee0-92b2-4048-a3f6-108e4c3f309d)

#### markdown editor and view

![image](https://github.com/apache/spark/assets/8326978/283b0820-390a-4540-8713-647c40f956ac)

### Was this patch authored or co-authored using generative AI tooling?

no

Closes #43361 from yaooqinn/SPARK-45532.

Authored-by: Kent Yao <yao@apache.org>
Signed-off-by: Kent Yao <yao@apache.org>
(cherry picked from commit 0257b77)
Signed-off-by: Kent Yao <yao@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.

3 participants