-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[WIP][SPARK-35176][PYTHON] Standardize input validation error type #32349
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
Conversation
|
Test build #137945 has finished for PR 32349 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #137956 has finished for PR 32349 at commit
|
|
Kubernetes integration test unable to build dist. exiting with code: 1 |
|
Test build #137958 has finished for PR 32349 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #137962 has finished for PR 32349 at commit
|
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Refer to this link for build results (access rights to CI server needed): |
What changes were proposed in this pull request?
This PR corrects some exception type when the function input params are failed to validate due to TypeError.
Why are the changes needed?
As suggestion from Python exception doc [1]: "Raised when an operation or function is applied to an object of inappropriate type.", but there are many Value error are raised in some pyspark code, this patch fix them.
[1] https://docs.python.org/3/library/exceptions.html#TypeError
Note that: this patch only addresses the exsiting some wrong raise type for input validation, the input validation decorator/framework which mentioned in SPARK-35176, would be submited in a speparated patch.
Does this PR introduce any user-facing change?
Yes, code can raise the right TypeError instead of ValueError.
How was this patch tested?
Existing test case and UT