jonahgao opened a new issue, #11098: URL: https://github.com/apache/datafusion/issues/11098
### Describe the bug According to the [Binary GCD algorithm](https://en.wikipedia.org/wiki/Binary_GCD_algorithm), its result cannot be a negative number. <img width="964" alt="截屏2024-06-24 21 31 30" src="https://github.com/apache/datafusion/assets/26053282/ff33090f-8c7c-408e-9b35-e0f975c73fa9"> ### To Reproduce ```sh DataFusion CLI v39.0.0 > select gcd(-100, 0), gcd(0, -100); +---------------------------+---------------------------+ | gcd(Int64(-100),Int64(0)) | gcd(Int64(0),Int64(-100)) | +---------------------------+---------------------------+ | -100 | -100 | +---------------------------+---------------------------+ ``` ### Expected behavior In PostgreSQL ```sh postgres=# select gcd(-100, 0), gcd(0, -100); gcd | gcd -----+----- 100 | 100 (1 row) ``` ### 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
