Skip to content

[SPARK-46243][SQL][DOCS] Describe arguments of decode()#44157

Closed
MaxGekk wants to merge 2 commits intoapache:masterfrom
MaxGekk:doc-decode-params
Closed

[SPARK-46243][SQL][DOCS] Describe arguments of decode()#44157
MaxGekk wants to merge 2 commits intoapache:masterfrom
MaxGekk:doc-decode-params

Conversation

@MaxGekk
Copy link
Copy Markdown
Member

@MaxGekk MaxGekk commented Dec 4, 2023

What changes were proposed in this pull request?

In the PR, I propose to update the description of the StringDecode expression and apparently the decode() function by describing the arguments bin and charset.

The updated docs:

Screenshot 2023-12-04 at 12 24 36

Why are the changes needed?

To improve user experience with Spark SQL by documenting the public function.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

By manually checking the generated docs.

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

No.

@github-actions github-actions bot added the SQL label Dec 4, 2023
@MaxGekk MaxGekk changed the title [WIP][SQL][DOCS] Describe arguments of decode() [SPARK-46243][SQL][DOCS] Describe arguments of decode() Dec 4, 2023
@MaxGekk MaxGekk marked this pull request as ready for review December 4, 2023 11:29
arguments = """
Arguments:
* bin - a binary expression to decode
* charset - one of the charsets 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16' to decode `bin` into a STRING. It is case insensitive.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a bit tricky because there are two different sets of parameters.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

argument names are unique, right? Otherwise what would you propose?

Copy link
Copy Markdown
Contributor

@beliefer beliefer Dec 4, 2023

Choose a reason for hiding this comment

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

I have no idea. Maybe we can list all and add note to give the detail.
cc @cloud-fan

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can add named arguments support for this function. But it's unrelated to this PR.

@HyukjinKwon
Copy link
Copy Markdown
Member

Merged to master.

asl3 pushed a commit to asl3/spark that referenced this pull request Dec 5, 2023
### What changes were proposed in this pull request?
In the PR, I propose to update the description of the `StringDecode` expression and apparently the `decode()` function by describing the arguments `bin` and `charset`.

#### The updated docs:
<img width="743" alt="Screenshot 2023-12-04 at 12 24 36" src="https://github.com/apache/spark/assets/1580697/a177f81d-2f39-45ff-bc28-b217dad4e128">

### Why are the changes needed?
To improve user experience with Spark SQL by documenting the public function.

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

### How was this patch tested?
By manually checking the generated docs.

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

Closes apache#44157 from MaxGekk/doc-decode-params.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
dbatomic pushed a commit to dbatomic/spark that referenced this pull request Dec 11, 2023
### What changes were proposed in this pull request?
In the PR, I propose to update the description of the `StringDecode` expression and apparently the `decode()` function by describing the arguments `bin` and `charset`.

#### The updated docs:
<img width="743" alt="Screenshot 2023-12-04 at 12 24 36" src="https://github.com/apache/spark/assets/1580697/a177f81d-2f39-45ff-bc28-b217dad4e128">

### Why are the changes needed?
To improve user experience with Spark SQL by documenting the public function.

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

### How was this patch tested?
By manually checking the generated docs.

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

Closes apache#44157 from MaxGekk/doc-decode-params.

Authored-by: Max Gekk <max.gekk@gmail.com>
Signed-off-by: Hyukjin Kwon <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.

5 participants