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/12/16 22:15:12 UTC

[GitHub] [spark] ueshin opened a new pull request #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

ueshin opened a new pull request #34926:
URL: https://github.com/apache/spark/pull/34926


   ### What changes were proposed in this pull request?
   
   Removes unnecessary usages of `OrderedDict`.
   
   ### Why are the changes needed?
   
   Now that supported Python is 3.7 and above, we can remove unnecessary usages of `OrderedDict` because built-in `dict` guarantees the insertion order.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Existing tests.


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


   **[Test build #146299 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146299/testReport)** for PR 34926 at commit [`93b2105`](https://github.com/apache/spark/commit/93b21059d26bf1e88ad4101b71d0dae7bf4a6c5c).


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


   Looks reasonable (there is virtually zero chance we're going to support Python implementation that doesn't use ordered dictionaries in foreseeable future).


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


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


-- 
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] ueshin commented on pull request #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


   cc @HyukjinKwon @itholic @xinrong-databricks @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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


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


-- 
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 pull request #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


   Merged to master.


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


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


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


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


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


   **[Test build #146299 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146299/testReport)** for PR 34926 at commit [`93b2105`](https://github.com/apache/spark/commit/93b21059d26bf1e88ad4101b71d0dae7bf4a6c5c).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


   **[Test build #146299 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/146299/testReport)** for PR 34926 at commit [`93b2105`](https://github.com/apache/spark/commit/93b21059d26bf1e88ad4101b71d0dae7bf4a6c5c).


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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



##########
File path: python/pyspark/pandas/frame.py
##########
@@ -9651,7 +9651,7 @@ def stack(self) -> DataFrameOrSeries:
                 ).with_filter(SF.lit(False))
             )
 
-        column_labels: Union[defaultdict, OrderedDict] = defaultdict(dict)
+        column_labels: Dict[Label, Dict[Any, Column]] = defaultdict(dict)

Review comment:
       Yeah, I think this is fine too.




-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


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


-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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



##########
File path: python/pyspark/pandas/frame.py
##########
@@ -9651,7 +9651,7 @@ def stack(self) -> DataFrameOrSeries:
                 ).with_filter(SF.lit(False))
             )
 
-        column_labels: Union[defaultdict, OrderedDict] = defaultdict(dict)
+        column_labels: Dict[Label, Dict[Any, Column]] = defaultdict(dict)

Review comment:
       Should we use [`DefaultDict`](https://docs.python.org/3/library/typing.html#typing.DefaultDict) here?




-- 
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 #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


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


-- 
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] ueshin commented on a change in pull request #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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



##########
File path: python/pyspark/pandas/frame.py
##########
@@ -9651,7 +9651,7 @@ def stack(self) -> DataFrameOrSeries:
                 ).with_filter(SF.lit(False))
             )
 
-        column_labels: Union[defaultdict, OrderedDict] = defaultdict(dict)
+        column_labels: Dict[Label, Dict[Any, Column]] = defaultdict(dict)

Review comment:
       `column_labels` will be re-assinged at https://github.com/apache/spark/blob/93b21059d26bf1e88ad4101b71d0dae7bf4a6c5c/python/pyspark/pandas/frame.py#L9669
   I think it's okay to use more generic type.




-- 
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 closed pull request #34926: [SPARK-37669][PYTHON] Remove unnecessary usages of OrderedDict

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


   


-- 
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