2010YOUY01 commented on code in PR #23972:
URL: https://github.com/apache/datafusion/pull/23972#discussion_r3681723692


##########
datafusion/sqllogictest/test_files/math.slt:
##########
@@ -1237,6 +1040,53 @@ SELECT gcd(arrow_cast(column1, 'Decimal128(38,0)'), 
arrow_cast(column2, 'Decimal
 5
 15
 
+# gcd with the remaining decimal array widths
+query R
+SELECT gcd(arrow_cast(column1, 'Decimal32(7,0)'), arrow_cast(column2, 
'Decimal32(7,0)')) FROM (VALUES (15, 10), (15, 25), (15, 0));
+----
+5
+5
+15
+
+query R
+SELECT gcd(arrow_cast(column1, 'Decimal64(16,0)'), arrow_cast(column2, 
'Decimal64(16,0)')) FROM (VALUES (15, 10), (15, 25), (15, 0));
+----
+5
+5
+15
+
+query R
+SELECT gcd(arrow_cast(column1, 'Decimal256(40,0)'), arrow_cast(column2, 
'Decimal256(40,0)')) FROM (VALUES (15, 10), (15, 25), (15, 0));
+----
+5
+5
+15
+
+# gcd array with zero, minimum, and null scalars
+query I
+SELECT gcd(column1, -9223372036854775808) FROM (VALUES (1), (2), (NULL));
+----
+1
+2
+NULL

Review Comment:
   Good catch, added.



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

Reply via email to