You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Khitrin (Jira)" <ji...@apache.org> on 2023/04/21 14:45:00 UTC

[jira] [Created] (IGNITE-19345) SQL: incorrect NULLIF behavior in some cases

Andrey Khitrin created IGNITE-19345:
---------------------------------------

             Summary: SQL: incorrect NULLIF behavior in some cases
                 Key: IGNITE-19345
                 URL: https://issues.apache.org/jira/browse/IGNITE-19345
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 3.0.0-beta1
            Reporter: Andrey Khitrin


During the validation of IGNITE-18167, the following error was found:
{code:sql}
sql-cli> SELECT NULLIF(1, 1) IS NULL;
SQL query execution error
Exception while executing query [query=SELECT NULLIF(1, 1) IS NULL;]. Error message:From line 1, column 8 to line 1, column 19: Illegal mixing of types in CASE or COALESCE statement
{code}

For chars, it works correctly:
{code:sql}
sql-cli> SELECT NULLIF('1', '1') IS NULL;
╔═════════╗
║ EXPR$0  ║
╠═════════╣
║ true    ║
╚═════════╝
{code}

For slightly more complex numeric query, it also works correctly:
{code:sql}
sql-cli> SELECT x IS NULL FROM (SELECT NULLIF(1, 1) AS x);
╔═════════╗
║ EXPR$0  ║
╠═════════╣
║ true    ║
╚═════════╝
{code}



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