Skip to content

[BUG] NULLIF() function result is wrong #5858

@xinyiZzz

Description

@xinyiZzz

Describe the bug

case1: doris own value is different

     SELECT NULLIF (91, CAST(69 AS DECIMAL) );
     Result: 0

     SELECT NULLIF (91, CAST(69 AS INT) );
     Results: 91

case2: different from mysql value

     SELECT ALL NULLIF (-98, NULL) AS col0
     Doris result: NULL
     Mysql result: -98

Found through the sqllogictest test case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/sql/executionIssues or PRs related to the execution enginearea/sql/functionIssues or PRs related to the SQL functionskind/fixCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions