[ https://issues.apache.org/jira/browse/SPARK-12371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-12371: ------------------------------------ Assignee: Apache Spark (was: Cheng Lian) > Make sure Dataset nullability conforms to its underlying logical plan > --------------------------------------------------------------------- > > Key: SPARK-12371 > URL: https://issues.apache.org/jira/browse/SPARK-12371 > Project: Spark > Issue Type: Sub-task > Components: SQL > Affects Versions: 1.6.0, 2.0.0 > Reporter: Cheng Lian > Assignee: Apache Spark > > Currently it's possible to construct a Dataset with different nullability > from its underlying logical plan, which should be caught during analysis > phase: > {code} > val rowRDD = sqlContext.sparkContext.parallelize(Seq(Row("hello"), Row(null))) > val schema = StructType(Seq(StructField("_1", StringType, nullable = false))) > val df = sqlContext.createDataFrame(rowRDD, schema) > df.as[Tuple1[String]].collect().foreach(println) > // Output: > // > // (hello) > // (null) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org