[
https://issues.apache.org/jira/browse/CALCITE-6397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17845468#comment-17845468
]
Julian Hyde commented on CALCITE-6397:
--------------------------------------
The Spark specification is not always great. According to the Spark site, the
ADD_MONTHS takes a string argument, but the same function on DataBricks site
takes a date.
My instinct (reading the Oracle description of NVL2) is that {{NVL2(a, b, c)}}
is equivalent to {{CASE WHEN a IS NULL THEN b ELSE c END}} and should use the
same type-checking strategy (find the most general type of b and c, fail if
there is no general type).
> Add NVL2 function (enabled in Spark library)
> --------------------------------------------
>
> Key: CALCITE-6397
> URL: https://issues.apache.org/jira/browse/CALCITE-6397
> Project: Calcite
> Issue Type: New Feature
> Reporter: Caican Cai
> Priority: Major
> Labels: pull-request-available
>
> Add NVL2 function (enabled in Spark library)
>
> https://spark.apache.org/docs/2.3.0/api/sql/index.html#nvl2
--
This message was sent by Atlassian Jira
(v8.20.10#820010)