dianfu commented on code in PR #28937:
URL: https://github.com/apache/flink/pull/28937#discussion_r3765052553
##########
flink-python/pyflink/dataframe/dataframe.py:
##########
@@ -348,3 +433,75 @@ def collect(self) -> List[Row]:
"""
with self._table.execute().collect() as rows:
return list(rows)
+
+
+@PublicEvolving()
+class GroupedDataFrame:
+ """
+ A DataFrame grouped by one or more keys and ready for aggregation.
+
+ Instances are created by :meth:`DataFrame.group_by`.
+
+ .. versionadded:: 2.4.0
+ """
+
+ def __init__(self, dataframe: DataFrame, grouping_keys: List[Expression]):
+ self._dataframe = dataframe
+ self._grouping_keys = grouping_keys
Review Comment:
`group_by(pf.col("amount") + 1).agg(...)` raises `ValidationException`
because the grouped projection re-evaluates the expression after `amount` is no
longer available.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]