-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23700][PYTHON] Cleanup imports in pyspark.sql #20892
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
[SPARK-23700][PYTHON] Cleanup imports in pyspark.sql #20892
Conversation
|
@HyukjinKwon, @holdenk @ueshin I tried to be pretty conservative and only remove imports that were obviously not being used. |
| from pyspark.sql.dataframe import DataFrame | ||
| from pyspark.sql.types import StringType, DataType | ||
| # Keep UserDefinedFunction import for backwards compatible import; moved in SPARK-22409 | ||
| from pyspark.sql.udf import UserDefinedFunction, _create_udf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there is a better way to do this other than importing UserDefinedFunction here, but hopefully the note will show the intent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, I think we should better keep this import and the comment looks good.
|
Test build #88547 has finished for PR 20892 at commit
|
|
Jenkins retest this please |
|
Test build #88549 has finished for PR 20892 at commit
|
HyukjinKwon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Merged to master. |
|
Thanks @felixcheung and @HyukjinKwon ! |
What changes were proposed in this pull request?
This cleans up unused imports, mainly from pyspark.sql module. Added a note in function.py that imports
UserDefinedFunctiononly to maintain backwards compatibility for usingfrom pyspark.sql.function import UserDefinedFunction.How was this patch tested?
Existing tests and built docs.