You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ken Geis (JIRA)" <ji...@apache.org> on 2015/05/01 10:39:08 UTC

[jira] [Created] (SPARK-7299) saving Oracle-source DataFrame to Hive changes scale

Ken Geis created SPARK-7299:
-------------------------------

             Summary: saving Oracle-source DataFrame to Hive changes scale
                 Key: SPARK-7299
                 URL: https://issues.apache.org/jira/browse/SPARK-7299
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 1.3.1
            Reporter: Ken Geis


When I load data from Oracle, save it to a table, then select from it, the scale is changed.

For example, I have a column defined as NUMBER(12, 2). I insert 19999 into the column. When I write that to a table and select from it, the result is 199.99.

Some databases (e.g. H2) will return this as 19999.00, but Oracle returns it as 19999. I believe that when the file is written out to parquet, the scale information is taken from the schema, not the value. In an Oracle (at least) JDBC DataFrame, the scale may be different from row to row.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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