Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
yoursweetie opened this issue Aug 20, 2024 · 1 comment · Fixed by #40530
Closed
3 tasks done

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

yoursweetie opened this issue Aug 20, 2024 · 1 comment · Fixed by #40530

Comments

@yoursweetie
Copy link

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

@yiguolei
Copy link
Contributor

It will be fixed in 2.1.7

yiguolei pushed a commit that referenced this issue Sep 13, 2024
…lt (#40530)

## Proposed changes

Issue Number: close #39618

<!--Describe your changes.-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants