You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/30 19:07:56 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #26319: [SPARK-29594][SQL] Create a Dataset from a Sequence of Case class where…

dongjoon-hyun 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_r340807635
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
 ##########
 @@ -543,6 +543,12 @@ object ScalaReflection extends ScalaReflection {
             throw new UnsupportedOperationException(s"`$fieldName` is a reserved keyword and " +
               "cannot be used as field name\n" + walkedTypePath)
           }
+          // It is ok to use head here because a variable name needs to be non empty
+          if (fieldName.head.isDigit) {
+            throw new UnsupportedOperationException(s"`$fieldName` is a word that starts with a " +
+              "number and cannot be used as field name" + "A work around to this problem is to " +
 
 Review comment:
   - `name"` -> `name."`
   - `work around` -> `workaround`.
   
   And, I guess we don't need to split there, `field name. A workaround is to convert " +`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org