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

    https://github.com/apache/spark/pull/20962#discussion_r179043081
  
    --- Diff: python/pyspark/sql/column.py ---
    @@ -454,6 +454,32 @@ def isin(self, *cols):
         >>> df.select(df.name).orderBy(df.name.asc()).collect()
         [Row(name=u'Alice'), Row(name=u'Tom')]
         """
    +    _asc_nulls_first_doc = """
    +    Returns a sort expression based on the ascending order of the given 
column name and null values
    +    return before non-null values
    +
    +    >>> from pyspark.sql import Row
    +    >>> df = spark.createDataFrame([
    +    ...     Row(name=u'Tom', height=80),
    +    ...     Row(name=None, height=None),
    +    ...     Row(name=u'Alice', height=None)
    +    ... ])
    +    >>> df.select(df.name).orderBy(df.name.asc_nulls_first()).collect()
    +    [Row(name=None), Row(name=u'Alice'), Row(name=u'Tom')]
    +    """
    --- End diff --
    
    Can we add `.. versionadded:: 2.4.0` at the end, or do 
`since(2.4)(ignore_unicode_prefix(_unary_op("asc_nulls_first", 
_asc_nulls_first_doc)))` below?


---

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

Reply via email to