[
https://issues.apache.org/jira/browse/SPARK-15191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nicholas Chammas updated SPARK-15191:
-------------------------------------
Affects Version/s: 1.6.1
> createDataFrame() should mark fields that are known not to be null as not
> nullable
> ----------------------------------------------------------------------------------
>
> Key: SPARK-15191
> URL: https://issues.apache.org/jira/browse/SPARK-15191
> Project: Spark
> Issue Type: Improvement
> Components: PySpark, SQL
> Affects Versions: 1.6.1
> Reporter: Nicholas Chammas
> Priority: Minor
>
> Here's a brief reproduction:
> {code}
> >>> numbers = sqlContext.createDataFrame(
> ... data=[(1,), (2,), (3,), (4,), (5,)],
> ... samplingRatio=1 # go through all the data please!
> ... )
> >>> numbers.printSchema()
> root
> |-- _1: long (nullable = true)
> {code}
> The field is marked as nullable even though none of the data is null and we
> had {{createDataFrame()}} go through all the data.
> In situations like this, shouldn't {{createDataFrame()}} return a DataFrame
> with the field marked as not nullable?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]