You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by we...@apache.org on 2025/11/14 03:44:37 UTC
(spark) branch master updated: [SPARK-54332][PYTHON][CONNECT] No need to attach PlanId in grouping column names in rollup/cube/groupingSets
This is an automated email from the ASF dual-hosted git repository.
wenchen 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 9f1bd47bab15 [SPARK-54332][PYTHON][CONNECT] No need to attach PlanId in grouping column names in rollup/cube/groupingSets
9f1bd47bab15 is described below
commit 9f1bd47bab158e7743db1c1798612125eef01003
Author: Ruifeng Zheng <ru...@apache.org>
AuthorDate: Thu Nov 13 19:44:17 2025 -0800
[SPARK-54332][PYTHON][CONNECT] No need to attach PlanId in grouping column names in rollup/cube/groupingSets
### What changes were proposed in this pull request?
A follow up of https://github.com/apache/spark/pull/52933, avoiding attaching plan id of column names in rollup/cube/groupingSets
### Why are the changes needed?
to be consistent with classic:
https://github.com/apache/spark/blob/e75ca577923f9f465eb06b4df814c00143fa41ea/sql/api/src/main/scala/org/apache/spark/sql/Dataset.scala#L1415-L1416
https://github.com/apache/spark/blob/e75ca577923f9f465eb06b4df814c00143fa41ea/sql/api/src/main/scala/org/apache/spark/sql/Dataset.scala#L1366-L1368
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
ci
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #53033 from zhengruifeng/no_plan_id_cube.
Authored-by: Ruifeng Zheng <ru...@apache.org>
Signed-off-by: Wenchen Fan <we...@databricks.com>
---
python/pyspark/sql/connect/dataframe.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/python/pyspark/sql/connect/dataframe.py b/python/pyspark/sql/connect/dataframe.py
index dfca13a8464b..65dea5cf1a57 100644
--- a/python/pyspark/sql/connect/dataframe.py
+++ b/python/pyspark/sql/connect/dataframe.py
@@ -619,7 +619,7 @@ class DataFrame(ParentDataFrame):
if isinstance(c, Column):
_cols.append(c)
elif isinstance(c, str):
- _cols.append(self[c])
+ _cols.append(F.col(c))
elif isinstance(c, int) and not isinstance(c, bool):
if c < 1:
raise PySparkIndexError(
@@ -649,7 +649,7 @@ class DataFrame(ParentDataFrame):
if isinstance(c, Column):
_cols.append(c)
elif isinstance(c, str):
- _cols.append(self[c])
+ _cols.append(F.col(c))
elif isinstance(c, int) and not isinstance(c, bool):
if c < 1:
raise PySparkIndexError(
@@ -675,7 +675,7 @@ class DataFrame(ParentDataFrame):
if isinstance(c, Column):
gset.append(c)
elif isinstance(c, str):
- gset.append(self[c])
+ gset.append(F.col(c))
else:
raise PySparkTypeError(
errorClass="NOT_COLUMN_OR_STR",
@@ -691,7 +691,7 @@ class DataFrame(ParentDataFrame):
if isinstance(c, Column):
gcols.append(c)
elif isinstance(c, str):
- gcols.append(self[c])
+ gcols.append(F.col(c))
else:
raise PySparkTypeError(
errorClass="NOT_COLUMN_OR_STR",
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org