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]: Lose numeric zeros when rounding in duckdb #309

Open
JelteF opened this issue Oct 18, 2024 · 1 comment
Open

[bug]: Lose numeric zeros when rounding in duckdb #309

JelteF opened this issue Oct 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JelteF
Copy link
Collaborator

JelteF commented Oct 18, 2024

Description

create table t(a numeric);
insert into t values (1.8000), (1.346);
select round(a, 2) from t;

With PG execution this returns:

 round
───────
  1.80
  1.35

With DuckDB execution this returns:

 round
───────
   1.8
  1.35

So we somehow lose the trailing 0 after rounding to two decimals. This causes differences in TPCDS output.

@JelteF JelteF added the bug Something isn't working label Oct 18, 2024
@JelteF
Copy link
Collaborator Author

JelteF commented Oct 21, 2024

FYI it seems that's because NUMERIC without a size is downgraded to a double in duckdb. I'm wondering if that's what we actually want to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant