You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "t oo (JIRA)" <ji...@apache.org> on 2019/02/15 23:37:00 UTC

[jira] [Commented] (SPARK-23576) SparkSQL - Decimal data missing decimal point

    [ https://issues.apache.org/jira/browse/SPARK-23576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769864#comment-16769864 ] 

t oo commented on SPARK-23576:
------------------------------

gentle ping

> SparkSQL - Decimal data missing decimal point
> ---------------------------------------------
>
>                 Key: SPARK-23576
>                 URL: https://issues.apache.org/jira/browse/SPARK-23576
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.0
>         Environment: spark 2.3.0
> linux
>            Reporter: R
>            Priority: Major
>
> Integers like 3 stored as a decimal display in sparksql as 30000000000 with no decimal point. But hive displays fine as 3.
> Repro steps:
>  # Create a .csv with the value 3
>  # Use spark to read the csv, cast it as decimal(31,8) and output to an ORC file
>  # Use spark to read the ORC, infer the schema (it will infer 38,18 precision) and output to a Parquet file
>  # Create external hive table to read the parquet ( define the hive type as decimal(31,8))
>  # Use spark-sql to select from the external hive table.
>  # Notice how sparksql shows 30000000000    !!!
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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