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 2022/05/28 09:27:10 UTC

[GitHub] [spark] Yikun opened a new pull request, #36711: [SPARK-39314][PS] Respect ps.concat sort parameter to follow pandas behavior

Yikun opened a new pull request, #36711:
URL: https://github.com/apache/spark/pull/36711

   ### What changes were proposed in this pull request?
   Respect ps.concat sort parameter to follow pandas behavior:
   - Remove the multi-index special sort process case and add ut.
   - Still keep `num_series != 1` for now to follow pandas behavior
   
   
   ### Why are the changes needed?
   
   Since pandas 1.4+ (https://github.com/pandas-dev/pandas/commit/01b8d2a77e5109adda2504b1cb4b1daeab3c74df),  ps.concat method the sort parameter. We need to follow pandas behavior.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, but follow pandas 1.4 behavior
   
   ### How was this patch tested?
   test_concat_index_axis, test_concat_multiindex_sort, concat doctest
   passed with 1.3/1.4
   


-- 
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] Yikun commented on pull request #36711: [SPARK-39314][PS] Respect ps.concat sort parameter to follow pandas behavior

Posted by GitBox <gi...@apache.org>.
Yikun commented on PR #36711:
URL: https://github.com/apache/spark/pull/36711#issuecomment-1144386307

   also cc @HyukjinKwon @xinrong-databricks ready for review


-- 
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] Yikun commented on a diff in pull request #36711: [SPARK-39314][PS] Respect ps.concat sort parameter to follow pandas behavior

Posted by GitBox <gi...@apache.org>.
Yikun commented on code in PR #36711:
URL: https://github.com/apache/spark/pull/36711#discussion_r884379797


##########
python/pyspark/pandas/tests/test_namespace.py:
##########
@@ -306,16 +329,30 @@ def test_concat_index_axis(self):
 
         objs = [
             ([psdf, psdf], [pdf, pdf]),
+            # no Series
             ([psdf, psdf.reset_index()], [pdf, pdf.reset_index()]),
             ([psdf.reset_index(), psdf], [pdf.reset_index(), pdf]),
             ([psdf, psdf[["C", "A"]]], [pdf, pdf[["C", "A"]]]),
             ([psdf[["C", "A"]], psdf], [pdf[["C", "A"]], pdf]),
+            # only one Series
             ([psdf, psdf["C"]], [pdf, pdf["C"]]),
+            # only one Series

Review Comment:
   Thanks! Resolved.



-- 
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] Yikun commented on pull request #36711: [SPARK-39314][PS] Respect ps.concat sort parameter to follow pandas behavior

Posted by GitBox <gi...@apache.org>.
Yikun commented on PR #36711:
URL: https://github.com/apache/spark/pull/36711#issuecomment-1144386308

   also cc @HyukjinKwon @xinrong-databricks ready for review


-- 
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] itholic commented on a diff in pull request #36711: [SPARK-39314][PS] Respect ps.concat sort parameter to follow pandas behavior

Posted by GitBox <gi...@apache.org>.
itholic commented on code in PR #36711:
URL: https://github.com/apache/spark/pull/36711#discussion_r884369798


##########
python/pyspark/pandas/tests/test_namespace.py:
##########
@@ -306,16 +329,30 @@ def test_concat_index_axis(self):
 
         objs = [
             ([psdf, psdf], [pdf, pdf]),
+            # no Series
             ([psdf, psdf.reset_index()], [pdf, pdf.reset_index()]),
             ([psdf.reset_index(), psdf], [pdf.reset_index(), pdf]),
             ([psdf, psdf[["C", "A"]]], [pdf, pdf[["C", "A"]]]),
             ([psdf[["C", "A"]], psdf], [pdf[["C", "A"]], pdf]),
+            # only one Series
             ([psdf, psdf["C"]], [pdf, pdf["C"]]),
+            # only one Series

Review Comment:
   nit: maybe we can remove this comment here ? The above one should cover.



-- 
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 #36711: [SPARK-39314][PS] Respect ps.concat sort parameter to follow pandas behavior

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #36711: [SPARK-39314][PS] Respect ps.concat sort parameter to follow pandas behavior
URL: https://github.com/apache/spark/pull/36711


-- 
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 #36711: [SPARK-39314][PS] Respect ps.concat sort parameter to follow pandas behavior

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

   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