You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "colin fang (JIRA)" <ji...@apache.org> on 2019/04/24 18:59:00 UTC
[jira] [Created] (SPARK-27559) Nullable in a given schema is not
respected when reading from parquet
colin fang created SPARK-27559:
----------------------------------
Summary: 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: Spark Core
Affects Versions: 2.4.2
Reporter: colin fang
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