alamb commented on code in PR #6832:
URL: https://github.com/apache/arrow-datafusion/pull/6832#discussion_r1279155844


##########
datafusion/core/tests/sqllogictests/test_files/dates.slt:
##########
@@ -91,17 +91,19 @@ where d3_date > now() + '5 days';
 
 # DATE minus DATE
 # https://github.com/apache/arrow-rs/issues/4383
-query error DataFusion error: Optimizer rule 'simplify_expressions' 
failed\ncaused by\nArrow error: Cast error: Cannot perform arithmetic operation 
between array of type Date32 and array of type Date32
+query ?
 SELECT DATE '2023-04-09' - DATE '2023-04-02';
+----
+7 days 0 hours 0 mins 0 secs
 
 # DATE minus Timestamp
 query ?
 SELECT DATE '2023-04-09' - '2000-01-01T00:00:00'::timestamp;
 ----
-0 years 0 mons 8499 days 0 hours 0 mins 0.000000000 secs
+8499 days 0 hours 0 mins 0.000000000 secs

Review Comment:
   much better



##########
datafusion/core/tests/sqllogictests/test_files/decimal.slt:
##########
@@ -365,7 +365,7 @@ select c1*c5 from decimal_simple;
 query T
 select arrow_typeof(c1/cast(0.00001 as decimal(5,5))) from decimal_simple 
limit 1;
 ----
-Decimal128(21, 12)
+Decimal128(19, 10)

Review Comment:
   I think spark is of the other major targets / comparison system -- I think 
@liukun4515  and maybe @yjshen  perhaps would have more context / understanding 
of how potential changes to the decimal division semantics may affect 
downstream users
   
   If there is need for both semantics, maybe we could add a  
"use_spark_decimal_division_rules" config option to DataFusion
    



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