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

Cast from huge decimal type to smaller returns wrong results #6195

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Cast from huge decimal type to smaller returns wrong results #6195

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2017-01-27 12:57:46 +0100
From: Gatis Ozolins <<g.ozolins>>
To: SQL devs <>
Version: 11.25.5 (Dec2016-SP1)

Last updated: 2017-03-03 10:24:39 +0100

Comment 24926

Date: 2017-01-27 12:57:46 +0100
From: Gatis Ozolins <<g.ozolins>>

User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Build Identifier:

Only happens if larger decimal type has more than 18 digits after point.

Reproducible: Always

Steps to Reproduce:

select CAST(CAST(1 AS DECIMAL(20,19)) AS DECIMAL(12,8))

Actual Results:

-0.84467441

Expected Results:

1.00000000

Comment 24927

Date: 2017-01-27 13:12:32 +0100
From: @sjoerdmullender

This was already fixed in the current Dec2016 branch (after the Dec2016-SP1 release). My guess is, the fix was in changeset 542cea1b704c Also see bug #6192 and changeset 412cc3428d91

Comment 24928

Date: 2017-01-27 13:18:52 +0100
From: MonetDB Mercurial Repository <>

Changeset 1bff10f50a19 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=1bff10f50a19

Changeset description:

Added test for bug #6195.

Comment 25123

Date: 2017-03-03 10:24:39 +0100
From: @sjoerdmullender

Dec2016-SP2 has been released, incorporating the fix.

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants