[
https://issues.apache.org/jira/browse/CALCITE-6396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17844481#comment-17844481
]
Julian Hyde commented on CALCITE-6396:
--------------------------------------
The first argument, and the return, should be a {{{}DATE{}}}.
Is {{ADD_MONTHS(d, n)}} equivalent to {{{}DATEADD(MONTH, d, n){}}}? If so, you
should implement it using rewrites (same way that {{DATEADD}} is implemented),
not by adding a method to {{{}SqlFunctions{}}}.
You should test negative values of n.
> Add ADD_MONTHS function (enabled in Spark library)
> --------------------------------------------------
>
> Key: CALCITE-6396
> URL: https://issues.apache.org/jira/browse/CALCITE-6396
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.36.0
> Reporter: Caican Cai
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.38.0
>
>
> Add ADD_MONTHS function (enabled in Spark library)
>
> https://spark.apache.org/docs/2.3.0/api/sql/index.html#add_months
--
This message was sent by Atlassian Jira
(v8.20.10#820010)