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

ASF GitHub Bot updated CALCITE-6702:
------------------------------------
    Labels: pull-request-available  (was: )

> Strong Policy for the `SqlStdOperatorTable.POWER` is wrongly assigned `AS_IS` 
> when it should be `ANY`
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6702
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6702
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Dhia Eddine Nini
>            Assignee: Dhia Eddine Nini
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2024-11-20-17-14-28-261.png
>
>
> +Context:+
> In standard SQL (such as MySQL and PostgreSQL), running the following queries:
> {code:java}
> SELECT POWER(NULL, 2) AS "ALIAS1";
> SELECT POWER(2, NULL) AS "ALIAS2";{code}
> Returns for both queries:
> {code:java}
> NULL
> {code}
> This means that the proper null policy for the expression is `ANY` instead of 
> `AS_IS`, since this expression is null {*}if and only if at least one of its 
> arguments is null{*}.
> !image-2024-11-20-17-14-28-261.png!
> The `SqlKind` of the the POWER function is `SqlKind.OTHER_FUNCTION`
> The fix should be relatively simple.



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

Reply via email to