spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viirya <...@git.apache.org>
Subject [GitHub] spark pull request #21010: [SPARK-23900][SQL] format_number support user spe...
Date Tue, 10 Apr 2018 06:53:07 GMT
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21010#discussion_r180312765
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
---
    @@ -2108,35 +2132,52 @@ case class FormatNumber(x: Expression, d: Expression)
           // SPARK-13515: US Locale configures the DecimalFormat object to use a dot ('.')
           // as a decimal separator.
           val usLocale = "US"
    -      val i = ctx.freshName("i")
           val dFormat = ctx.freshName("dFormat")
    -      val lastDValue =
    -        ctx.addMutableState(CodeGenerator.JAVA_INT, "lastDValue", v => s"$v = -100;")
           val pattern = ctx.addMutableState(sb, "pattern", v => s"$v = new $sb();")
    --- End diff --
    
    `pattern` is only needed for `IntegerType` case.


---

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


Mime
View raw message