GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/13401
[SPARK-15657][SQL] RowEncoder should validate the data type of input object
## What changes were proposed in this pull request?
This PR improves the error handling of `RowEncoder`. When we create a
`RowEncoder` with a given schema, we should validate the data type of input
object. e.g. we should throw an exception when a field is boolean but is
declared as a string column.
This PR also removes the support to use `Product` as a valid external type
of struct type. This support is added at
https://github.com/apache/spark/pull/9712, but is incomplete, e.g. nested
product, product in array are both not working. However, we never officially
support this feature and I think it's ok to ban it.
## How was this patch tested?
new tests in `RowEncoderSuite`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark bug
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/13401.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 #13401
----
commit 7b30e7030d14c99a42f7b1e23c9953c9bfbdb536
Author: Wenchen Fan <[email protected]>
Date: 2016-05-31T03:21:12Z
validates input data type in RowEncoder
----
---
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]