mrk-andreev commented on code in PR #47522:
URL: https://github.com/apache/spark/pull/47522#discussion_r1740186485


##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -2177,6 +2177,12 @@
     ],
     "sqlState" : "42001"
   },
+  "INVALID_EXTERNAL_TYPE" : {
+    "message" : [
+      "<actualType> is not a valid external type for schema of <expectedType> 
at <childExpression>."

Review Comment:
   But I would like to mention that 
`QueryExecutionErrors::invalidExternalTypeError` will look like this:
   
   ```
     def invalidExternalTypeError(
         actualType: String,
         expectedType: DataType,
         childExpression: Expression): SparkRuntimeException = {
       new SparkRuntimeException(
         errorClass = "INVALID_EXTERNAL_TYPE",
         messageParameters = Map(
           "externalType" -> actualType,
           "type" -> quoteByDefault(expectedType.simpleString),
           "expr" -> toSQLExpr(childExpression)
         )
       )
     }
   ```
   
   We have `actualType` => `externalType`, `expectedType` => `type`, 
`childExpression` => `exp` renaming because at least `type` is a keyword in 
Scala. 



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