MaxGekk commented on code in PR #40984:
URL: https://github.com/apache/spark/pull/40984#discussion_r1181425384


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ObjectExpressionsSuite.scala:
##########
@@ -459,6 +459,19 @@ class ObjectExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
     }
   }
 
+  test("UnresolvedMapObjects should support interpreted execution") {
+    val inputExpr = Literal(1)
+    val func = (expr: Expression) => expr
+    val customCls: Option[Class[_]] = None
+
+    checkError(
+      exception = intercept[SparkUnsupportedOperationException] {
+        UnresolvedMapObjects(func, inputExpr, customCls).dataType

Review Comment:
   Could you try to trigger the error from user code. BTW, the error classes 
should be assigned to user-facing errors.



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1599,6 +1599,11 @@
     },
     "sqlState" : "42703"
   },
+  "UNRESOLVED_CUSTOM_CLASS": {
+    "message": [
+      "Could not resolve custom collection class. Please ensure that the class 
name is correct and that the class is available on the classpath."

Review Comment:
   ```suggestion
         "Cannot resolve the custom collection class: <className>. Please 
ensure that the class name is correct and it is available on the classpath."
   ```



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1599,6 +1599,11 @@
     },
     "sqlState" : "42703"
   },
+  "UNRESOLVED_CUSTOM_CLASS": {
+    "message": [

Review Comment:
   Could you run:
   ```
   $ build/sbt "core/testOnly *SparkThrowableSuite"
   ```
   It should catch the format errors in `error-classes.json`



##########
core/src/main/resources/error/error-classes.json:
##########
@@ -1599,6 +1599,11 @@
     },
     "sqlState" : "42703"
   },
+  "UNRESOLVED_CUSTOM_CLASS": {
+    "message": [

Review Comment:
   ```suggestion
       "message" : [
   ```



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