PedroCorreiaLuis commented on a change in pull request #26319:
[SPARK-29594][SQL] Create a Dataset from a Sequence of Case class where…
URL: https://github.com/apache/spark/pull/26319#discussion_r394545167
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
##########
@@ -1221,6 +1221,14 @@ class DatasetSuite extends QueryTest with
SharedSparkSession {
"`abstract` is a reserved keyword and cannot be used as field name"))
}
+ test("SPARK-29594 better error message when use java field name starting
with a number") {
+ val e = intercept[UnsupportedOperationException] {
+ Seq(InvalidInJavaForNumber("HelloWorld!")).toDS()
+ }
+ assert(e.getMessage.contains(
+ "`1something` is a word that starts with a number and cannot be used as
field name"))
+ }
+
Review comment:
```suggestion
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]