pg_duckdb
pg_duckdb copied to clipboard
[bug]: Lose numeric zeros when rounding in duckdb
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.
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.