Skip to content

Conversation

@yoda-mon
Copy link
Contributor

What changes were proposed in this pull request?

octet_length: caliculate the byte length of strings
bit_length: caliculate the bit length of strings
Those two string related functions are only implemented on SparkSQL, not on Scala, Python and R.

Why are the changes needed?

Those functions would be useful for multi-bytes character users, who mainly working with Scala, Python or R.

Does this PR introduce any user-facing change?

Yes. Users can call octet_length/bit_length APIs on Scala(Dataframe), Python, and R.

How was this patch tested?

unit tests

@sarutak
Copy link
Member

sarutak commented Sep 14, 2021

ok to test.

@HyukjinKwon
Copy link
Member

the change looks fine otherwise.

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47752/

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

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

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

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

@yoda-mon
Copy link
Contributor Author

@HyukjinKwon @sarutak
Thank you for your comments, I fixed the commented points.

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

Test build #143259 has finished for PR 33992 at commit 545fbe2.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@sarutak
Copy link
Member

sarutak commented Sep 14, 2021

retest this please.

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

Test build #143249 has finished for PR 33992 at commit c0ffdce.

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

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

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

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

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

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47763/

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

Test build #143253 has finished for PR 33992 at commit 3a07337.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

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

LGTM otherwise. Let me leave it to @sarutak

@SparkQA
Copy link

SparkQA commented Sep 14, 2021

Test build #143260 has finished for PR 33992 at commit 545fbe2.

  • This patch fails SparkR unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 15, 2021

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

@SparkQA
Copy link

SparkQA commented Sep 15, 2021

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

@SparkQA
Copy link

SparkQA commented Sep 15, 2021

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

@SparkQA
Copy link

SparkQA commented Sep 15, 2021

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

@SparkQA
Copy link

SparkQA commented Sep 15, 2021

Test build #143288 has finished for PR 33992 at commit afa1700.

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

@SparkQA
Copy link

SparkQA commented Sep 15, 2021

Test build #143290 has finished for PR 33992 at commit 41656f4.

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

@sarutak
Copy link
Member

sarutak commented Sep 15, 2021

Merged to master. Thanks @yoda-mon and @HyukjinKwon !

@sarutak sarutak closed this in 0666f5c Sep 15, 2021
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

sarutak pushed a commit that referenced this pull request Oct 6, 2021
…or Examples in docstring

### What changes were proposed in this pull request?

This PR is a minor followup of #33992 to fix the warnings during PySpark documentation build:

```
/.../spark/python/pyspark/sql/functions.py:docstring of pyspark.sql.functions.bit_length:19: WARNING: Unexpected section title or transition.

-------
/.../spark/python/pyspark/sql/functions.py:docstring of pyspark.sql.functions.octet_length:19: WARNING: Unexpected section title or transition.

-------
```

We should always have the same length of hyphens with the title.

### Why are the changes needed?

To remove warnings during the documentation build and show the HTML pages correctly.

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

This is not released yet, and only in master branch. So, no to end users.

### How was this patch tested?

Manually built the docs via `make clean html` at `python/docs` directory.

Closes #34196 from HyukjinKwon/SPARK-36751.

Authored-by: Hyukjin Kwon <gurwls223@apache.org>
Signed-off-by: Kousuke Saruta <sarutak@oss.nttdata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants