flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zentol <...@git.apache.org>
Subject [GitHub] flink pull request #2115: [FLINK-4017] [py] Add Aggregation support to Pytho...
Date Tue, 21 Jun 2016 20:02:51 GMT
Github user zentol commented on a diff in the pull request:

    --- 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):
             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)
    +        child_set._info.name = "PythonAggregate"
    --- End diff --
    Let's include the aggregation type in the name

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message