New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-2479] Refactor runtime.operators.* tests #1160
Conversation
That is very nice, thanks for the initiative, @zentol Hope to be able to have a look over it, soon. Looks in principle correct, but cannot hurt to have another pair of eyes check for subtle mistakes... |
I will shortly add another commit that removes the remaining Record portions in the TestData class and refactors its usages. Originally i planned a separate PR for those, but it took a lot less time than expected. |
@@ -725,7 +718,7 @@ public void join(IntPair rec1, Record rec2, Collector<Record> out) throws Except | |||
} | |||
} | |||
|
|||
static final class IntPairRecordPairComparator extends TypePairComparator<IntPair, Record> | |||
static final class IntPairRecordPairComparator extends TypePairComparator<IntPair, Tuple2<Integer, String>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be IntPairTuplePairComparator
Hi @zentol, thanks for this effort! |
1e1de5f
to
beaecf4
Compare
I've renamed the classes and rebased the PR. |
Thanks for the update @zentol! |
This PR refactors most runtime.operators tests to use the TupleGenerator introduced in FLINK-2105.
The changes made can generally be summed up as replacing usages of Records with Tuple2<Integer, String> and adjusting serializers/comparators accordingly. I've added a few static helper methods to the TestData class to simplify comparator/serializer(factory) creation.
One oddball change is the introduction of a separate IntPairComparator whose hash() implementation uses the underlying IntComparators hash() method, to be in line with the TupleComparators implementation.