You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2018/02/03 18:36:53 UTC

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

Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20495#discussion_r165821762
  
    --- 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 --
    
    Done


---

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