dengziming commented on code in PR #43481:
URL: https://github.com/apache/spark/pull/43481#discussion_r1372507607


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -1370,21 +1370,21 @@ private[sql] object QueryExecutionErrors extends 
QueryErrorsBase with ExecutionE
   def unsupportedOperandTypeForSizeFunctionError(
       dataType: DataType): SparkUnsupportedOperationException = {
     new SparkUnsupportedOperationException(
-      errorClass = "_LEGACY_ERROR_TEMP_2156",
+      errorClass = "UNSUPPORTED_DATA_TYPE_FOR_SIZE_FUNCTION",
       messageParameters = Map(
         "dataType" -> dataType.getClass.getCanonicalName))
   }
 
   def unexpectedValueForStartInFunctionError(prettyName: String): 
SparkRuntimeException = {
     new SparkRuntimeException(
-      errorClass = "_LEGACY_ERROR_TEMP_2157",
+      errorClass = "UNEXPECTED_VALUE_FOR_START_IN_SLICE_FUNCTION",
       messageParameters = Map(
         "prettyName" -> prettyName))

Review Comment:
   Good catch, I also replaced `dataType.getClass.getCanonicalName` above with 
`toSQLType(dataType)`



##########
common/utils/src/main/resources/error/error-classes.json:
##########
@@ -1968,6 +1968,11 @@
           "expects one of the units without quotes YEAR, QUARTER, MONTH, WEEK, 
DAY, DAYOFYEAR, HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND, but got the 
string literal <invalidValue>."
         ]
       },
+      "LENGTH" : {

Review Comment:
   Not sure this name is appropriate, do you have better idea? @MaxGekk 



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