You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "neilconway (via GitHub)" <gi...@apache.org> on 2026/05/25 13:46:13 UTC
[I] `power(decimal, -integer)` is incorrect [datafusion]
neilconway opened a new issue, #22510:
URL: https://github.com/apache/datafusion/issues/22510
### Describe the bug
`power` with a decimal base and negative integer exponent truncates the result incorrectly.
### To Reproduce
```
DataFusion CLI v53.1.0
> select power(CAST(2 AS DECIMAL(10,0)), -3);
+---------------------------+
| power(Int64(2),Int64(-3)) |
+---------------------------+
| 0 |
+---------------------------+
1 row(s) fetched.
Elapsed 0.110 seconds.
```
### Expected behavior
This query should return `0.125`, which is what Postgres and DuckDB do.
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] `power(decimal, -integer)` is incorrect [datafusion]
Posted by "neilconway (via GitHub)" <gi...@apache.org>.
neilconway commented on issue #22510:
URL: https://github.com/apache/datafusion/issues/22510#issuecomment-4534748467
take
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] `power(decimal, -integer)` is incorrect [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey closed issue #22510: `power(decimal, -integer)` is incorrect
URL: https://github.com/apache/datafusion/issues/22510
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org