diff --git a/pysparkling/sql/expressions/mappers.py b/pysparkling/sql/expressions/mappers.py index 5ec2aa02..bde7127d 100644 --- a/pysparkling/sql/expressions/mappers.py +++ b/pysparkling/sql/expressions/mappers.py @@ -1238,7 +1238,7 @@ class Grouping(UnaryExpression): def eval(self, row, schema): metadata = row.get_metadata() if metadata is None or "grouping" not in metadata: - raise AnalysisException("grouping_id() can only be used with GroupingSets/Cube/Rollup") + raise AnalysisException("grouping() can only be used with GroupingSets/Cube/Rollup") pos = self.column.find_position_in_schema(schema) return int(metadata["grouping"][pos])