MaxGekk commented on code in PR #48397:
URL: https://github.com/apache/spark/pull/48397#discussion_r1795415992
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -606,6 +606,12 @@
],
"sqlState" : "42711"
},
+ "COLUMN_ARRAY_ELEMENT_TYPE_MISMATCH" : {
Review Comment:
The error is pretty specific to JDBC. Should we create sub-class of
`FAILED_JDBC`?
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -1257,6 +1257,12 @@ private[sql] object QueryExecutionErrors extends
QueryErrorsBase with ExecutionE
"dataType" -> toSQLType(dataType)))
}
+ def wrongDatatypeInSomeRows(pos: Int, dataType: DataType): SparkSQLException
= {
+ new SparkSQLException(
+ errorClass = "COLUMN_ARRAY_ELEMENT_TYPE_MISMATCH",
+ messageParameters = Map("pos" -> pos.toString(), "type" ->
dataType.typeName))
Review Comment:
Please, quote the data type by `toSQLType`:
```suggestion
messageParameters = Map("pos" -> pos.toString(), "type" ->
toSQLType(dataType)))
```
--
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]