maropu commented on a change in pull request #25136: [SPARK-28322][SQL] Add 
support to Decimal type for integral divide
URL: https://github.com/apache/spark/pull/25136#discussion_r315016810
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/pgSQL/numeric.sql
 ##########
 @@ -893,14 +893,14 @@ SELECT * FROM num_input_test;
 --
 -- 999999999999999999999 is overflow for SYSTEM_DEFAULT(decimal(38, 18)), we 
use BigIntDecimal(decimal(38, 0)).
 select cast(999999999999999999999 as decimal(38, 0))/1000000000000000000000;
--- [SPARK-28322] DIV support decimal type
--- select div(cast(999999999999999999999 as decimal(38, 
0)),1000000000000000000000);
+
+select div(cast(999999999999999999999 as decimal(38, 
0)),1000000000000000000000);
 select mod(cast(999999999999999999999 as decimal(38, 
0)),1000000000000000000000);
--- select div(cast(-9999999999999999999999 as decimal(38, 
0)),1000000000000000000000);
+select div(cast(-9999999999999999999999 as decimal(38, 
0)),1000000000000000000000);
 select mod(cast(-9999999999999999999999 as decimal(38, 
0)),1000000000000000000000);
--- select div(cast(-9999999999999999999999 as decimal(38, 
0)),1000000000000000000000)*1000000000000000000000 + 
mod(cast(-9999999999999999999999 as decimal(38, 0)),1000000000000000000000);
+select div(cast(-9999999999999999999999 as decimal(38, 
0)),1000000000000000000000)*1000000000000000000000 + 
mod(cast(-9999999999999999999999 as decimal(38, 0)),1000000000000000000000);
 select mod (70.0,70) ;
--- select div (70.0,70) ;
+select div (70.0,70) ;
 
 Review comment:
   I checked that the answers are the same with pgSQL ones: 
https://github.com/postgres/postgres/blob/0ab7110bcbcce5ff58afb32e7871c54e87502139/src/test/regress/expected/numeric.out#L1510

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to