You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Josh Rosen (JIRA)" <ji...@apache.org> on 2015/05/31 23:07:17 UTC

[jira] [Commented] (SPARK-7192) Pyspark casts hive bigint to int

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

Josh Rosen commented on SPARK-7192:
-----------------------------------

AFAIK in Python 2.6+ Python will support arbitrary precision integers automatically.  See https://stackoverflow.com/questions/538551/handling-very-large-numbers-in-python

Do you have an example of where we're losing precision in the Hive -> Python conversion?  If so, it would be great if you could post some sample code demonstrating that.

> Pyspark casts hive bigint to int
> --------------------------------
>
>                 Key: SPARK-7192
>                 URL: https://issues.apache.org/jira/browse/SPARK-7192
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark, SQL
>    Affects Versions: 1.3.0
>            Reporter: Tamas Jambor
>
> It seems that pyspark reads bigint from hive and stores it as an int:
> >> hive_ctx = HiveContext(sc)
> >> data = hive_ctx.sql("select col1, col2 from dataset1")
> >> data
> DataFrame[col1: int, col2: bigint]
> >> c_t = [type(v) for v in data.collect()[0]]
> >> c_t
> [int, int]



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