shehabgamin opened a new issue, #15174:
URL: https://github.com/apache/datafusion/issues/15174

   ### Describe the bug
   
   Decimals of different precisions and scales are properly rebased when 
working with `Literal` values. Otherwise, they are not rebased, which leads to 
an error.
   
   ### To Reproduce
   
   ```
   desktop % datafusion-cli
   DataFusion CLI v46.0.0
   > SELECT 1 * 1.000::DECIMAL(4,3) > 1.2::decimal(2,1);
   +--------------------------------------+
   | Int64(1) * Float64(1) > Float64(1.2) |
   +--------------------------------------+
   | false                                |
   +--------------------------------------+
   1 row(s) fetched.
   Elapsed 0.003 seconds.
   
   > SELECT a * 1.000::DECIMAL(4,3) > 1.2::decimal(2,1) FROM VALUES (1) AS t(a);
   Arrow error: Invalid argument error: Invalid comparison operation: 
Decimal128(20, 0) > Decimal128(25, 3)
   >
   ```
   
   ### Expected behavior
   
   _No response_
   
   ### 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

Reply via email to