rkrishn7 commented on PR #17815: URL: https://github.com/apache/datafusion/pull/17815#issuecomment-3348090551
> Thank you for the fix. I have a question: > > The original error message (in the issue) is: `Arrow error: Invalid argument error: Invalid comparison operation: Decimal128(35, 2) > Decimal128(25, 2)` This operation seems valid > > ``` > > CREATE TABLE orders ( > d1 decimal(25,2), > d2 decimal(35,2)); > 0 row(s) fetched. > Elapsed 0.008 seconds. > > > select d1 > d2 from orders; > +-----------------------+ > | orders.d1 > orders.d2 | > +-----------------------+ > +-----------------------+ > 0 row(s) fetched. > Elapsed 0.008 seconds. > ``` Hey @2010YOUY01 - yes it's a valid operation. The issue in this case is that the optimizer rule inserts the new node after type coercion runs. In your example this does not happen. > Is it possible to make this comparison work, and keep the precision increase behavior required by Spark? It looks simpler. Yes, but in my opinion the precision should not increase in the first place. The precision should be equivalent with two-phase aggregation so I think it's better not to change it. But happy to hear your thoughts. -- 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]
