Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-25513

CoFlatMapFunction requires both two flat_maps to yield something

    XMLWordPrintableJSON

Details

    Description

      When I used CoFlatMapFunction in 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: 

      yield self._underlying.map2(value). if the flat_map2 has not yield something it will result in exception. So it should judge whether the self._underlying.map2(value) is None or not firstly.

      Attachments

        Issue Links

          Activity

            People

              atptour2017 chendan
              atptour2017 chendan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: