[ 
https://issues.apache.org/jira/browse/SPARK-43492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17722439#comment-17722439
 ] 

Jia Fan commented on SPARK-43492:
---------------------------------

I can fix this.

> Define the DATE_ADD and DATE_DIFF functions with 3-args
> -------------------------------------------------------
>
>                 Key: SPARK-43492
>                 URL: https://issues.apache.org/jira/browse/SPARK-43492
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Max Gekk
>            Assignee: Max Gekk
>            Priority: Major
>
> Spark supports the DATE_ADD and DATE_DIFF functions with 2 arguments but when 
> an user calls the same functions with 3 arguments, Spark SQL outputs the 
> confusing error:
> {code:sql}
> spark-sql (default)> select date_add(MONTH, 1, date'2023-05-13');
> [UNRESOLVED_COLUMN.WITHOUT_SUGGESTION] A column or function parameter with 
> name `MONTH` cannot be resolved. ; line 1 pos 16;
> 'Project [unresolvedalias('date_add('MONTH, 1, 2023-05-13), None)]
> +- OneRowRelation
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to