This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 0f3c58aa9e7d [SPARK-46048][PYTHON][CONNECT][FOLLOWUP] Correct the 
string representation
0f3c58aa9e7d is described below

commit 0f3c58aa9e7dd7966e07a391767bdba294a97c9e
Author: Ruifeng Zheng <ruife...@apache.org>
AuthorDate: Mon Dec 4 11:02:28 2023 +0900

    [SPARK-46048][PYTHON][CONNECT][FOLLOWUP] Correct the string representation
    
    ### What changes were proposed in this pull request?
    Correct the string representation
    
    ### Why are the changes needed?
    to fix a minor issue
    
    ### Does this PR introduce _any_ user-facing change?
    yes
    
    before:
    ```
    In [1]: spark.range(10).groupingSets([])
    Out[1]: GroupedData[grouping expressions: [], value: [id: bigint], type: 
Pivot]
    ```
    
    after:
    ```
    In [2]: spark.range(10).groupingSets([])
    Out[2]: GroupedData[grouping expressions: [], value: [id: bigint], type: 
GroupingSets]
    ```
    
    ### How was this patch tested?
    manually test, it is trivial so I don't add a doctest
    
    ### Was this patch authored or co-authored using generative AI tooling?
    no
    
    Closes #44140 from zhengruifeng/connect_grouping_str.
    
    Authored-by: Ruifeng Zheng <ruife...@apache.org>
    Signed-off-by: Hyukjin Kwon <gurwls...@apache.org>
---
 python/pyspark/sql/connect/group.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/python/pyspark/sql/connect/group.py 
b/python/pyspark/sql/connect/group.py
index 610ef036bc5e..bb963c910e2f 100644
--- a/python/pyspark/sql/connect/group.py
+++ b/python/pyspark/sql/connect/group.py
@@ -109,6 +109,8 @@ class GroupedData:
             type_str = "RollUp"
         elif self._group_type == "cube":
             type_str = "Cube"
+        elif self._group_type == "grouping_sets":
+            type_str = "GroupingSets"
         else:
             type_str = "Pivot"
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to