spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (SPARK-12371) Make sure Dataset nullability conforms to its underlying logical plan
Date Wed, 16 Dec 2015 17:10:46 GMT

     [ 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message