You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/05/14 04:35:28 UTC

[GitHub] [flink] WeiZhong94 commented on a change in pull request #8401: [FLINK-12407][python] Add all table operators align Java Table API.

WeiZhong94 commented on a change in pull request #8401: [FLINK-12407][python] Add all table operators align Java Table API.
URL: https://github.com/apache/flink/pull/8401#discussion_r283622685
 
 

 ##########
 File path: flink-python/pyflink/table/table.py
 ##########
 @@ -106,6 +113,344 @@ def where(self, predicate):
         """
         return Table(self._j_table.where(predicate))
 
+    def group_by(self, fields):
+        """
+        Groups the elements on some grouping keys. Use this before a selection with aggregations
+        to perform the aggregation on a per-group basis. Similar to a SQL GROUP BY statement.
+
+        Example:
+        ::
+            >>> tab.group_by("key").select("key, value.avg")
+
+        :param fields: Group keys.
+        :return: The grouped table.
+        """
+        return GroupedTable(self._j_table.groupBy(fields))
+
+    def distinct(self):
+        """
+        Removes duplicate values and returns onl
 
 Review comment:
   Done.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services