viirya commented on code in PR #5675:
URL: https://github.com/apache/arrow-datafusion/pull/5675#discussion_r1148798281


##########
datafusion/core/tests/sqllogictests/test_files/tpch.slt:
##########
@@ -125,7 +125,7 @@ select
     sum(l_quantity) as sum_qty,
     sum(l_extendedprice) as sum_base_price,
     sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
-    sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as sum_charge,
+    sum(cast(l_extendedprice as decimal(12,2)) * (1 - l_discount) * (1 + 
l_tax)) as sum_charge,

Review Comment:
   This decimal calculation actually causes overflow on decimal multiplication 
because the kernel DataFusion uses doesn't allow precision loss. Previously it 
accidentally works because we implicitly truncate all input decimal value 
before multiplying...



-- 
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]

Reply via email to