Chesnay Schepler commented on FLINK-4794:

This is intended, assuming the appropriate java exception is thrown. The error 
message would be helpful.

There is no partition_by_hash function without parameters in the java & scala 
counterparts, if you don't pass a parameter they will throw an exception. And 
this is good; just picking an (effectively arbitrary) field will in many cases 
lead to bad behavior.

> partition_by_hash() crashes if no parameter is provided
> -------------------------------------------------------
>                 Key: FLINK-4794
>                 URL: https://issues.apache.org/jira/browse/FLINK-4794
>             Project: Flink
>          Issue Type: Bug
>          Components: Python API
>            Reporter: Yakov Goldberg
> partition_by_hash() crashes if no parameter is provided.
> Looks like a line of code was missed, check distinct()
> def distinct(self, *fields): 
>         f = None 
>         if len(fields) == 0: 
>             f = lambda x: (x,) 
>             fields = (0,) 

This message was sent by Atlassian JIRA

Reply via email to