GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/15979
[SPARK-18251][SQL] the type of Dataset can't be Option of non-flat type
## What changes were proposed in this pull request?
For input object of non-flat type, we can't encode it to row if it's null,
as Spark SQL doesn't allow the entire row to be null, only its columns can be
null. That's the reason we forbid users to use top level null objects in
https://github.com/apache/spark/pull/13469
However, if users wrap non-flat type with `Option`, then we may still
encoder top level null object to row, which is not allowed.
This PR fixes this case, and suggests users to use `Tuple1` if they do
wanna top level null objects.
(Please fill in changes proposed in this fix)
## How was this patch tested?
new test
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark option
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15979.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #15979
----
commit cb834b81f7a56648373213819b4abeaf1b1bd304
Author: Wenchen Fan <[email protected]>
Date: 2016-11-22T14:06:57Z
the type of Dataset can't be Option of non-flat type
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]