You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by lgieron <gi...@git.apache.org> on 2016/02/26 15:40:40 UTC

[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

GitHub user lgieron opened a pull request:

    https://github.com/apache/spark/pull/11396

    [SPARK-13515] Make FormatNumber work irrespective of locale.

    ## What changes were proposed in this pull request?
    
    Change in class FormatNumber to make it work irrespective of locale.
    
    
    ## How was this patch tested?
    
    Unit tests.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lgieron/spark SPARK-13515_Fix_Format_Number

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/11396.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11396
    
----
commit 349c45be9fba77d870310a6735cb346ad1343e53
Author: lgieron <lg...@gmail.com>
Date:   2016-02-23T13:06:21Z

    [SPARK-13515] Make FormatNumber work irrespective of locale.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189419086
  
    @srowen I've cleaned up the code as per your comments.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189663311
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52122/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11396#discussion_r54350209
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ---
    @@ -992,6 +992,9 @@ case class FormatNumber(x: Expression, d: Expression)
     
           val sb = classOf[StringBuffer].getName
           val df = classOf[DecimalFormat].getName
    +      val dfs = classOf[DecimalFormatSymbols].getName
    +      val l = classOf[Locale].getName
    +      val US = "US"
    --- End diff --
    
    Regarding "l" (instead of `localeClass`), I followed the convention used already in this method (variables `sb`, `df`, `dfs`).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189643658
  
    **[Test build #52122 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52122/consoleFull)** for PR 11396 at commit [`40e1ec8`](https://github.com/apache/spark/commit/40e1ec8663b160530e0a0471c8abf3a90ddf92cc).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189414225
  
    @srowen I went through all other uses of `DecimalFormat` and `NumberFormat` across all subprojects - they all look correct.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-190193903
  
    Looks good. CC @chenghao-intel to make sure we're not missing anything; I wasn't sure why there was a local `DecimalFormat` created in the first place. Is the non-thread-safety of the `NumberFormat` an issue here? I don't think so given my guess about how this is called, but thought I'd ask


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189893999
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11396#discussion_r54333625
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ---
    @@ -992,6 +992,9 @@ case class FormatNumber(x: Expression, d: Expression)
     
           val sb = classOf[StringBuffer].getName
           val df = classOf[DecimalFormat].getName
    +      val dfs = classOf[DecimalFormatSymbols].getName
    +      val l = classOf[Locale].getName
    +      val US = "US"
    --- End diff --
    
    This looks redundant... can it not just be part of the string below or does codegen not work that way somehow?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189889090
  
    **[Test build #52145 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52145/consoleFull)** for PR 11396 at commit [`fef157f`](https://github.com/apache/spark/commit/fef157fd127819345822538579d4324020d7beb4).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189393407
  
    @zsxwing This class is the backend for `format_number` SQL function, which is supposed to be locale-independent.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189663308
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189889143
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11396#discussion_r54350009
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ---
    @@ -992,6 +992,9 @@ case class FormatNumber(x: Expression, d: Expression)
     
           val sb = classOf[StringBuffer].getName
           val df = classOf[DecimalFormat].getName
    +      val dfs = classOf[DecimalFormatSymbols].getName
    +      val l = classOf[Locale].getName
    +      val US = "US"
    --- End diff --
    
    It's not a big deal but my tastes would run opposite. This is another layer of indirection and the variable "US" to represent the string "US" doesn't seem to add anything. At least I might call it "locale" or something. "l" might be better as "localeClass"


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11396#discussion_r54271864
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ---
    @@ -939,7 +940,7 @@ case class FormatNumber(x: Expression, d: Expression)
       private val pattern: StringBuffer = new StringBuffer()
     
       @transient
    -  private val numberFormat: DecimalFormat = new DecimalFormat("")
    +  private val numberFormat: DecimalFormat = new DecimalFormat("", new DecimalFormatSymbols(Locale.US))
    --- End diff --
    
    `: DecimalFormat` was redundant and you can remove it


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189662842
  
    **[Test build #52122 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52122/consoleFull)** for PR 11396 at commit [`40e1ec8`](https://github.com/apache/spark/commit/40e1ec8663b160530e0a0471c8abf3a90ddf92cc).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189881776
  
    **[Test build #52146 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52146/consoleFull)** for PR 11396 at commit [`b3b7b15`](https://github.com/apache/spark/commit/b3b7b15cf9d308c0373ab6fbbedfcf68b6aa0bd6).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189382718
  
    I'm wondering if some people may want to use other Locale, such as `4.000`. Why not just fix tests?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189384716
  
    @zsxwing My understanding is that FormatNumber is used in SQL parser, hence it should conform to the language standard (which only permits dot as a separator).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189822397
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52144/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11396#discussion_r54350183
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ---
    @@ -992,6 +992,9 @@ case class FormatNumber(x: Expression, d: Expression)
     
           val sb = classOf[StringBuffer].getName
           val df = classOf[DecimalFormat].getName
    +      val dfs = classOf[DecimalFormatSymbols].getName
    +      val l = classOf[Locale].getName
    +      val US = "US"
    --- End diff --
    
    I'll change it, it's no big deal. I think I'll also add a comment explaining this slightly non-intuivite approach of hard-coding a specific locale.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189414230
  
    @lgieron I see.Thanks for clarifying.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189642940
  
    Jenkins test this please


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189893925
  
    **[Test build #52146 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52146/consoleFull)** for PR 11396 at commit [`b3b7b15`](https://github.com/apache/spark/commit/b3b7b15cf9d308c0373ab6fbbedfcf68b6aa0bd6).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189822396
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/11396


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11396#discussion_r54339929
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ---
    @@ -992,6 +992,9 @@ case class FormatNumber(x: Expression, d: Expression)
     
           val sb = classOf[StringBuffer].getName
           val df = classOf[DecimalFormat].getName
    +      val dfs = classOf[DecimalFormatSymbols].getName
    +      val l = classOf[Locale].getName
    +      val US = "US"
    --- End diff --
    
    (I am assuming you're referring to the `US` variable).
    It would work to just have it inside the string below. 
    I decided to define it separately purely on grounds of taste - this way, the String does not contain any names of classes or objects. Putting the `US` in would be an exception, which (IMO) would make the code slighly harder to read.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189822324
  
    **[Test build #52144 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52144/consoleFull)** for PR 11396 at commit [`aab31f9`](https://github.com/apache/spark/commit/aab31f91b82f1a121c987b39cc72c45a13836fab).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189874904
  
    @zsxwing Can you please make Jenkins rerun the tests?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11396#discussion_r54333614
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ---
    @@ -18,6 +18,7 @@
     package org.apache.spark.sql.catalyst.expressions
     
     import java.text.DecimalFormat
    +import java.text.DecimalFormatSymbols
    --- End diff --
    
    Nit: these should be grouped as `java.text.{DecimalFormat, DecimalFormatSymbols}`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189329919
  
    That looks good. Are there other instances where a `DecimalFormat` or `NumberFormat` doesn't specify a locale? we should fix anything of the same form.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by lgieron <gi...@git.apache.org>.
Github user lgieron commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189729808
  
    @srowen The build failed due to unrelated test failing (https://issues.apache.org/jira/browse/SPARK-13530). The fix was committed to master an hour ago and now the test passes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189889144
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52145/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-191300551
  
    Merged to master


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by zsxwing <gi...@git.apache.org>.
Github user zsxwing commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189819438
  
    ok to test


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189822393
  
    **[Test build #52144 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52144/consoleFull)** for PR 11396 at commit [`aab31f9`](https://github.com/apache/spark/commit/aab31f91b82f1a121c987b39cc72c45a13836fab).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189875051
  
    **[Test build #52145 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52145/consoleFull)** for PR 11396 at commit [`fef157f`](https://github.com/apache/spark/commit/fef157fd127819345822538579d4324020d7beb4).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11396#discussion_r54271842
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ---
    @@ -25,6 +25,7 @@ import org.apache.spark.sql.catalyst.expressions.codegen._
     import org.apache.spark.sql.catalyst.util.ArrayData
     import org.apache.spark.sql.types._
     import org.apache.spark.unsafe.types.{ByteArray, UTF8String}
    +import java.text.DecimalFormatSymbols
     
    --- End diff --
    
    Nit: this import should be grouped with the other `java.text` import.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189894000
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/52146/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-13515] Make FormatNumber work irrespect...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11396#issuecomment-189308610
  
    Can one of the admins verify this patch?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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