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 2019/04/25 05:43:00 UTC
[jira] [Updated] (SPARK-27559) Nullable in a given schema is not
respected when reading from parquet
[ https://issues.apache.org/jira/browse/SPARK-27559?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-27559:
---------------------------------
Component/s: (was: Spark Core)
SQL
> Nullable in a given schema is not respected when reading from parquet
> ---------------------------------------------------------------------
>
> Key: SPARK-27559
> URL: https://issues.apache.org/jira/browse/SPARK-27559
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 2.4.2
> Reporter: colin fang
> Priority: Minor
>
> Even if I specify a schema when reading from parquet, nullable is not reset.
> {code:java}
> spark.range(10, numPartitions=1).write.mode('overwrite').parquet('tmp')
> df1 = spark.read.parquet('tmp')
> df1.printSchema()
> # root
> # |-- id: long (nullable = true)
> df2 = spark.read.schema(StructType([StructField('id', LongType(), False)])).parquet('tmp')
> df2.printSchema()
> # root
> # |-- x: long (nullable = true)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org