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

    https://github.com/apache/spark/pull/10957#discussion_r51365127
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
    @@ -349,19 +349,41 @@ object functions extends LegacyFunctions {
       }
     
       /**
    -   * Aggregate function: returns the first value in a group.
    -   *
    -   * @group agg_funcs
    -   * @since 1.3.0
    -   */
    -  def first(e: Column): Column = withAggregateFunction { new First(e.expr) 
}
    +    * Aggregate function: returns the first value in a group. The function 
does not consider null
    +    * values when the ignoreNulls flag is set to true.
    --- End diff --
    
    Can you write something like this to be more clear? And update all the docs 
(including Python).
    
    "The function by default includes the first value it sees. When ignoreNulls 
is set to true, then it ignores the null values and includes the first non-null 
value. If all values are null, then null is returned."
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to