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

CoFlatMapFunction requires both two flat_maps to yield something

Agile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment