xinrong-meng opened a new pull request, #51219:
URL: https://github.com/apache/spark/pull/51219

   ### What changes were proposed in this pull request?
   Enable divide-by-zero for numeric mod with ANSI enabled
   
   
   ### Why are the changes needed?
   Ensure pandas on Spark works well with ANSI mode on.
   Part of https://issues.apache.org/jira/browse/SPARK-52169.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes
   
   
   ### How was this patch tested?
   Unit tests.
   
   ```
   (dev3.10) spark (num_mod) % SPARK_ANSI_SQL_MODE=true  ./python/run-tests 
--python-executables=python3.10 --testnames  
"pyspark.pandas.tests.computation.test_binary_ops 
FrameBinaryOpsTests.test_binary_operator_mod"
   ...
   Finished test(python3.10): pyspark.pandas.tests.computation.test_binary_ops 
FrameBinaryOpsTests.test_binary_operator_mod (4s)
   Tests passed in 4 seconds
   
   (dev3.10) spark (num_mod) % SPARK_ANSI_SQL_MODE=true  ./python/run-tests 
--python-executables=python3.10 --testnames 
"pyspark.pandas.tests.series.test_stat SeriesStatTests.test_mod"
   ...
   Finished test(python3.10): pyspark.pandas.tests.series.test_stat 
SeriesStatTests.test_mod (5s)
   Tests passed in 5 seconds
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.
   


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