You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by vinodkc <gi...@git.apache.org> on 2018/08/21 15:19:24 UTC

[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

GitHub user vinodkc opened a pull request:

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

    [SPARK-25177][SQL] When dataframe decimal type column having scale higher than 6, 0 values are shown in scientific notation

    ## What changes were proposed in this pull request?
    If scale of decimal type is > 6 , 0 value will be shown in scientific notation and hence, when the dataframe output is saved to external database, it fails due to scientific notation on "0" values.
    In java.math.BigDecimal,  if the scale is >6 , 0 will be show in scientific notation.
    
    In Postgrasql, 0 decimal value will be shown with non-scientific notation (plain string), this PR make spark SQL result consistent with Postgrsql.
    ## How was this patch tested?
    Added 2 unit tests 
    


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

    $ git pull https://github.com/vinodkc/spark br_fix_precision_zero

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

    https://github.com/apache/spark/pull/22171.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 #22171
    
----
commit 1ebeae518f44439af7ceff2ce5fb80caf44f1d45
Author: Vinod KC <vi...@...>
Date:   2018-08-21T15:10:47Z

    Fix precision issue with zero when decimal type scale > 6

----


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95151 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95151/testReport)** for PR 22171 at commit [`b5644d7`](https://github.com/apache/spark/commit/b5644d70951e29e9175c4ab9aede41b3143cad7f).


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    I don't have a strong opinion about the display, scientific notation is fine to me.
    
    I'm curious about "... but also in dataset write operations. External databases like netezza fails to save the result ..."
    
    How can this happen? When Spark writes decimal out, the external systems will get decimal values, not string values.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    Is there a standard about how should CSV store decimal values?


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    Hm, actually I thought this makes sense tho.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95156 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95156/testReport)** for PR 22171 at commit [`d1ef674`](https://github.com/apache/spark/commit/d1ef67467f77ae85fac880185a29cc2ba74d31fd).


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2826/
    Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    Scientific notation is more efficient on saving the values in CSV. If there are many zero values of high scale decimal type, this non scientific notation can cost storage space and loading time.
    
    I'm not sure if there is a standard for this. But I did a search roughly, looks like it is common to save decimal values as scientific notation in CSV.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    @vinodkc, I think you can mark up the code bit via 
    
    ``````
    ```
    spark.sql("create table test (a decimal(10,7), b decimal(10,6), c decimal(10,8))")
    ...
    +---------+--------+----------+
    ```
    ``````


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2819/
    Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

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


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212180992
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
    @@ -197,7 +197,7 @@ select .e3
     -- !query 20
     select 1E309, -1E309
     -- !query 20 schema
    -struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)>
    +struct<1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309),-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309)>
    --- End diff --
    
    @vinodkc how does it show in Postgres?


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    Hm, I don't think there's standard notation for numbers in CSV since the datatype is specific to text if I remember the RFC 4180 correctly. Might be good to double check.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212165521
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/higher-order-functions.sql.out ---
    @@ -201,6 +201,7 @@ struct<>
     -- !query 20 output
     
     
    +
    --- End diff --
    
    I think this is wrongly submitted.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

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


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95675 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95675/testReport)** for PR 22171 at commit [`6b4c2f2`](https://github.com/apache/spark/commit/6b4c2f24c500bb972b5ffd14897bfb5fb2184ffc).


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95081 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95081/testReport)** for PR 22171 at commit [`5e2fb96`](https://github.com/apache/spark/commit/5e2fb96b6f28f59fb265dbd909d55ee15778bc71).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by vinodkc <gi...@git.apache.org>.
Github user vinodkc commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    @viirya , Current issue occurs only in the case of 0 values, none zero values with higher scale are still save in non scientific notation. 


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2379/
    Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95659 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95659/testReport)** for PR 22171 at commit [`6b4c2f2`](https://github.com/apache/spark/commit/6b4c2f24c500bb972b5ffd14897bfb5fb2184ffc).
     * This patch **fails PySpark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

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


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95156 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95156/testReport)** for PR 22171 at commit [`d1ef674`](https://github.com/apache/spark/commit/d1ef67467f77ae85fac880185a29cc2ba74d31fd).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212243149
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/higher-order-functions.sql.out ---
    @@ -201,6 +201,7 @@ struct<>
     -- !query 20 output
     
     
    +
    --- End diff --
    
    Golden file generator automatically added this new line


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95654 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95654/testReport)** for PR 22171 at commit [`6b4c2f2`](https://github.com/apache/spark/commit/6b4c2f24c500bb972b5ffd14897bfb5fb2184ffc).
     * This patch **fails due to an unknown error code, -9**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

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


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    cc @cloud-fan and @gatorsmile, WDYT? actually I happened to meet this and thought it's better be fixed.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212248530
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
    @@ -197,7 +197,7 @@ select .e3
     -- !query 20
     select 1E309, -1E309
     -- !query 20 schema
    -struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)>
    +struct<1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309),-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309)>
    --- End diff --
    
    I agree with the previous one looks slightly better in this particular case. Thing is, it sounds about if we should follow Postgres representation everywhere vs we set up a policy on decimal's string representation.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2839/
    Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95151 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95151/testReport)** for PR 22171 at commit [`b5644d7`](https://github.com/apache/spark/commit/b5644d70951e29e9175c4ab9aede41b3143cad7f).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by maropu <gi...@git.apache.org>.
Github user maropu commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    retest this please


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95111 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95111/testReport)** for PR 22171 at commit [`97de5d8`](https://github.com/apache/spark/commit/97de5d81ccdfd865db45d9f47640144aa2fb0a8e).


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    BTW, was wondering if we should call the current way a .. kind of Java standard? IIRC, Python's decimal representation doesn't use a scientific notation by default. I thought this makes sense since we refer Postgres in particular `show` stuff. At least I know two PRs.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by vinodkc <gi...@git.apache.org>.
Github user vinodkc commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    retest this please


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95028 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95028/testReport)** for PR 22171 at commit [`1ebeae5`](https://github.com/apache/spark/commit/1ebeae518f44439af7ceff2ce5fb80caf44f1d45).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212244913
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
    @@ -197,7 +197,7 @@ select .e3
     -- !query 20
     select 1E309, -1E309
     -- !query 20 schema
    -struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)>
    +struct<1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309),-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309)>
    --- End diff --
    
    In the schema string, I think such representation is not good and scientific notation seems better.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

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


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212165658
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
    @@ -197,7 +197,7 @@ select .e3
     -- !query 20
     select 1E309, -1E309
     -- !query 20 schema
    -struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)>
    +struct<1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309),-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309)>
    --- End diff --
    
    hmm, this seems a bad representation.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95675 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95675/testReport)** for PR 22171 at commit [`6b4c2f2`](https://github.com/apache/spark/commit/6b4c2f24c500bb972b5ffd14897bfb5fb2184ffc).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r211682187
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala ---
    @@ -197,7 +197,7 @@ final class Decimal extends Ordered[Decimal] with Serializable {
         }
       }
     
    -  override def toString: String = toBigDecimal.toString()
    +  override def toString: String = toBigDecimal.bigDecimal.toPlainString()
    --- End diff --
    
    Yea, I was wondering `0E-7` vs `0.0000000`. Looks Postgres follows `0.0000000` way, right? 
    
    cc @mengxr, it vaguely remember that I saw something you said about `0E-7` expression before. Please ignore me if I am wrongly remembering this.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2450/
    Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

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


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2484/
    Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2421/
    Test PASSed.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r211867603
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/Decimal.scala ---
    @@ -197,7 +197,7 @@ final class Decimal extends Ordered[Decimal] with Serializable {
         }
       }
     
    -  override def toString: String = toBigDecimal.toString()
    +  override def toString: String = toBigDecimal.bigDecimal.toPlainString()
    --- End diff --
    
    I don't recall anything that is relevant:)


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95081 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95081/testReport)** for PR 22171 at commit [`5e2fb96`](https://github.com/apache/spark/commit/5e2fb96b6f28f59fb265dbd909d55ee15778bc71).


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    @rxin, I recall https://github.com/apache/spark/pull/14560 where we used Postgres as reference. WDYT?


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    Yea, it should better be clarified. Same question.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95659 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95659/testReport)** for PR 22171 at commit [`6b4c2f2`](https://github.com/apache/spark/commit/6b4c2f24c500bb972b5ffd14897bfb5fb2184ffc).


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95654 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95654/testReport)** for PR 22171 at commit [`6b4c2f2`](https://github.com/apache/spark/commit/6b4c2f24c500bb972b5ffd14897bfb5fb2184ffc).


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212251852
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
    @@ -197,7 +197,7 @@ select .e3
     -- !query 20
     select 1E309, -1E309
     -- !query 20 schema
    -struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)>
    +struct<1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309),-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309)>
    --- End diff --
    
    @viirya This schema is auto generated. 
      Actual issue is only with 0 value when scale higher than 6. If we need to reduce the scope of impact, can we add this condition?
    ```
    override def toString: String = if (decimalVal == 0 && _scale > 6) {
        toBigDecimal.bigDecimal.toPlainString()
      } else {
        toBigDecimal.toString()
      }
    ```


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

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


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    > How can this happen? When Spark writes decimal out, the external systems will get decimal values, not string values.
    
    I have the same question.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    So this is an issue only related to `Dataset.show`?


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95028 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95028/testReport)** for PR 22171 at commit [`1ebeae5`](https://github.com/apache/spark/commit/1ebeae518f44439af7ceff2ce5fb80caf44f1d45).


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212289525
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
    @@ -197,7 +197,7 @@ select .e3
     -- !query 20
     select 1E309, -1E309
     -- !query 20 schema
    -struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)>
    +struct<1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309),-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309)>
    --- End diff --
    
    I guess that we won't see such schema string often. (I might be wrong)
    
    So this might not be big deal.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/2486/
    Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by vinodkc <gi...@git.apache.org>.
Github user vinodkc commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    @viirya, This issue is not only related to Dataset.show but also in dataset write operations. External databases like netezza   fails save the result  due to  scientific notation on "0" values .


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

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


---

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


[GitHub] spark pull request #22171: [SPARK-25177][SQL] When dataframe decimal type co...

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

    https://github.com/apache/spark/pull/22171#discussion_r212243480
  
    --- Diff: sql/core/src/test/resources/sql-tests/results/literals.sql.out ---
    @@ -197,7 +197,7 @@ select .e3
     -- !query 20
     select 1E309, -1E309
     -- !query 20 schema
    -struct<1E+309:decimal(1,-309),-1E+309:decimal(1,-309)>
    +struct<1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309),-1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000:decimal(1,-309)>
    --- End diff --
    
     Result In Postgresql,  
    ```
    CREATE TABLE TestdecBig (a DECIMAL(10,7), b DECIMAL(10,6), c DECIMAL(10,8), d DECIMAL(310,309));
    INSERT INTO TestdecBig VALUES (1,1,1,1);
    INSERT INTO TestdecBig VALUES (0,0,0,0);
    
    Output
    ----------
    select * from TestdecBig;
         a     |    b     |     c      |                                                                                                                       
                                         d                                                                                                                     
                                           
    -----------+----------+------------+-----------------------------------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------------------------------------------------------------------------------------
    ---------------------------------------
     1.0000000 | 1.000000 | 1.00000000 | 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000
     0.0000000 | 0.000000 | 0.00000000 | 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000
    (2 rows)
    ```


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by vinodkc <gi...@git.apache.org>.
Github user vinodkc commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    @gatorsmile @HyukjinKwon @viirya , I rechecked the customer scenario. 
    It seems dataframe is saved as csv file and then netezza loads the csv data into netezza table. In csv output 0 values, with higher scale than 6,  are store in scientific notation and due to this  [limitation](http://www-01.ibm.com/support/docview.wss?crawler=1&uid=swg21570795) of netezza ,it fails to load the data. if the 0 values in csv is in non scientific notation, netezza  loads the data. 


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

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


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    **[Test build #95111 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/95111/testReport)** for PR 22171 at commit [`97de5d8`](https://github.com/apache/spark/commit/97de5d81ccdfd865db45d9f47640144aa2fb0a8e).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/22171
  
    @vinodkc Could you answer the question from @cloud-fan ?


---

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


[GitHub] spark issue #22171: [SPARK-25177][SQL] When dataframe decimal type column ha...

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

    https://github.com/apache/spark/pull/22171
  
    Merged build finished. Test PASSed.


---

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