[
https://issues.apache.org/jira/browse/SPARK-16562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15970340#comment-15970340
]
Hyukjin Kwon edited comment on SPARK-16562 at 4/16/17 11:16 AM:
----------------------------------------------------------------
This seems not a problem to me. Please see my PR linked.
was (Author: hyukjin.kwon):
This seems not a problem to me. Please my PR linked.
> 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.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]