mrk-andreev commented on code in PR #47522:
URL: https://github.com/apache/spark/pull/47522#discussion_r1740185625
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala:
##########
@@ -2057,14 +2055,12 @@ case class ValidateExternalType(child: Expression,
expected: DataType, externalD
if (checkType(input)) {
input
} else {
- throw new RuntimeException(s"${input.getClass.getName}$errMsg")
+ throw QueryExecutionErrors.invalidExternalTypeError(
+ input.getClass.getName, expected.simpleString, child)
Review Comment:
`expectedType: DataType` so it can not be passed into `toSQLExpr` but I can
pass it into `quoteByDefault`. It might have sense because:
```
def toSQLExpr(e: Expression): String = {
quoteByDefault(toPrettySQL(e))
}
```
--
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]