Describe the bug
ceil and floor on decimal inputs can raise a spurious overflow because it reuses the input value's scale and precision.
To Reproduce
> select ceil(CAST(9.9 AS DECIMAL(2,1)));
Arrow error: Compute error: Decimal overflow while applying ceil
> SELECT floor(CAST(-9.9 AS DECIMAL(2,1)));
Arrow error: Compute error: Decimal overflow while applying floor
Expected behavior
The queries should return 10 and -10, respectively, which is what Postgres and DuckDB both do.
Additional context
No response
Describe the bug
ceilandfloorondecimalinputs can raise a spurious overflow because it reuses the input value's scale and precision.To Reproduce
Expected behavior
The queries should return
10and-10, respectively, which is what Postgres and DuckDB both do.Additional context
No response