jatin510 opened a new issue, #16667: URL: https://github.com/apache/datafusion/issues/16667
### Describe the bug The binary operation between Unsigned Integer and Decimal type produces wrong output. ### To Reproduce Eg queries: ``` select arrow_cast(1.23,'Decimal128(3,2)') * arrow_cast(123, 'UInt64') as multiply; +----------+ | multiply | +----------+ | 123 | +----------+ 1 row(s) fetched. Elapsed 0.008 seconds. > select arrow_cast(1.23,'Decimal128(3,2)') * arrow_cast(123, 'Int64') as multiply; +----------+ | multiply | +----------+ | 151.29 | +----------+ 1 row(s) fetched. select arrow_cast(1.23,'Decimal128(3,2)') - arrow_cast(1, 'UInt64') as multiply; +----------+ | multiply | +----------+ | 0 | +----------+ 1 row(s) fetched. Elapsed 0.007 seconds. ``` ### Expected behavior ``` select arrow_cast(1.23,'Decimal128(3,2)') * arrow_cast(123, 'UInt64') as multiply; +----------+ | multiply | +----------+ | 151.29 | +----------+ 1 row(s) fetched. Elapsed 0.008 seconds. > select arrow_cast(1.23,'Decimal128(3,2)') * arrow_cast(123, 'Int64') as multiply; +----------+ | multiply | +----------+ | 151.29 | +----------+ 1 row(s) fetched. > select arrow_cast(1.23,'Decimal128(3,2)') - arrow_cast(123, 'Int64') as multiply; +----------+ | multiply | +----------+ | -121.77 | +----------+ 1 row(s) fetched. Elapsed 0.007 seconds. ``` ### 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-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org