You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgeny Stanilovsky (Jira)" <ji...@apache.org> on 2024/01/11 07:46:00 UTC

[jira] [Assigned] (IGNITE-21134) Sql. UPPER, LOWER and SUBSTRING functions must support NULL values

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

Evgeny Stanilovsky reassigned IGNITE-21134:
-------------------------------------------

    Assignee: Evgeny Stanilovsky

> Sql. UPPER, LOWER and SUBSTRING functions must support NULL values
> ------------------------------------------------------------------
>
>                 Key: IGNITE-21134
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21134
>             Project: Ignite
>          Issue Type: Bug
>          Components: clients, sql
>    Affects Versions: 3.0.0-beta2
>            Reporter: Andrey Khitrin
>            Assignee: Evgeny Stanilovsky
>            Priority: Major
>              Labels: ignite-3
>
> As described in ANSI99 specification, functions UPPER and LOWER must return NULL values for NULL argument:
>  
> ??5) If <fold> is specified, then:??
> ?? .. b) if S is the null value, then the result of the <fold> is the null value.??
> In the recent AI3 (commit c2ac5850973ae3bfd44b06fc6e3b5880f9f292f1) an error is shown instead:
> {code:sql}
> sql-cli> SELECT UPPER(NULL);
> Unknown error
> Unsupported Column type NULL
> sql-cli> SELECT LOWER(NULL);
> Unknown error
> Unsupported Column type NULL
> sql-cli> SELECT SUBSTRING(NULL FROM 1 FOR 2);
> Unknown error
> Unsupported Column type NULL{code}
> {*}NOTE{*}: Most probably, it may be caused by client module, not sql module because a text of error is located in client-common module:
> {code:java}
> $ grep -r 'Unsupported Column type' modules/*/src/main
> modules/client-common/src/main/java/org/apache/ignite/internal/jdbc/JdbcConverterUtils.java:                throw new IllegalArgumentException("Unsupported Column type " + columnType);
> {code}
> And when I add the following assertion to some test in ItFunctionsTest, it passes:
> {code:java}
>         assertQuery("SELECT LOWER(NULL)").returns(null).check();
> {code}
> Previous AI3 versions allowed using NULL values in UPPER and LOWER functions, hence it's a degradation.



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