MaxGekk commented on code in PR #40951:
URL: https://github.com/apache/spark/pull/40951#discussion_r1181482386


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala:
##########
@@ -413,10 +413,10 @@ private[sql] object QueryExecutionErrors extends 
QueryErrorsBase {
       messageParameters = Map("frequencyExpression" -> 
frequencyExpression.sql))
   }
 
-  def addNewFunctionMismatchedWithFunctionError(funcName: String): 
SparkIllegalArgumentException = {
-    new SparkIllegalArgumentException(
-      errorClass = "_LEGACY_ERROR_TEMP_2014",
-      messageParameters = Map("funcName" -> funcName))
+  def addNewFunctionMismatchedWithFunctionError(funcName: String): Throwable = 
{
+    SparkException.internalError(
+      "Cannot add new function to generated class, " +
+        s"failed to match $funcName at addNewFunction")

Review Comment:
   Could you quote the names as we do in other places, please:
   ```suggestion
           s"failed to match ${toSQLId(funcName)} at `addNewFunction`.")
   ```



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