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

wrong toDecimalX minus result #20283

Closed
chenbo1989 opened this issue Feb 10, 2021 · 3 comments · Fixed by #20339
Closed

wrong toDecimalX minus result #20283

chenbo1989 opened this issue Feb 10, 2021 · 3 comments · Fixed by #20339
Assignees
Labels
bug Confirmed user-visible misbehaviour in official release comp-decimal major

Comments

@chenbo1989
Copy link

I've been studying basic usage and I found wrong minus result on DecimalXX type.

Example Query
select toDecimal64(4,4) - toDecimal32(2,2)

Expected output
2.0000

Actual output
3.9800

Is there anything wrong or maybe my misunderstanding of toDecimal ?

image

How to reproduce

  1. OS: macOS Catalina 10.15.5
  2. server: clickhouse-server, built from source, version 21.3.1.1
  3. client: clickhouse-client, built from source, version 21.3.1.1
@chenbo1989 chenbo1989 added the bug Confirmed user-visible misbehaviour in official release label Feb 10, 2021
@filimonov
Copy link
Contributor

Confirmed. It's a bug.

@filimonov
Copy link
Contributor

20.12 and before are not affected. Thanks for the report!

@nikitamikhaylov nikitamikhaylov self-assigned this Feb 11, 2021
@alexey-milovidov
Copy link
Member

Broken in #18145.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed user-visible misbehaviour in official release comp-decimal major
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants