Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2115#discussion_r67940565
--- Diff:
flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/DataSet.py
---
@@ -192,6 +193,30 @@ def reduce(self, operator):
self._env._sets.append(child)
return child_set
+ def aggregate(self, aggregation, field):
+ """
+ Applies an Aggregate transformation (using a GroupReduceFunction)
on a non-grouped Tuple DataSet.
+ :param aggregation: The built-in aggregation function to apply on
the DataSet.
+ :param field: The index of the Tuple field on which to perform the
function.
+ :return: A GroupReduceOperator that represents the aggregated
DataSet.
+ """
+ child_set = self.reduce_group(aggregation(field), combinable=True)
--- End diff --
there should also be a test case for a non-grouped aggregation.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---