[SPARK-58768][PYTHON][TESTS] Fix monkey-patch in test_parity_udf and test_parity_udtf - #58001
Closed
gaogaotiantian wants to merge 1 commit into
Closed
[SPARK-58768][PYTHON][TESTS] Fix monkey-patch in test_parity_udf and test_parity_udtf#58001gaogaotiantian wants to merge 1 commit into
gaogaotiantian wants to merge 1 commit into
Conversation
uros-b
approved these changes
Aug 14, 2026
Member
|
Thank you @gaogaotiantian! |
gaogaotiantian
added a commit
that referenced
this pull request
Aug 15, 2026
…est_parity_udtf
### What changes were proposed in this pull request?
* For `test_parity_udtf`:
* Removed the unnecessary monkeypatch for `sql.udtf.UserDefinedTableFunction`
* Use the general version builtin function because it should be automatically redirected
* For `test_parity_udf`:
* Move the monkey patch to `setUpClass`
* Patch the test module, instead of `pyspark.sql`
### Why are the changes needed?
The original monkey-patch has a large blast radius and is sensitive to import order. We should minimum monkey patch impact.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
CI.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #58001 from gaogaotiantian/fix-monkey-patch.
Authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Signed-off-by: Tian Gao <gaogaotiantian@hotmail.com>
(cherry picked from commit 76735aa)
Signed-off-by: Tian Gao <gaogaotiantian@hotmail.com>
Contributor
Author
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?
test_parity_udtf:sql.udtf.UserDefinedTableFunctiontest_parity_udf:setUpClasspyspark.sqlWhy are the changes needed?
The original monkey-patch has a large blast radius and is sensitive to import order. We should minimum monkey patch impact.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
CI.
Was this patch authored or co-authored using generative AI tooling?
No.