You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/10/20 16:03:17 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #38319: [SPARK-40856][SQL] Update the error template of WRONG_NUM_PARAMS

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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/CallMethodViaReflection.scala:
##########
@@ -64,7 +64,10 @@ case class CallMethodViaReflection(children: Seq[Expression])
     if (children.size < 2) {
       DataTypeMismatch(
         errorSubClass = "WRONG_NUM_PARAMS",
-        messageParameters = Map("actualNum" -> children.length.toString))
+        messageParameters = Map(
+          "functionName" -> prettyName,
+          "expectedNum" -> "at least two",

Review Comment:
   Let's pass `>= 2` instead of `at least two` to don't depend on English. When we will translate `error-classes.json` to a local language, it would be nice to avoid error messages in different languages.



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org