-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-52701][PS] Fix float32 type widening in mod
with bool under ANSI
#51394
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ueshin would you please review? Thanks! |
ueshin
approved these changes
Jul 8, 2025
Merged to master thanks! |
asl3
pushed a commit
to asl3/spark
that referenced
this pull request
Jul 14, 2025
…ANSI ### What changes were proposed in this pull request? Fix float32 type widening in `mod` with bool under ANSI. ### Why are the changes needed? Ensure pandas on Spark works well with ANSI mode on. Part of https://issues.apache.org/jira/browse/SPARK-52700. ### Does this PR introduce _any_ user-facing change? Yes. `mod` under ANSI works as pandas. ```py (dev3.11) spark (mod_dtype) % SPARK_ANSI_SQL_MODE=False ./python/run-tests --python-executables=python3.11 --testnames "pyspark.pandas.tests.data_type_ops.test_num_mod NumModTests.test_mod" ... Tests passed in 8 seconds (dev3.11) spark (mod_dtype) % SPARK_ANSI_SQL_MODE=True ./python/run-tests --python-executables=python3.11 --testnames "pyspark.pandas.tests.data_type_ops.test_num_mod NumModTests.test_mod" ... Tests passed in 7 seconds ``` ### How was this patch tested? Unit tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#51394 from xinrong-meng/mod_dtype. Authored-by: Xinrong Meng <xinrong@apache.org> Signed-off-by: Xinrong Meng <xinrong@apache.org>
ksbeyer
pushed a commit
to ksbeyer/spark
that referenced
this pull request
Jul 14, 2025
…ANSI ### What changes were proposed in this pull request? Fix float32 type widening in `mod` with bool under ANSI. ### Why are the changes needed? Ensure pandas on Spark works well with ANSI mode on. Part of https://issues.apache.org/jira/browse/SPARK-52700. ### Does this PR introduce _any_ user-facing change? Yes. `mod` under ANSI works as pandas. ```py (dev3.11) spark (mod_dtype) % SPARK_ANSI_SQL_MODE=False ./python/run-tests --python-executables=python3.11 --testnames "pyspark.pandas.tests.data_type_ops.test_num_mod NumModTests.test_mod" ... Tests passed in 8 seconds (dev3.11) spark (mod_dtype) % SPARK_ANSI_SQL_MODE=True ./python/run-tests --python-executables=python3.11 --testnames "pyspark.pandas.tests.data_type_ops.test_num_mod NumModTests.test_mod" ... Tests passed in 7 seconds ``` ### How was this patch tested? Unit tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#51394 from xinrong-meng/mod_dtype. Authored-by: Xinrong Meng <xinrong@apache.org> Signed-off-by: Xinrong Meng <xinrong@apache.org>
haoyangeng-db
pushed a commit
to haoyangeng-db/apache-spark
that referenced
this pull request
Jul 22, 2025
…ANSI ### What changes were proposed in this pull request? Fix float32 type widening in `mod` with bool under ANSI. ### Why are the changes needed? Ensure pandas on Spark works well with ANSI mode on. Part of https://issues.apache.org/jira/browse/SPARK-52700. ### Does this PR introduce _any_ user-facing change? Yes. `mod` under ANSI works as pandas. ```py (dev3.11) spark (mod_dtype) % SPARK_ANSI_SQL_MODE=False ./python/run-tests --python-executables=python3.11 --testnames "pyspark.pandas.tests.data_type_ops.test_num_mod NumModTests.test_mod" ... Tests passed in 8 seconds (dev3.11) spark (mod_dtype) % SPARK_ANSI_SQL_MODE=True ./python/run-tests --python-executables=python3.11 --testnames "pyspark.pandas.tests.data_type_ops.test_num_mod NumModTests.test_mod" ... Tests passed in 7 seconds ``` ### How was this patch tested? Unit tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#51394 from xinrong-meng/mod_dtype. Authored-by: Xinrong Meng <xinrong@apache.org> Signed-off-by: Xinrong Meng <xinrong@apache.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Fix float32 type widening in
mod
with bool under ANSI.Why are the changes needed?
Ensure pandas on Spark works well with ANSI mode on.
Part of https://issues.apache.org/jira/browse/SPARK-52700.
Does this PR introduce any user-facing change?
Yes.
mod
under ANSI works as pandas.How was this patch tested?
Unit tests.
Was this patch authored or co-authored using generative AI tooling?
No.