[ https://issues.apache.org/jira/browse/SPARK-46063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ruifeng Zheng reassigned SPARK-46063: ------------------------------------- Assignee: Hyukjin Kwon > 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 > Assignee: Hyukjin Kwon > Priority: Minor > Labels: pull-request-available > > {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} > {code} > >>> help(spark.range(1).cube) > 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 > {code} > it has to be {cols} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org