'Why is there no RichMapFunction in pyflink?

There is pyflink.datastream.MapFunction in Flink Python API Docs. Meanwhile there is no RichMapFunction. Could somebody tell me why?



Solution 1:[1]

All the functions in PyFlink are rich. You can see that, pyflink.datastream.MapFunction extends pyflink.datastream.Function which has a open method.

Solution 2:[2]

I'm not sure why it's missing from PyFlink, but RichMapFunction is completely unnecessary. Anything you could do with a RichMapFunction can be done with a ProcessFunction or KeyedProcessFunction instead.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dian Fu
Solution 2 David Anderson