MaxGekk commented on code in PR #47522:
URL: https://github.com/apache/spark/pull/47522#discussion_r1740187782
##########
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:
`DataType` is a sub-type of `AbstractDataType`, in this way you can pass to:
```scala
def toSQLType(t: AbstractDataType): String
```
--
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]