You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/24 11:34:46 UTC

[GitHub] [spark] zero323 opened a new pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

zero323 opened a new pull request #34374:
URL: https://github.com/apache/spark/pull/34374


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   This PR changes changes `RDD[~T}` and `DStream[~T]` to `RDD[+T]` and `DStream[+T]` respectively.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   To improve usability of the current annotations and simplify further development of type hints.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   Type hints only.
   
   Users will be able to use both subclasses of `RDD` / `DStream` in certain contexts, without explicit annotations or casts.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   
   Existing tests and not released data tests (SPARK-36989).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974837457


   Merged to master.
   
   Thanks all!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-959753525


   Thank you @zero323 !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958212194


   **[Test build #144860 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144860/testReport)** for PR 34374 at commit [`63b30d3`](https://github.com/apache/spark/commit/63b30d3e606e6919c6a6ced07b651542300590c6).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r741816277



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       NumPy and some of the typeshed annotations use `_T`, `_T_co` and `_T_contra` for invariant, covariant, and contravariant respectively. It is a bit verbose for my taste, but otherwise looks good.
   
   Other projects I've seen (dry-python, django-stubs, pfun) don't use any special convention. Not the way I'd go :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974830270


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145484/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950311257


   **[Test build #144564 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144564/testReport)** for PR 34374 at commit [`69a772f`](https://github.com/apache/spark/commit/69a772faf3069e566cb1b8069f49e0e922bd6043).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974821403


   **[Test build #145484 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145484/testReport)** for PR 34374 at commit [`d8561e1`](https://github.com/apache/spark/commit/d8561e1669c60c0213702edf14822c2a950ba822).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r753803461



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       I'll add `_co` suffix on provisional basis ‒ if we decide on different strategy, we can adjust thing in a separate PR.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958531676


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49333/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958189406


   > Would you please give a short example of how the PR **improves the usability of the current annotations and simplifies further development of type hints**? Thank you!
   
   Happy to oblige, @xinrong-databricks  :) 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950329862


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49035/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950320853


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144564/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974830270






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974841691


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49956/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950307823


   cc @HyukjinKwon @ueshin 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958467470


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49333/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958385404






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r741816277



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       NumPy and some of the typeshed annotations use `_T`, `_T_co` and `_T_contra` for invariant, covariant, and contravariant respectively. It is a bit verbose for my taste, but otherwise looks good.
   
   Other projects I've seen (dry-python, django-stubs, pfun) don't use any special convention. Not the way I'd go :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958531676


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49333/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958385404


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49333/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks edited a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks edited a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-957965048


   Would you please give a short example of how the PR **improves the usability of the current annotations and simplifies further development of type hints**? Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-955208846


   @HyukjinKwon WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950311257


   **[Test build #144564 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144564/testReport)** for PR 34374 at commit [`69a772f`](https://github.com/apache/spark/commit/69a772faf3069e566cb1b8069f49e0e922bd6043).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950329862


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49035/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974830270






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950320853


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144564/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958269160


   **[Test build #144860 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144860/testReport)** for PR 34374 at commit [`63b30d3`](https://github.com/apache/spark/commit/63b30d3e606e6919c6a6ced07b651542300590c6).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `class DStream(Generic[T_]):`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958212194


   **[Test build #144860 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144860/testReport)** for PR 34374 at commit [`63b30d3`](https://github.com/apache/spark/commit/63b30d3e606e6919c6a6ced07b651542300590c6).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-959753525


   Thank you @zero323 !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-959753525






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r741592512



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       Not sure the name `T_` is commonly used though - haven't checked other references. Otherwise LGTM




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks edited a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks edited a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-957965048


   Would you please give a short example of how the PR **improves the usability of the current annotations and simplifies further development of type hints**? Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958531676


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49333/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r741592512



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       Not sure the name `T_` is commonly used though - haven't checked other references. Otherwise LGTM




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958531676


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49333/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950366763


   Dumb question, since I don't know the python type hint system - does this potentially break any code? I think some of this was released in 3.2.0 (right?) so just checking if it can have any user-facing impact.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974827753


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49956/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974825468


   **[Test build #145484 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145484/testReport)** for PR 34374 at commit [`d8561e1`](https://github.com/apache/spark/commit/d8561e1669c60c0213702edf14822c2a950ba822).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `class SparkConf(object):`
     * `class ProbabilisticClassifier(Classifier, _ProbabilisticClassifierParams, metaclass=ABCMeta):`
     * `class ProbabilisticClassificationModel(`
     * `class _JavaProbabilisticClassifier(ProbabilisticClassifier, _JavaClassifier, metaclass=ABCMeta):`
     * `class _JavaProbabilisticClassificationModel(`
     * `class _LinearSVCParams(`
     * `class LinearSVCModel(`
     * `class _LogisticRegressionParams(`
     * `class LogisticRegression(`
     * `class LogisticRegressionModel(`
     * `class BinaryLogisticRegressionSummary(_BinaryClassificationSummary, LogisticRegressionSummary):`
     * `class BinaryLogisticRegressionTrainingSummary(`
     * `class DecisionTreeClassifier(`
     * `class DecisionTreeClassificationModel(`
     * `class RandomForestClassifier(`
     * `class RandomForestClassificationModel(`
     * `class RandomForestClassificationTrainingSummary(`
     * `class BinaryRandomForestClassificationTrainingSummary(`
     * `class GBTClassifier(`
     * `class GBTClassificationModel(`
     * `class NaiveBayes(`
     * `class NaiveBayesModel(`
     * `class _MultilayerPerceptronParams(`
     * `class MultilayerPerceptronClassifier(`
     * `class MultilayerPerceptronClassificationModel(`
     * `class MultilayerPerceptronClassificationTrainingSummary(`
     * `class FMClassifier(`
     * `class FMClassificationModel(`
     * `class _GaussianMixtureParams(`
     * `class GaussianMixtureModel(`
     * `class _KMeansParams(`
     * `class KMeansModel(`
     * `class _BisectingKMeansParams(`
     * `class BisectingKMeansModel(`
     * `class PowerIterationClustering(`
     * `class BinaryClassificationEvaluator(`
     * `class RegressionEvaluator(`
     * `class MulticlassClassificationEvaluator(`
     * `class MultilabelClassificationEvaluator(`
     * `class ClusteringEvaluator(`
     * `class RankingEvaluator(`
     * `class Binarizer(`
     * `class BucketedRandomProjectionLSH(`
     * `class BucketedRandomProjectionLSHModel(`
     * `class Bucketizer(`
     * `class ElementwiseProduct(`
     * `class FeatureHasher(`
     * `class HashingTF(`
     * `class _OneHotEncoderParams(`
     * `class PolynomialExpansion(`
     * `class QuantileDiscretizer(`
     * `class _StringIndexerParams(`
     * `class StopWordsRemover(`
     * `class VectorAssembler(`
     * `class VectorSizeHint(`
     * `class VarianceThresholdSelector(`
     * `class VarianceThresholdSelectorModel(`
     * `class UnivariateFeatureSelector(`
     * `class UnivariateFeatureSelectorModel(`
     * `class _LinearRegressionParams(`
     * `class LinearRegressionModel(`
     * `class IsotonicRegression(`
     * `class IsotonicRegressionModel(JavaModel, _IsotonicRegressionParams, JavaMLWritable, JavaMLReadable):`
     * `class DecisionTreeRegressor(`
     * `class RandomForestRegressor(`
     * `class _AFTSurvivalRegressionParams(`
     * `class AFTSurvivalRegression(`
     * `class AFTSurvivalRegressionModel(`
     * `class _GeneralizedLinearRegressionParams(`
     * `class GeneralizedLinearRegression(`
     * `class GeneralizedLinearRegressionModel(`
     * `class _FactorizationMachinesParams(`
     * `class FMRegressionModel(`
     * `class CrossValidator(`
     * `class TrainValidationSplit(`
     * `                + \"class name `
     * `class MultivariateGaussian(NamedTuple):`
     * `class PandasAPIOnSparkAdviceWarning(Warning):`
     * `class ArrowStreamUDFSerializer(ArrowStreamSerializer):`
     * `class DayTimeIntervalType(AtomicType):`
     * `class DayTimeIntervalTypeConverter(object):`
     * `case class ExpressionStats(expr: Expression)(var useCount: Int)`
     * `case class PythonMapInArrow(`
     * `case class DropIndex(`
     * `public class ColumnIOUtil `
     * `case class OptimizeSkewedJoin(ensureRequirements: EnsureRequirements)`
     * `case class ParquetColumn(`
     * `case class DropIndexExec(`
     * `case class PushedDownOperators(`
     * `case class TableSampleInfo(`
     * `trait MapInBatchExec extends UnaryExecNode `
     * `case class PythonMapInArrowExec(`
     * `  // When this is enabled, this class does additional lookup on write operations (put/delete) to`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974821403


   **[Test build #145484 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145484/testReport)** for PR 34374 at commit [`d8561e1`](https://github.com/apache/spark/commit/d8561e1669c60c0213702edf14822c2a950ba822).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974821403


   **[Test build #145484 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/145484/testReport)** for PR 34374 at commit [`d8561e1`](https://github.com/apache/spark/commit/d8561e1669c60c0213702edf14822c2a950ba822).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks edited a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks edited a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-957965048


   Would you please give a short example of how the PR **improves the usability of the current annotations and simplifies further development of type hints**? Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r741816277



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       NumPy and some of the typeshed annotations use `_T`, `_T_co` and `_T_contra` for invariant, covariant, and contravariant respectively. It is a bit verbose for my taste, but otherwise looks good.
   
   Other projects I've seen (dry-python, django-stubs, pfun) don't use any special convention. Not the way I'd go :)

##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       NumPy and some of the typeshed annotations use `_T`, `_T_co` and `_T_contra` for invariant, covariant, and contravariant respectively. It is a bit verbose for my taste, but otherwise looks good.
   
   Other projects I've seen (dry-python, django-stubs, pfun) don't use any special convention. Not the way I'd go :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958295693


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144860/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958295693


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144860/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r741592512



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       Not sure the name `T_` is commonly used though - haven't checked other references. Otherwise LGTM




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 edited a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 edited a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950307823


   cc @HyukjinKwon @ueshin  @xinrong-databricks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950325016


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49035/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950318503


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49035/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r753803461



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       I'll add `_co` suffix on provisional basis ‒ if we decide on different strategy, we can adjust thing in a separate PR.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974830270


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/145484/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974841691


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49956/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958531676


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49333/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-958531676


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49333/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-957965048


   Would you please give a short example of how the PR **improves the usability of the current annotations and simplifies further development of type hints**?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-957965048


   Would you please give a short example of how the PR **improves the usability of the current annotations and simplifies further development of type hints**?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] xinrong-databricks commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
xinrong-databricks commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-957965048


   Would you please give a short example of how the PR **improves the usability of the current annotations and simplifies further development of type hints**?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on a change in pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34374:
URL: https://github.com/apache/spark/pull/34374#discussion_r741592512



##########
File path: python/pyspark/rdd.pyi
##########
@@ -60,6 +60,7 @@ from pyspark.sql._typing import RowLike
 from py4j.java_gateway import JavaObject  # type: ignore[import]
 
 T = TypeVar("T")
+T_ = TypeVar("T_", covariant=True)

Review comment:
       Not sure the name `T_` is commonly used though - haven't checked other references. Otherwise LGTM




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950315680


   **[Test build #144564 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144564/testReport)** for PR 34374 at commit [`69a772f`](https://github.com/apache/spark/commit/69a772faf3069e566cb1b8069f49e0e922bd6043).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `class DStream(Generic[T_]):`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-950393769


   > Dumb question, since I don't know the python type hint system - does this potentially break any code? I think some of this was released in 3.2.0 (right?) so just checking if it can have any user-facing impact.
   
   It is a great question. Hints were released in 3.1.0 and been around unofficially for a while.
   
   In general type hints are used only for static validation and should have no impact on runtime, under normal conditions. Under normal conditions, because it is hard to predict how one can use annotations in practice (for example, PySpark vectorized UDFs used hints for runtime type inference, even before stubs were merged). Nevertheless, as far as I am aware, neither this, or any other type annotations change, should break user applications or any widely used 3rd party extension.
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974838415


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49956/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 closed pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 closed pull request #34374:
URL: https://github.com/apache/spark/pull/34374


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 closed pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 closed pull request #34374:
URL: https://github.com/apache/spark/pull/34374


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] zero323 commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
zero323 commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974837457


   Merged to master.
   
   Thanks all!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34374: [SPARK-37104][PYTHON] Make RDD and DStream covariant

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34374:
URL: https://github.com/apache/spark/pull/34374#issuecomment-974821403






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org