karenfeng commented on a change in pull request #33806:
URL: https://github.com/apache/spark/pull/33806#discussion_r719688413



##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -118,6 +157,18 @@
     "message" : [ "PARTITION clause cannot contain a non-partition column 
name: %s" ],
     "sqlState" : "42000"
   },
+  "NOT_PUBLIC_CLASS" : {
+    "message" : [ "%s is not a public class. Only public classes are 
supported." ],
+    "sqlState" : "0A000"
+  },
+  "NOT_USER_DEFINED_TYPE" : {
+    "message" : [ "%s is not an UserDefinedType. Please make sure registering 
an UserDefinedType for %s" ],
+    "sqlState" : "42000"
+  },
+  "ONLY_SUPPORT_DATA_SOURCES_PROVIDING_FILE_FORMAT" : {

Review comment:
       ONLY_SUPPORT_DATA_SOURCES_PROVIDING_FILE_FORMAT -> 
DATA_SOURCE_DOES_NOT_PROVIDE_FILE_FORMAT

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -110,6 +146,9 @@
     "message" : [ "Unknown static partition column: %s" ],
     "sqlState" : "42000"
   },
+  "MULTI_FAILURES_IN_STAGE_MATERIALIZATION" : {

Review comment:
       MULTI -> MULTIPLE

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -46,8 +70,20 @@
     "message" : [ "Failed to rename %s to %s as destination already exists" ],
     "sqlState" : "22023"
   },
-  "FAILED_SET_ORIGINAL_PERMISSION_BACK" : {
-    "message" : [ "Failed to set original permission %s back to the created 
path: %s. Exception: %s" ]
+  "FAIL_SET_ORIGINAL_ACL_BACK" : {
+    "message" : [ "Failed to set original ACL %s back to the created path: %s. 
Exception: %s" ],
+    "sqlState" : "42000"
+  },
+  "FAIL_SET_ORIGINAL_PERMISSION_BACK" : {
+    "message" : [ "Failed to set original permission %s back to the created 
path: %s. Exception: %s" ],
+    "sqlState" : "42000"
+  },
+  "FIELD_INDEX_ON_ROW_WITHOUT_SCHEMA" : {
+    "message" : [ "fieldIndex on a Row without schema is undefined." ],
+    "sqlState" : "07009"
+  },
+  "GET_PARENT_LOGGER_NOT_IMPLEMENTED" : {
+    "message" : [ "%s.getParentLogger is not yet implemented." ]

Review comment:
       sqlState 0A000

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -134,9 +185,17 @@
     "message" : [ "The second argument of '%s' function needs to be an 
integer." ],
     "sqlState" : "22023"
   },
+  "TIME_ZONE_ID_NOT_SPECIFIED_FOR_TIMESTAMP_TYPE" : {

Review comment:
       TIME_ZONE_ID_NOT_SPECIFIED_FOR_TIMESTAMP_TYPE -> 
TIMESTAMP_TYPE_DOES_NOT_SPECIFY_TIME_ZONE_ID

##########
File path: core/src/main/resources/error/error-classes.json
##########
@@ -46,8 +70,20 @@
     "message" : [ "Failed to rename %s to %s as destination already exists" ],
     "sqlState" : "22023"
   },
-  "FAILED_SET_ORIGINAL_PERMISSION_BACK" : {
-    "message" : [ "Failed to set original permission %s back to the created 
path: %s. Exception: %s" ]
+  "FAIL_SET_ORIGINAL_ACL_BACK" : {
+    "message" : [ "Failed to set original ACL %s back to the created path: %s. 
Exception: %s" ],
+    "sqlState" : "42000"
+  },
+  "FAIL_SET_ORIGINAL_PERMISSION_BACK" : {
+    "message" : [ "Failed to set original permission %s back to the created 
path: %s. Exception: %s" ],
+    "sqlState" : "42000"
+  },
+  "FIELD_INDEX_ON_ROW_WITHOUT_SCHEMA" : {
+    "message" : [ "fieldIndex on a Row without schema is undefined." ],
+    "sqlState" : "07009"
+  },
+  "GET_PARENT_LOGGER_NOT_IMPLEMENTED" : {

Review comment:
       GET_PARENT_LOGGER_NOT_IMPLEMENTED -> GET_PARENT_LOGGER_UNSUPPORTED

##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -1526,106 +1526,136 @@ object QueryExecutionErrors {
   }
 
   def unsupportedOperationExceptionError(): Throwable = {
-    new UnsupportedOperationException
+    new SparkUnsupportedOperationException(
+      errorClass = "UNSUPPORTED_OPERATION",

Review comment:
       The lack of error message here is really bad for the user, although this 
is technically an internal error (we should never call `defaultConcreteType` on 
`AnyDataType`). When  https://github.com/apache/spark/pull/34123 merges, can 
you use `INTERNAL_ERROR` instead, and provide a meaningful error message? In 
this case, we should also rename the class.




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