[GitHub] spark pull request #20495: [SPARK-23327] [SQL] Update the description of thr...

2018-02-03 Thread dongjoon-hyun
Github user dongjoon-hyun commented on a diff in the pull request:

https://github.com/apache/spark/pull/20495#discussion_r165819296
  
--- Diff: python/pyspark/sql/functions.py ---
@@ -1705,10 +1705,12 @@ def unhex(col):
 @ignore_unicode_prefix
 @since(1.5)
 def length(col):
-"""Calculates the length of a string or binary expression.
+"""Computes the character length of a given string or number of bytes 
or a binary string.
+The length of character strings include the trailing spaces. The 
length of binary strings
+includes binary zeros.
 
->>> spark.createDataFrame([('ABC',)], 
['a']).select(length('a').alias('length')).collect()
-[Row(length=3)]
+>>> spark.createDataFrame([('ABC ',)], 
['a']).select(length('a').alias('length')).collect()
--- End diff --

Actually, not only `description`, this PR improves the test coverage and 
refactos the code, too.
Could you update the PR description/title more correctly?
Otherwise, we had better split this PR according to @rdblue 's 
recommendations in our dev thread.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20495: [SPARK-23327] [SQL] Update the description of thr...

2018-02-02 Thread gatorsmile
GitHub user gatorsmile opened a pull request:

https://github.com/apache/spark/pull/20495

[SPARK-23327] [SQL] Update the description of three external API or 
functions

## What changes were proposed in this pull request?
Update the description of three external API or functions `createFunction 
`, `length` and `repartitionByRange `

## How was this patch tested?
N/A

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/gatorsmile/spark updateFunc

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/20495.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #20495


commit 48f552cb087b0f8e3a87d43191450474734cae06
Author: gatorsmile 
Date:   2018-02-03T04:35:59Z

update create function.

commit 21ea233b6ef44bac4aefe13ae9014badac3450b1
Author: gatorsmile 
Date:   2018-02-03T06:51:03Z

update the comment for repartitionByRange

commit 9ecc809056800058cc95a1341fd9b85fa247867f
Author: gatorsmile 
Date:   2018-02-03T07:24:08Z

update the comment of length




---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org