ivoson commented on code in PR #36259: URL: https://github.com/apache/spark/pull/36259#discussion_r853727398
########## sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryParsingErrors.scala: ########## @@ -416,13 +437,20 @@ object QueryParsingErrors extends QueryErrorsBase { } def createFuncWithBothIfNotExistsAndReplaceError(ctx: CreateFunctionContext): Throwable = { - new ParseException("INVALID_SQL_SYNTAX", - Array("CREATE FUNCTION with both IF NOT EXISTS and REPLACE is not allowed."), ctx) + new ParseException( + errorClass = "INVALID_SQL_SYNTAX", + messageParameters = Array( + s"${toSQLStmt("CREATE FUNCTION")} with both ${toSQLStmt("IF NOT EXISTS")} " + + s"and ${toSQLStmt("REPLACE")} is not allowed."), + ctx) } def defineTempFuncWithIfNotExistsError(ctx: CreateFunctionContext): Throwable = { - new ParseException("INVALID_SQL_SYNTAX", - Array("It is not allowed to define a TEMPORARY function with IF NOT EXISTS."), ctx) + new ParseException( + errorClass = "INVALID_SQL_SYNTAX", + messageParameters = Array( + s"It is not allowed to define a ${toSQLStmt("TEMPORARY")} function" + Review Comment: I am wondering that should the `temporary function` here be the sql statement? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org