GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/13485
[SPARK-15732][SQL] better error message when use java reserved keyword as
field name
## What changes were proposed in this pull request?
When users create a case class and use java reserved keyword as field name,
spark sql will generate illegal java code and throw exception at runtime.
This PR checks the field names when building the encoder, and if illegal
field names are used, throw exception immediately with a good error message.
## How was this patch tested?
new test in DatasetSuite
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark java
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/13485.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 #13485
----
commit 4ad5b7f40f1393c9894c3d1dcf4ef1e0e918d4eb
Author: Wenchen Fan <[email protected]>
Date: 2016-06-03T00:03:34Z
better error message when use java reserved keyword as field name
----
---
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]