Skip to content

[Bug] Function ifnull if value type is double or decimal return only digits before the decimal point #23623

@MRYOG

Description

@MRYOG

Search before asking

  • I had searched in the issues and found no similar issues.

Version

1.2.6-release

What's Wrong?

create SQL :
CREATE TABLE test_ifnull (
id int(11) NULL COMMENT '',
t_decimal DECIMALV3(26, 9) NULL,
test_double double NULL
) ENGINE = OLAP
DUPLICATE KEY(id)
COMMENT 'test_table'
DISTRIBUTED BY HASH(id) BUCKETS 1
PROPERTIES (
"compression" = "ZSTD"
);

insert SQL:
insert into test_ifnull VALUES(1,11111.11111,2222.22222)

test SQL :
select id,t_decimal,test_double,ifnull(t_decimal,test_double) as if_dou,ifnull(test_double,t_decimal) as if_dei from test_ifnull

What You Expected?

return right value

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions