[SPARK-59093][PS][FOLLOWUP] Reuse the floating floor division expression - #58715
Closed
Spenserrrr wants to merge 1 commit into
Closed
[SPARK-59093][PS][FOLLOWUP] Reuse the floating floor division expression#58715Spenserrrr wants to merge 1 commit into
Spenserrrr wants to merge 1 commit into
Conversation
Spenserrrr
marked this pull request as ready for review
September 10, 2026 22:24
Contributor
Author
|
Hi @zhengruifeng! This is a small cleanup follow-up to #58397. It reuses the floating floor-division expression instead of constructing it twice and corrects the F.floor comment to distinguish ANSI overflow from non-ANSI saturation. Could you take a look when you have time? Thanks! |
zhengruifeng
approved these changes
Sep 11, 2026
zhengruifeng
pushed a commit
that referenced
this pull request
Sep 11, 2026
### What changes were proposed in this pull request? This is a small follow-up to #58397: `_floor_divide_func` now constructs the floating-point result once and reuses it for the floating and decimal branches. The adjacent `F.floor` comment now distinguishes ANSI overflow from non-ANSI saturation. ### Why are the changes needed? The same lazy `Column` expression was constructed twice while building floor division, and the comment described only the ANSI behavior. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Ran `test_floordiv` and `test_rfloordiv`; a targeted construction probe confirmed one helper call instead of two with an identical Spark expression. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Codex (GPT-5) Closes #58715 from Spenserrrr/floordiv-digest-followup. Authored-by: Spenser Sun <hsun112358@gmail.com> Signed-off-by: Ruifeng Zheng <ruifengz@foxmail.com> (cherry picked from commit 0edaeb8) Signed-off-by: Ruifeng Zheng <ruifengz@foxmail.com>
Contributor
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
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?
This is a small follow-up to #58397:
_floor_divide_funcnow constructs the floating-point result once and reuses it for the floating and decimal branches. The adjacentF.floorcomment now distinguishes ANSI overflow from non-ANSI saturation.Why are the changes needed?
The same lazy
Columnexpression was constructed twice while building floor division, and the comment described only the ANSI behavior.Does this PR introduce any user-facing change?
No.
How was this patch tested?
Ran
test_floordivandtest_rfloordiv; a targeted construction probe confirmed one helper call instead of two with an identical Spark expression.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)