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

   ### What changes were proposed in this pull request?
   `curdate()`  throw 
`QueryCompilationErrors.invalidFunctionArgumentNumberError` with `Seq.empty` 
input when `expressions` is not empty, then the error class will be 
`_LEGACY_ERROR_TEMP_1043 `:
   
   ```json
   "_LEGACY_ERROR_TEMP_1043" : {
       "message" : [
         "Invalid arguments for function <name>."
       ]
     }
   ```
   
   this pr change the first input arg from `Seq.empty` to `Seq(0)` to make the 
error class use `WRONG_NUM_ARGS`:
   
   ```json
   "WRONG_NUM_ARGS" : {
       "message" : [
         "The <functionName> requires <expectedNum> parameters but the actual 
number is <actualNum>."
       ]
     }
   ```
   
   ### Why are the changes needed?
   `WRONG_NUM_ARGS` is a more appropriate error class
   
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Add new test case
   


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

Reply via email to