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 11:21:03 UTC

[GitHub] [spark] panbingkun opened a new pull request, #38319: [SPARK-40856][SQL] Update the error template of WRONG_NUM_PARAMS

panbingkun opened a new pull request, #38319:
URL: https://github.com/apache/spark/pull/38319

   ### What changes were proposed in this pull request?
   The pr aim to Update the error template of WRONG_NUM_PARAMS.
   
   ### Why are the changes needed?
   More general.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes the PR changes user-facing error messages.
   
   
   ### How was this patch tested?
   - Existed UT.
   - Pass GA.


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


[GitHub] [spark] MaxGekk closed pull request #38319: [SPARK-40856][SQL] Update the error template of WRONG_NUM_PARAMS

Posted by GitBox <gi...@apache.org>.
MaxGekk closed pull request #38319: [SPARK-40856][SQL] Update the error template of WRONG_NUM_PARAMS
URL: https://github.com/apache/spark/pull/38319


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


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

Posted by GitBox <gi...@apache.org>.
panbingkun commented on PR #38319:
URL: https://github.com/apache/spark/pull/38319#issuecomment-1286614833

   > @panbingkun Seems like a connection issue:
   > 
   > ```
   > [error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbteclipse:sbteclipse-plugin;sbtVersion=1.0;scalaVersion=2.12:5.2.4
   > ```
   > 
   > Could you re-trigger GAs, please.
   
   Done


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


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

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on PR #38319:
URL: https://github.com/apache/spark/pull/38319#issuecomment-1285832407

   Can one of the admins verify this patch?


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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #38319:
URL: https://github.com/apache/spark/pull/38319#issuecomment-1287796420

   +1, LGTM. Merging to master.
   Thank you, @panbingkun.


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
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 `> 1` 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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #38319:
URL: https://github.com/apache/spark/pull/38319#issuecomment-1286468307

   @panbingkun Seems like a connection issue:
   ```
   [error] sbt.librarymanagement.ResolveException: Error downloading com.typesafe.sbteclipse:sbteclipse-plugin;sbtVersion=1.0;scalaVersion=2.12:5.2.4
   ```
   Could you re-trigger GAs, please.


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


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

Posted by GitBox <gi...@apache.org>.
panbingkun commented on code in PR #38319:
URL: https://github.com/apache/spark/pull/38319#discussion_r1001495470


##########
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:
   Done



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