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] [Updated] (FLINK-4795) CsvStringify crashes in case of tuple in tuple, t.e. ("a", True, (1,5))
Date Tue, 11 Oct 2016 18:02:20 GMT

     [ https://issues.apache.org/jira/browse/FLINK-4795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yakov Goldberg updated FLINK-4795:
----------------------------------
    Description: 
CsvStringify crashes in case of tuple in tuple, t.e. ("a", True, (1,5))

Looks like, mistyping in CsvStringify._map()
{code}
def _map(self, value): 
        if isinstance(value, (tuple, list)): 
            return "(" + b", ".join([self.map(x) for x in value]) + ")" 
        else: 
            return str(value) 
{code}

self._map() should be called

But this will affect write_csv() and read_csv().
write_csv() will work automatically
and read_csv() should be implemented to be able to read Tuple type.


  was:
CsvStringify crashes in case of tuple in tuple, t.e. ("a", True, (1,5))

Looks like, mistyping in CsvStringify._map()

def _map(self, value): 
        if isinstance(value, (tuple, list)): 
            return "(" + b", ".join([self.map(x) for x in value]) + ")" 
        else: 
            return str(value) 

self._map() should be called

But this will affect write_csv() and read_csv().
write_csv() will work automatically
and read_csv() should be implemented to be able to read Tuple type.



> CsvStringify crashes in case of tuple in tuple, t.e. ("a", True, (1,5))
> -----------------------------------------------------------------------
>
>                 Key: FLINK-4795
>                 URL: https://issues.apache.org/jira/browse/FLINK-4795
>             Project: Flink
>          Issue Type: Bug
>          Components: Python API
>            Reporter: Yakov Goldberg
>
> CsvStringify crashes in case of tuple in tuple, t.e. ("a", True, (1,5))
> Looks like, mistyping in CsvStringify._map()
> {code}
> def _map(self, value): 
>         if isinstance(value, (tuple, list)): 
>             return "(" + b", ".join([self.map(x) for x in value]) + ")" 
>         else: 
>             return str(value) 
> {code}
> self._map() should be called
> But this will affect write_csv() and read_csv().
> write_csv() will work automatically
> and read_csv() should be implemented to be able to read Tuple type.



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

Mime
View raw message