[
https://issues.apache.org/jira/browse/SPARK-15191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon updated SPARK-15191:
---------------------------------
Labels: bulk-closed (was: )
> 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
> Labels: bulk-closed
>
> 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
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]