stratosphere/stratosphere — pull request #752 by filiphaase (2014-05-05 07:32:44+00:00)
Title: Fix for Tuple Comparator

I thought about a fix for the bug in the TupleComparator (mentioned in https://github.com/stratosphere/stratosphere/issues/744#issuecomment-42018637) which currently leads to the wrong result in sorts.

My idea was to change the TupleSeriailizer to serialize the fields in the same order as the comparator needs them. Then the current implementation of the TupleComparator runs without any changes and without any serializiation overhead at runtime. Since it wasn't much code I did just write and tested it and it seems to work. Or do you prefer an other fix?

If this fix is okay, I got an other question: I added the KeyPositions to the TypeInformation and set them in the JavaAPiPostPass. I get the KeyPositions over channel.getLocalStrategyKeys() and pass it to the TypeInformation, but there are also the channel.getShipStrategyKeys(). In my tests the ShipStrategyKeys were a subset of the LocalStrategyKeys therefore I took the LocalStrategyKeys, but is this always the case?