andygrove commented on code in PR #342:
URL: https://github.com/apache/datafusion-spark/pull/342#discussion_r4602956407


##########
crates/sqllogictest/test_files/math/pmod.slt:
##########
@@ -389,6 +389,88 @@ SELECT pmod(arrow_cast(-10, 'Int64'), arrow_cast(3, 
'Int64')) as pmod_int64_2;
 ----
 2
 
+# PMOD tests at the signed integer boundaries.
+# Spark evaluates `(r + n) % n` with Java arithmetic: `byte` and `short` are
+# promoted to `int` and never overflow, while `int` and `long` wrap around.

Review Comment:
   Good catch, thanks. Added an ANSI block in 397edc5 that runs the Int8, 
Int16, Int32 and Int64 boundary cases and the array case with `enable_ansi_mode 
= true`. They pass here and on Spark 4.2.0 with the PySpark runner.



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