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

[jira] [Created] (SPARK-16562) Do not allow downcast in INT32 based types for non-vectorized Parquet reader

Hyukjin Kwon created SPARK-16562:
------------------------------------

             Summary: Do not allow downcast in INT32 based types for non-vectorized Parquet reader
                 Key: SPARK-16562
                 URL: https://issues.apache.org/jira/browse/SPARK-16562
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 2.0.0
            Reporter: Hyukjin Kwon
            Priority: Minor


Currently, INT32 based types, ({{ShortType}}, {{ByteType}}, {{IntegerType}} can be downcasted in any combination. For example, the codes below:

{code}
val path = "/tmp/test.parquet"
val data = (1 to 4).map(Tuple1(_.toInt))
data.toDF("a").write.parquet(path)
val schema = StructType(StructField("a", ShortType, true) :: Nil)
spark.read.schema(schema).parquet(path).show()
{code}

work fine.

This should not be allowed.



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