hequn8128 commented on issue #9858: [FLINK-14208][python] Optimize Python UDFs with parameters of constant values URL: https://github.com/apache/flink/pull/9858#issuecomment-541312088 @HuangXingBo I find that there are problems for supporting the time Interval type in Python due to the equals method of `TimeIntervalTypeInfo`. The equals method use `==` to compare the two serializers. This is ok for java because the `INTERVAL_MILLIS` in `TimeIntervalTypeInfo` is a static variable. However for python, we serialize the `INTERVAL_MILLIS` type in `PythonFunctionCodeGenerator` using `EncodingUtils.encodeObjectToString` and deserialize it later. This makes the two objects can not compare with `==` anymore. I'm not sure if we can change the compare method in `TimeIntervalTypeInfo`, i.e., change `==` to `equals`. But definitely, it's not a good idea to solve the problem in this PR. We can discuss the problem of the equals method in another jira and support time Interval type later. What do you think? Best, Hequn
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
