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/12/08 03:29:16 UTC

[GitHub] [spark] LuciferYang commented on a diff in pull request #38960: [SPARK-41435][SQL] Make `curdate()` throw `WRONG_NUM_ARGS ` when args is not empty

LuciferYang commented on code in PR #38960:
URL: https://github.com/apache/spark/pull/38960#discussion_r1042889334


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala:
##########
@@ -172,7 +172,7 @@ object CurDateExpressionBuilder extends ExpressionBuilder {
       CurrentDate()
     } else {
       throw QueryCompilationErrors.invalidFunctionArgumentNumberError(
-        Seq.empty, funcName, expressions.length)
+        Seq(0), funcName, expressions.length)

Review Comment:
   To clarify the intention of this pr, I will change this as
   ```scala
   throw QueryCompilationErrors.invalidFunctionArgumentsError(funcName, "0", expressions.length)
   ```



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