cloud-fan commented on code in PR #36307:
URL: https://github.com/apache/spark/pull/36307#discussion_r858767219
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -231,14 +231,14 @@ object QueryExecutionErrors extends QueryErrorsBase {
def literalTypeUnsupportedError(v: Any): RuntimeException = {
new SparkRuntimeException(
errorClass = "UNSUPPORTED_FEATURE",
- messageParameters = Array(s"literal for '${v.toString}' of
${v.getClass.toString}."))
+ messageParameters = Array("LITERAL_TYPE", s"${v.toString}",
s"${v.getClass.toString}"))
}
def pivotColumnUnsupportedError(v: Any, dataType: DataType):
RuntimeException = {
new SparkRuntimeException(
errorClass = "UNSUPPORTED_FEATURE",
- messageParameters = Array(
- s"pivoting by the value '${v.toString}' of the column data type
${toSQLType(dataType)}."))
+ messageParameters = Array("PIVOT_UNSUPPORTED_TYPE",
Review Comment:
shall we have a more consistent naming for the sub error class name? e.g.
`LITERAL_TYPE` vs `PIVOT_UNSUPPORTED_TYPE`. Given that we will put
`[PARENT_ERROR.CHILD_ERROR]` in the message, probably
`[UNSUPPORTED_FEATURE.PIVOT_TYPE]` is better?
--
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]