itholic commented on code in PR #39705:
URL: https://github.com/apache/spark/pull/39705#discussion_r1091295305


##########
core/src/main/resources/error/error-classes.json:
##########
@@ -598,6 +598,29 @@
       "Please try to re-create the view by running: <suggestion>."
     ]
   },
+  "INCOMPLETE_TYPE_DEFINITION" : {
+    "message" : [
+      "Incomplete complex type:"
+    ],
+    "subClass" : {
+      "ARRAY" : {
+        "message" : [
+          "The definition of \"ARRAY\" type is incomplete. You must provide an 
element type. For example: \"ARRAY<elementType>\"."

Review Comment:
   Oh, actually `<elementType>` here is a parameter so we already shows message 
like you suggested as below:
   ```scala
         case "array" =>
           new ParseException(
             errorClass = "INCOMPLETE_TYPE_DEFINITION.ARRAY",
             messageParameters = Map("elementType" -> "<INT>"),
             ctx)
         case "struct" =>
           new ParseException(
             errorClass = "INCOMPLETE_TYPE_DEFINITION.STRUCT",
             messageParameters = Map.empty,
             ctx)
         case "map" =>
           new ParseException(
             errorClass = "INCOMPLETE_TYPE_DEFINITION.MAP",
             messageParameters = Map.empty,
             ctx)
   ```
   
   It looks confusing tho... 😅 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to