Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7034#discussion_r34651270
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
    @@ -1668,20 +1668,42 @@ object functions {
       
//////////////////////////////////////////////////////////////////////////////////////////////
     
       /**
    -   * Computes the length of a given string value.
    +   * Computes the length of a given string / binary value
        *
        * @group string_funcs
        * @since 1.5.0
        */
    -  def strlen(e: Column): Column = StringLength(e.expr)
    +  def length(e: Column): Column = Length(e.expr)
     
       /**
    -   * Computes the length of a given string column.
    +   * Computes the length of a given string / binary  column
        *
        * @group string_funcs
        * @since 1.5.0
        */
    -  def strlen(columnName: String): Column = strlen(Column(columnName))
    +  def length(columnName: String): Column = length(Column(columnName))
    +
    +  /**
    +   * Formats the number X to a format like '#,###,###.##', rounded to D 
decimal places,
    +   * and returns the result as a string. If D is 0, the result has no 
decimal point or
    +   * fractional part.
    +   *
    +   * @group string_funcs
    +   * @since 1.5.0
    +   */
    +  def formatNumber(x: Column, d: Column): Column = FormatNumber(x.expr, 
d.expr)
    +
    +  /**
    +   * Formats the number X to a format like '#,###,###.##', rounded to D 
decimal places,
    +   * and returns the result as a string. If D is 0, the result has no 
decimal point or
    +   * fractional part.
    +   *
    +   * @group string_funcs
    +   * @since 1.5.0
    +   */
    +  def formatNumber(columnXName: String, columnDName: String): Column = {
    --- End diff --
    
    The second argument possible be constant integer in most of the real world 
cases, leave it for the further discussion, as we have lots of similar cases, 
@rxin maybe you can change them all in a single PR, after all of the 
expressions jira issus resolved.


---
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