You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Shivaram Venkataraman (JIRA)" <ji...@apache.org> on 2016/10/04 22:39:20 UTC

[jira] [Commented] (SPARK-17608) Long type has incorrect serialization/deserialization

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

Shivaram Venkataraman commented on SPARK-17608:
-----------------------------------------------

I think the loss of precision is orthogonal to the problem of maintaining the same schema as we go from R -> JVM -> R. In this case for long data we need some way to look at the schema and then say that the doubles need to actually be sent with "type = long" in serialize.R and conversely in SerDe.scala we need to know that while reading longs we will be getting doubles.  Will this solve your problem [~iamthomaspowell] ?

> Long type has incorrect serialization/deserialization
> -----------------------------------------------------
>
>                 Key: SPARK-17608
>                 URL: https://issues.apache.org/jira/browse/SPARK-17608
>             Project: Spark
>          Issue Type: Bug
>          Components: SparkR
>    Affects Versions: 2.0.0
>            Reporter: Thomas Powell
>
> Am hitting issues when using {{dapply}} on a data frame that contains a {{bigint}} in its schema. When this is converted to a SparkR data frame a "bigint" gets converted to a R {{numeric}} type: https://github.com/apache/spark/blob/master/R/pkg/R/types.R#L25.
> However, the R {{numeric}} type gets converted to {{org.apache.spark.sql.types.DoubleType}}: https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/api/r/SQLUtils.scala#L97.
> The two directions therefore aren't compatible. If I use the same schema when using dapply (and just an identity function) I will get type collisions because the output type is a double but the schema expects a bigint. 



--
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