Skip to content

[WIP][SPARK-52356][PS] Enable divide-by-zero for boolean mod/rmod with ANSI enabled #51058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xinrong-meng
Copy link
Member

@xinrong-meng xinrong-meng commented May 30, 2025

What changes were proposed in this pull request?

Enable divide-by-zero for boolean mod/rmod with ANSI enabled

Why are the changes needed?

Does this PR introduce any user-facing change?

Yes

How was this patch tested?

Unit tests, and

(dev3.10) spark (divide_0_tests) % SPARK_ANSI_SQL_MODE=true  ./python/run-tests --python-executables=python3.10 --testnames "pyspark.pandas.tests.data_type_ops.test_boolean_ops BooleanOpsTests.test_mod"

Running PySpark tests. Output is in /Users/xinrong.meng/spark/python/unit-tests.log
...
Finished test(python3.10): pyspark.pandas.tests.data_type_ops.test_boolean_ops BooleanOpsTests.test_mod (5s)
Tests passed in 5 seconds


(dev3.10) spark (divide_0_tests) % SPARK_ANSI_SQL_MODE=true  ./python/run-tests --python-executables=python3.10 --testnames "pyspark.pandas.tests.data_type_ops.test_boolean_ops BooleanOpsTests.test_rmod"
Running PySpark tests. Output is in /Users/xinrong.meng/spark/python/unit-tests.log
...
Finished test(python3.10): pyspark.pandas.tests.data_type_ops.test_boolean_ops BooleanOpsTests.test_rmod (4s)
Tests passed in 4 seconds

Was this patch authored or co-authored using generative AI tooling?

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant