-
- Downloads
[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 Author: Wenchen Fan <wenchen@databricks.com> Closes #13485 from cloud-fan/java.
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala 11 additions, 0 deletions...scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
- sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala 10 additions, 0 deletions...re/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
Loading
Please register or sign in to comment