Skip to content

[Bug] conv() with float value as input parameter leads to incorrect result #39618

@yoursweetie

Description

@yoursweetie

Search before asking

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

Version

2.1

What's Wrong?

conv() with float value as input parameter leads to incorrect result

What You Expected?

float value or other illegal values are banned from conv() function

How to Reproduce?

Just execute

create table test_tb(int_1 int, float_2 float);

insert into test_tb values(1, 1.464868);

select conv(float_2,10,2),float_2 from test_tb;

图片

The result "0" is incorrect, it should be like "0 01111111 01110111000000011001011"

图片

BTW, I suggest that the conv() prohibits floating-point numbers as input parameters

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