You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2023/11/23 04:36:00 UTC
[jira] [Updated] (SPARK-46063) Improve error messages related to argument types in cute, rollup, groupby, and pivot
[ https://issues.apache.org/jira/browse/SPARK-46063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-46063:
---------------------------------
Summary: Improve error messages related to argument types in cute, rollup, groupby, and pivot (was: Improve error messages related to argument types in cute, rollup, and pivot)
> Improve error messages related to argument types in cute, rollup, groupby, and pivot
> ------------------------------------------------------------------------------------
>
> Key: SPARK-46063
> URL: https://issues.apache.org/jira/browse/SPARK-46063
> Project: Spark
> Issue Type: Improvement
> Components: Connect, PySpark
> Affects Versions: 4.0.0
> Reporter: Hyukjin Kwon
> Priority: Minor
>
> {code}
> >>> spark.range(1).cube(cols=1.2)
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/.../python/pyspark/sql/connect/dataframe.py", line 544, in cube
> raise PySparkTypeError(
> pyspark.errors.exceptions.base.PySparkTypeError: [NOT_COLUMN_OR_STR] Argument `cube` should be a Column or str, got float.
> {code}
> ```
> Help on method cube in module pyspark.sql.connect.dataframe:
> cube(*cols: 'ColumnOrName') -> 'GroupedData' method of pyspark.sql.connect.dataframe.DataFrame instance
> Create a multi-dimensional cube for the current :class:`DataFrame` using
> the specified columns, allowing aggregations to be performed on them.
> .. versionadded:: 1.4.0
> .. versionchanged:: 3.4.0
> ```
> it has to be {cols}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org