flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [3/4] flink git commit: [FLINK-4794] [py] Fix partition_by_hash() implicit key usage
Date Fri, 21 Oct 2016 09:03:47 GMT
[FLINK-4794] [py] Fix partition_by_hash() implicit key usage


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/41d51670
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/41d51670
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/41d51670

Branch: refs/heads/master
Commit: 41d51670019349a7e2dfdc4f4ea55efdc488dcd7
Parents: 2ece925
Author: zentol <chesnay@apache.org>
Authored: Wed Oct 12 12:09:22 2016 +0200
Committer: zentol <chesnay@apache.org>
Committed: Fri Oct 21 11:03:03 2016 +0200

----------------------------------------------------------------------
 .../main/python/org/apache/flink/python/api/flink/plan/DataSet.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/41d51670/flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/DataSet.py
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/DataSet.py
b/flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/DataSet.py
index 0463ccc..98578ef 100644
--- a/flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/DataSet.py
+++ b/flink-libraries/flink-python/src/main/python/org/apache/flink/python/api/flink/plan/DataSet.py
@@ -544,7 +544,7 @@ class DataSet(object):
     def partition_by_hash(self, *fields):
         f = None
         if len(fields) == 0:
-            f = lambda x: (x,)
+            raise ValueError("fields argument must not be empty.")
         if isinstance(fields[0], TYPES.FunctionType):
             f = lambda x: (fields[0](x),)
         if isinstance(fields[0], KeySelectorFunction):


Mime
View raw message