You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/19 09:42:00 UTC

[jira] [Updated] (FLINK-26949) Add NVL supported in SQL & Table API

     [ https://issues.apache.org/jira/browse/FLINK-26949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated FLINK-26949:
-----------------------------------
    Labels: pull-request-available  (was: )

> Add NVL supported in SQL & Table API
> ------------------------------------
>
>                 Key: FLINK-26949
>                 URL: https://issues.apache.org/jira/browse/FLINK-26949
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>            Reporter: dalongliu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.16.0
>
>
> Returns {{expr2}} if {{expr1}} is {{{}NULL{}}}, or {{expr1}} otherwise.
> Syntax:
> {code:java}
> nvl(expr1, expr2) {code}
> Arguments:
>  * {{{}expr1{}}}: An expression of any type.
>  * {{{}expr2{}}}: An expression that shares a least common type with {{{}expr1{}}}.
> Reutrns:
> The result type is the least common type of the argument types.
> This function is a synonym for {{{}coalesce(expr1, expr2){}}}.
> Examples:
> {code:java}
> > SELECT nvl(NULL, 2);
>  2
> > SELECT nvl(3, 2);
>  3
>  {code}
> See more:
>  * [Spark|https://spark.apache.org/docs/latest/api/sql/index.html#nvl]
>  * [Hive|https://cwiki.apache.org/confluence/display/hive/languagemanual+udf]



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