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/11 09:18:32 UTC

[GitHub] [spark] yoda-mon opened a new pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

yoda-mon opened a new pull request #34240:
URL: https://github.com/apache/spark/pull/34240


   <!--
   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.
   -->
   Add max_by/min_by to PySpark
   
   ### 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.
   -->
   for pyspark users' convenience
   
   ### 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'.
   -->
   yes, new methods are added
   
   
   ### 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.
   -->
   unit 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 removed a comment on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144141 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144141/testReport)** for PR 34240 at commit [`e32bdc2`](https://github.com/apache/spark/commit/e32bdc2db4f44d71e7d590917853a4ab1830e3ff).


-- 
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] yoda-mon edited a comment on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

Posted by GitBox <gi...@apache.org>.
yoda-mon edited a comment on pull request #34240:
URL: https://github.com/apache/spark/pull/34240#issuecomment-940841207


   Finally I switched to `show` and took screenshot of the documents.
   
   


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144077 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144077/testReport)** for PR 34240 at commit [`b795b23`](https://github.com/apache/spark/commit/b795b2312ef3ca82d9928eb5633147da0909274b).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144079 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144079/testReport)** for PR 34240 at commit [`99cac03`](https://github.com/apache/spark/commit/99cac037e760be61cd5dc299b55848ef654fe934).
    * 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] HyukjinKwon commented on a change in pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/tests/test_functions.py
##########
@@ -492,6 +492,26 @@ def test_nth_value(self):
         for r, ex in zip(sorted(rs), sorted(expected)):
             self.assertEqual(tuple(r), ex[:len(r)])
 
+    def test_max_by(self):

Review comment:
       Lets remove tests. I think doctests are enough




-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144113 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144113/testReport)** for PR 34240 at commit [`99cac03`](https://github.com/apache/spark/commit/99cac037e760be61cd5dc299b55848ef654fe934).
    * 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] HyukjinKwon commented on a change in pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -199,6 +199,76 @@ def min(col: "ColumnOrName") -> Column:
     return _invoke_function_over_column("min", col)
 
 
+@since(3.3)
+def max_by(col: "ColumnOrName", ord: "ColumnOrName") -> Column:
+    """
+    Returns the value associated with the maximum value of ord.
+
+    .. versionadded:: 3.3.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        target column that the value will be returned
+    ord : :class:`~pyspark.sql.Column` or str
+        column to be maximized
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        value associated with the maximum value of ord.
+
+    Examples
+    --------
+    >>> from pyspark.sql.functions import max_by
+    >>> spark.createDataFrame([
+    ...     ("Java", 2012, 20000), \\
+    ...     ("dotNET", 2012, 5000), \\
+    ...     ("dotNET", 2013, 48000), \\
+    ...     ("Java", 2013, 30000)], \\
+    ...     schema=("course", "year", "earnings")) \\
+    ...     .groupby("course").agg(max_by("year", "earnings")).collect()
+        [Row(course='Java', max_by(year, earnings)=2013), \

Review comment:
       e.g.)
   
   ```
      ...     .groupby("course").agg(max_by("year", "earnings")).collect()  # doctest: +NORMALIZE_WHITESPACE
      [Row(course='Java', max_by(year, earnings)=2013),
       Row(course='dotNET', max_by(year, earnings)=2013)]
   ```




-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144077 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144077/testReport)** for PR 34240 at commit [`b795b23`](https://github.com/apache/spark/commit/b795b2312ef3ca82d9928eb5633147da0909274b).
    * 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] HyukjinKwon commented on a change in pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -199,6 +199,78 @@ def min(col: "ColumnOrName") -> Column:
     return _invoke_function_over_column("min", col)
 
 
+@since(3.3)
+def max_by(col: "ColumnOrName", ord: "ColumnOrName") -> Column:
+    """
+    Returns the value associated with the maximum value of ord.
+
+    .. versionadded:: 3.3.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        target column that the value will be returned
+    ord : :class:`~pyspark.sql.Column` or str
+        column to be maximized
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        value associated with the maximum value of ord.
+
+    Examples
+    --------
+    >>> df = spark.createDataFrame([
+    ...     ("Java", 2012, 20000), ("dotNET", 2012, 5000),
+    ...     ("dotNET", 2013, 48000), ("Java", 2013, 30000)],
+    ...     schema=("course", "year", "earnings"))
+    >>> df.groupby("course").agg(max_by("year", "earnings")).show()
+    +------+----------------------+
+    |course|max_by(year, earnings)|
+    +------+----------------------+
+    |  Java|                  2013|
+    |dotNET|                  2013|
+    +------+----------------------+
+    """
+    return _invoke_function("max_by", _to_java_column(col), _to_java_column(ord))
+
+
+@since(3.3)

Review comment:
       oops, actually doing this will break PySpark numpy doc formatting. `@since` should be removed in all code bases in long term .. @yoda-mon mind creating a small followup to remove both `since` 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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144146 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144146/testReport)** for PR 34240 at commit [`d20e371`](https://github.com/apache/spark/commit/d20e37132254c9045f69cefd02dbb9f04f106f94).
    * 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] HyukjinKwon commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   retest this please


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -199,6 +199,80 @@ def min(col: "ColumnOrName") -> Column:
     return _invoke_function_over_column("min", col)
 
 
+@since(3.3)
+def max_by(col: "ColumnOrName", ord: "ColumnOrName") -> Column:
+    """
+    Returns the value associated with the maximum value of ord.
+
+    .. versionadded:: 3.3.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        target column that the value will be returned
+    ord : :class:`~pyspark.sql.Column` or str
+        column to be maximized
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        value associated with the maximum value of ord.
+
+    Examples
+    --------
+    >>> from pyspark.sql.functions import max_by

Review comment:
       Lets remove this import for consistency




-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144146 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144146/testReport)** for PR 34240 at commit [`d20e371`](https://github.com/apache/spark/commit/d20e37132254c9045f69cefd02dbb9f04f106f94).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   Can one of the admins verify this patch?


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144113 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144113/testReport)** for PR 34240 at commit [`99cac03`](https://github.com/apache/spark/commit/99cac037e760be61cd5dc299b55848ef654fe934).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144079 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144079/testReport)** for PR 34240 at commit [`99cac03`](https://github.com/apache/spark/commit/99cac037e760be61cd5dc299b55848ef654fe934).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144137 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144137/testReport)** for PR 34240 at commit [`e32bdc2`](https://github.com/apache/spark/commit/e32bdc2db4f44d71e7d590917853a4ab1830e3ff).


-- 
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] yoda-mon commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

Posted by GitBox <gi...@apache.org>.
yoda-mon commented on pull request #34240:
URL: https://github.com/apache/spark/pull/34240#issuecomment-940845891


   Sorry I found typo from screenshot...


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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] yoda-mon edited a comment on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

Posted by GitBox <gi...@apache.org>.
yoda-mon edited a comment on pull request #34240:
URL: https://github.com/apache/spark/pull/34240#issuecomment-940841207


   Finally I switched to `show` and took screenshots of the documents.
   <img width="1054" alt="Screen Shot 2021-10-12 at 18 36 49" src="https://user-images.githubusercontent.com/14937752/136932025-cb8f95c2-7506-4909-a262-974337aa249b.png">
   <img width="936" alt="Screen Shot 2021-10-12 at 18 37 21" src="https://user-images.githubusercontent.com/14937752/136932038-dede06ac-ab16-4bc1-838a-d5ec5169bd26.png">
   
   
   


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144076 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144076/testReport)** for PR 34240 at commit [`14e6c9a`](https://github.com/apache/spark/commit/14e6c9addee00194c784c8eea73bbe64a03661be).
    * This patch **fails PySpark unit 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] AmplabJenkins removed a comment on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144113 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144113/testReport)** for PR 34240 at commit [`99cac03`](https://github.com/apache/spark/commit/99cac037e760be61cd5dc299b55848ef654fe934).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -199,6 +199,76 @@ def min(col: "ColumnOrName") -> Column:
     return _invoke_function_over_column("min", col)
 
 
+@since(3.3)
+def max_by(col: "ColumnOrName", ord: "ColumnOrName") -> Column:
+    """
+    Returns the value associated with the maximum value of ord.
+
+    .. versionadded:: 3.3.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        target column that the value will be returned
+    ord : :class:`~pyspark.sql.Column` or str
+        column to be maximized
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        value associated with the maximum value of ord.
+
+    Examples
+    --------
+    >>> from pyspark.sql.functions import max_by
+    >>> spark.createDataFrame([
+    ...     ("Java", 2012, 20000), \\
+    ...     ("dotNET", 2012, 5000), \\
+    ...     ("dotNET", 2013, 48000), \\
+    ...     ("Java", 2013, 30000)], \\
+    ...     schema=("course", "year", "earnings")) \\
+    ...     .groupby("course").agg(max_by("year", "earnings")).collect()
+        [Row(course='Java', max_by(year, earnings)=2013), \

Review comment:
       Here i would remove leading empty spaces, and use the docstring's directive for ignoring whitespace




-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -199,6 +199,76 @@ def min(col: "ColumnOrName") -> Column:
     return _invoke_function_over_column("min", col)
 
 
+@since(3.3)
+def max_by(col: "ColumnOrName", ord: "ColumnOrName") -> Column:
+    """
+    Returns the value associated with the maximum value of ord.
+
+    .. versionadded:: 3.3.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        target column that the value will be returned
+    ord : :class:`~pyspark.sql.Column` or str
+        column to be maximized
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        value associated with the maximum value of ord.
+
+    Examples
+    --------
+    >>> from pyspark.sql.functions import max_by
+    >>> spark.createDataFrame([
+    ...     ("Java", 2012, 20000), \\

Review comment:
       Actually you can remove \\ 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] AmplabJenkins commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144076 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144076/testReport)** for PR 34240 at commit [`14e6c9a`](https://github.com/apache/spark/commit/14e6c9addee00194c784c8eea73bbe64a03661be).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144149 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144149/testReport)** for PR 34240 at commit [`db23c69`](https://github.com/apache/spark/commit/db23c69c083064ed647200d430e7f8253d146697).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   Yeah, showing `show` is fine too.
   
   ```python
       >>> df = spark.createDataFrame([
       ...     ("Java", 2012, 20000), ("dotNET", 2012, 5000),
       ...     ("dotNET", 2013, 48000), ("Java", 2013, 30000)],
       ...     schema=("course", "year", "earnings"))
       >>> df.groupby("course").agg(max_by("year", "earnings")).collect()
       [Row(course='Java', max_by(year, earnings)=2013),
        Row(course='dotNET', max_by(year, earnings)=2013)]
   ```
   
   ^^ something like this should work.


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144137 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144137/testReport)** for PR 34240 at commit [`e32bdc2`](https://github.com/apache/spark/commit/e32bdc2db4f44d71e7d590917853a4ab1830e3ff).
    * This patch **fails PySpark unit 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] AmplabJenkins commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144131 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144131/testReport)** for PR 34240 at commit [`d2b3560`](https://github.com/apache/spark/commit/d2b35600f805c69f46a99dd35a0aa5c68ae9b94a).
    * This patch **fails PySpark unit 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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144076 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144076/testReport)** for PR 34240 at commit [`14e6c9a`](https://github.com/apache/spark/commit/14e6c9addee00194c784c8eea73bbe64a03661be).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144131 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144131/testReport)** for PR 34240 at commit [`d2b3560`](https://github.com/apache/spark/commit/d2b35600f805c69f46a99dd35a0aa5c68ae9b94a).


-- 
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] sarutak closed pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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] sarutak commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   @yoda-mon 
   Now that tests are done by doctests, could you note that instead of `unit tests` in the description?


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144141 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144141/testReport)** for PR 34240 at commit [`e32bdc2`](https://github.com/apache/spark/commit/e32bdc2db4f44d71e7d590917853a4ab1830e3ff).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144149 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144149/testReport)** for PR 34240 at commit [`db23c69`](https://github.com/apache/spark/commit/db23c69c083064ed647200d430e7f8253d146697).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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] sarutak commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   @yoda-mon Please make sure that the layout of the document generated by `make html` is not broken, just in case.


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144077 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144077/testReport)** for PR 34240 at commit [`b795b23`](https://github.com/apache/spark/commit/b795b2312ef3ca82d9928eb5633147da0909274b).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144146 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144146/testReport)** for PR 34240 at commit [`d20e371`](https://github.com/apache/spark/commit/d20e37132254c9045f69cefd02dbb9f04f106f94).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144137 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144137/testReport)** for PR 34240 at commit [`e32bdc2`](https://github.com/apache/spark/commit/e32bdc2db4f44d71e7d590917853a4ab1830e3ff).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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] yoda-mon commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

Posted by GitBox <gi...@apache.org>.
yoda-mon commented on pull request #34240:
URL: https://github.com/apache/spark/pull/34240#issuecomment-940644817


   @HyukjinKwon 
   
   I straggled with docstring but this kind of trials did not work...
   
   ```python
       >>> from pyspark.sql.functions import max_by
       >>> spark.createDataFrame([
       ...     ("Java", 2012, 20000),
       ...     ("dotNET", 2012, 5000),
       ...     ("dotNET", 2013, 48000),
       ...     ("Java", 2013, 30000)],
       ...     schema=("course", "year", "earnings")) \\
       ...     .groupby("course").agg(max_by("year", "earnings")).collect()
       :dedent:
       [Row(course='Java', max_by(year, earnings)=2013), \
       Row(course='dotNET', max_by(year, earnings)=2013)]
   ```
   I took around other functions and I'd like to switch to use `show` instead of `collect`, is it ok ?


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -199,6 +199,76 @@ def min(col: "ColumnOrName") -> Column:
     return _invoke_function_over_column("min", col)
 
 
+@since(3.3)
+def max_by(col: "ColumnOrName", ord: "ColumnOrName") -> Column:
+    """
+    Returns the value associated with the maximum value of ord.
+
+    .. versionadded:: 3.3.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        target column that the value will be returned
+    ord : :class:`~pyspark.sql.Column` or str
+        column to be maximized
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        value associated with the maximum value of ord.
+
+    Examples
+    --------
+    >>> from pyspark.sql.functions import max_by
+    >>> spark.createDataFrame([
+    ...     ("Java", 2012, 20000), \\

Review comment:
       Actually you can remove \\\\ 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] HyukjinKwon commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144131 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144131/testReport)** for PR 34240 at commit [`d2b3560`](https://github.com/apache/spark/commit/d2b35600f805c69f46a99dd35a0aa5c68ae9b94a).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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






-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144079 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144079/testReport)** for PR 34240 at commit [`99cac03`](https://github.com/apache/spark/commit/99cac037e760be61cd5dc299b55848ef654fe934).


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   Can one of the admins verify this patch?


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -199,6 +199,76 @@ def min(col: "ColumnOrName") -> Column:
     return _invoke_function_over_column("min", col)
 
 
+@since(3.3)
+def max_by(col: "ColumnOrName", ord: "ColumnOrName") -> Column:
+    """
+    Returns the value associated with the maximum value of ord.
+
+    .. versionadded:: 3.3.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        target column that the value will be returned
+    ord : :class:`~pyspark.sql.Column` or str
+        column to be maximized
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        value associated with the maximum value of ord.
+
+    Examples
+    --------
+    >>> from pyspark.sql.functions import max_by
+    >>> spark.createDataFrame([
+    ...     ("Java", 2012, 20000), \\
+    ...     ("dotNET", 2012, 5000), \\
+    ...     ("dotNET", 2013, 48000), \\
+    ...     ("Java", 2013, 30000)], \\
+    ...     schema=("course", "year", "earnings")) \\
+    ...     .groupby("course").agg(max_by("year", "earnings")).collect()
+        [Row(course='Java', max_by(year, earnings)=2013), \

Review comment:
       ohh sorry the directive is specified globally below (https://github.com/apache/spark/blob/99cac037e760be61cd5dc299b55848ef654fe934/python/pyspark/sql/functions.py#L5533). so just:
   
   ```
      ...     .groupby("course").agg(max_by("year", "earnings")).collect()
      [Row(course='Java', max_by(year, earnings)=2013),
       Row(course='dotNET', max_by(year, earnings)=2013)]
   ```
   
   should be enough.




-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144141 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144141/testReport)** for PR 34240 at commit [`e32bdc2`](https://github.com/apache/spark/commit/e32bdc2db4f44d71e7d590917853a4ab1830e3ff).
    * 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 commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


   **[Test build #144149 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144149/testReport)** for PR 34240 at commit [`db23c69`](https://github.com/apache/spark/commit/db23c69c083064ed647200d430e7f8253d146697).
    * 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 commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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] yoda-mon commented on pull request #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

Posted by GitBox <gi...@apache.org>.
yoda-mon commented on pull request #34240:
URL: https://github.com/apache/spark/pull/34240#issuecomment-940841207


   Finally I switched to `show` and took screenshot of the documents.
   
   ![image](https://user-images.githubusercontent.com/14937752/136931662-f3bfc649-92e2-4eb7-8e69-5bec75526047.png)
   ![image](https://user-images.githubusercontent.com/14937752/136931771-927bbc24-f14c-40ca-b40a-04d7457c1481.png)
   
   


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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


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


-- 
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 #34240: [SPARK-36972][PYTHON]Add max_by/min_by API to PySpark

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



##########
File path: python/pyspark/sql/functions.py
##########
@@ -199,6 +199,78 @@ def min(col: "ColumnOrName") -> Column:
     return _invoke_function_over_column("min", col)
 
 
+@since(3.3)
+def max_by(col: "ColumnOrName", ord: "ColumnOrName") -> Column:
+    """
+    Returns the value associated with the maximum value of ord.
+
+    .. versionadded:: 3.3.0
+
+    Parameters
+    ----------
+    col : :class:`~pyspark.sql.Column` or str
+        target column that the value will be returned
+    ord : :class:`~pyspark.sql.Column` or str
+        column to be maximized
+
+    Returns
+    -------
+    :class:`~pyspark.sql.Column`
+        value associated with the maximum value of ord.
+
+    Examples
+    --------
+    >>> df = spark.createDataFrame([
+    ...     ("Java", 2012, 20000), ("dotNET", 2012, 5000),
+    ...     ("dotNET", 2013, 48000), ("Java", 2013, 30000)],
+    ...     schema=("course", "year", "earnings"))
+    >>> df.groupby("course").agg(max_by("year", "earnings")).show()
+    +------+----------------------+
+    |course|max_by(year, earnings)|
+    +------+----------------------+
+    |  Java|                  2013|
+    |dotNET|                  2013|
+    +------+----------------------+
+    """
+    return _invoke_function("max_by", _to_java_column(col), _to_java_column(ord))
+
+
+@since(3.3)

Review comment:
       oops, actually doing this will break PySpark numpy doc formatting. `@since` should be removed in all code bases in long term .. @yoda-mon mind creating a small followup to remove both `since` 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