[ 
https://issues.apache.org/jira/browse/SPARK-20563?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hyukjin Kwon resolved SPARK-20563.
----------------------------------
    Resolution: Not A Problem

I am resolving this per ^. Please reopen this if I misunderstood.

> going to DataFrame to RDD and back changes the schema, if the schema is not 
> explicitly provided
> -----------------------------------------------------------------------------------------------
>
>                 Key: SPARK-20563
>                 URL: https://issues.apache.org/jira/browse/SPARK-20563
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 2.1.0
>            Reporter: Danil Kirsanov
>            Priority: Minor
>
> df.rdd.toDF() converts the DataFrame of IntegerType to the LongType if the 
> schema is not explicitly provided in toDF().
> Below is a full reproduction code
> -------------------------------------
> from pyspark.sql.types import IntegerType, StructType, StructField
> schema = StructType([StructField("a",IntegerType(),True), 
> StructField("b",IntegerType(),True)])
> df_test = spark.createDataFrame([(1,2)], schema)
> df_test.printSchema()
> df_test.rdd.toDF().printSchema()



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to