euphoria
euphoria copied to clipboard
euphoria-flink: optimize sort
Sort consists of sorting elements by a composite key <Window, ExtractedObject>.
SortTranslator
for flink executor relies on GenericTypeComparator
for Window
as well as for user defined extracted object which causes a huge performance overhead because of deserializing both objects on every compare.
- we can define our custom
TypeComparator
for known windows, or just emitNormalizableKey
instead of the window - however without knowing the extracted objects' type we are not able to tune the comparing of those objects