[SPARK-36906][PYTHON] Inline type hints for conf.py and observation.py in python/pyspark/sql#34159
Closed
xinrong-meng wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-36906][PYTHON] Inline type hints for conf.py and observation.py in python/pyspark/sql#34159xinrong-meng wants to merge 2 commits intoapache:masterfrom
xinrong-meng wants to merge 2 commits intoapache:masterfrom
Conversation
|
Kubernetes integration test starting |
|
Test build #143773 has finished for PR 34159 at commit
|
|
Kubernetes integration test status failure |
Member
Author
zero323
reviewed
Oct 1, 2021
|
|
||
| @since(2.0) | ||
| def set(self, key, value): | ||
| def set(self, key: str, value: str) -> None: |
Member
There was a problem hiding this comment.
Seems like this can be more permissive on value type (Union[str, int, bool]?)
Member
Author
There was a problem hiding this comment.
May I ask if we should keep it consistent with https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/SparkConf.scala#L82?
zero323
approved these changes
Oct 1, 2021
HyukjinKwon
approved these changes
Oct 3, 2021
Member
|
Thanks! merging to master. |
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?
Inline type hints for conf.py and observation.py in python/pyspark/sql.
Why are the changes needed?
Currently, there is type hint stub files (*.pyi) to show the expected types for functions, but we can also take advantage of static type checking within the functions by inlining the type hints.
Does this PR introduce any user-facing change?
No.
It has a DOC typo fix:
Metrics are aggregation expressions, which are applied to the DataFrame while **is** is beingis changed to
Metrics are aggregation expressions, which are applied to the DataFrame while **it** is beingHow was this patch tested?
Existing test.