The following code raises "TypeError: The java type info: LocalDateTime is not supported in PyFlink currently.":
However, this works:
Although we add Python coders for LocalTimeTypeInfo in 1.16, there's no corresponding typeinfo at Python side. So it works when a user immediately does processing after to_data_stream since date/time data has already been converted to Python object, but when key_by tries to retrieve typeinfo from Java TypeInformation, it fails.