chendan created FLINK-25513:
-------------------------------

             Summary: CoFlatMapFunction requires both two flat_maps to yield 
something
                 Key: FLINK-25513
                 URL: https://issues.apache.org/jira/browse/FLINK-25513
             Project: Flink
          Issue Type: Bug
          Components: API / Python
    Affects Versions: 1.13.3
            Reporter: chendan


When I used CoFlatMapFunction is pyflink, I found out that I must put yield 
something in both flat_map1 and flat_map2. Otherwise, it will raise an 
exception: TypeError: 'NoneType' object is not iterable.

In pyflink source code: datastream.py,  the process_element2 of 
KeyedCoMapCoProcessFunction class in ConnectedStreams class has only one 
sentence: 

{color:#cc7832}yield {color}{color:#94558d}self{color}._underlying.map2(value). 
if the flat_map2 has not yield something it will result in exception. So it 
should judge whether the {color:#94558d}self{color}._underlying.map2(value) is 
None or not firstly.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to