flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yakov Goldberg (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLINK-4794) partition_by_hash() crashes if no parameter is provided
Date Tue, 11 Oct 2016 18:01:20 GMT

    [ https://issues.apache.org/jira/browse/FLINK-4794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15566054#comment-15566054
] 

Yakov Goldberg edited comment on FLINK-4794 at 10/11/16 6:00 PM:
-----------------------------------------------------------------

Error message when using partition_by_hash() with no parameter
{code}
Traceback (most recent call last):
  File "/tmp/flink_plan-299738636/plan.py", line 382, in <module>
    dd24 \
  File "/tmp/flink_plan-299738636/flink/plan/DataSet.py", line 505, in partition_by_hash
    if isinstance(fields[0], TYPES.FunctionType):
IndexError: tuple index out of range
{code}


was (Author: gyag):
Error message when using partition_by_hash() with no parameter
Traceback (most recent call last):
  File "/tmp/flink_plan-299738636/plan.py", line 382, in <module>
    dd24 \
  File "/tmp/flink_plan-299738636/flink/plan/DataSet.py", line 505, in partition_by_hash
    if isinstance(fields[0], TYPES.FunctionType):
IndexError: tuple index out of range

> 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()
> {code}
> def distinct(self, *fields): 
>         f = None 
>         if len(fields) == 0: 
>             f = lambda x: (x,) 
>             fields = (0,) 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message