You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jork Zijlstra (JIRA)" <ji...@apache.org> on 2016/11/04 10:46:00 UTC
[jira] [Created] (SPARK-18270) Users schema with non-nullable
properties is overidden with true
Jork Zijlstra created SPARK-18270:
-------------------------------------
Summary: Users schema with non-nullable properties is overidden with true
Key: SPARK-18270
URL: https://issues.apache.org/jira/browse/SPARK-18270
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 2.0.1
Reporter: Jork Zijlstra
Users schema with non-nullable properties is overidden with true in CSVRelation.csvParser.
The schema that is given to the CSVRelation.csvParser(schema: StructType) isnt the version that is user specifies.
All nullable option are set to true
Specifying the schema:
StructType(Array(
StructField("id", IntegerType, nullable = false),
StructField("underlyingId", IntegerType, true)
))
Read the data:
sparkSession.read
.schema(sourceSchema)
.option("header", "false")
.option("delimiter", """\t""")
.csv(files(dates): _*)
.rdd
Actual Result:
schema inside csvParser contains only nullable = true values.
--
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