@Test
public void testJoinWithBroadcastSet() throws Exception {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Integer> intDs = CollectionDataSets.getIntegerDataSet(env);
DataSet<Tuple3<Integer, Long, String>> ds1 = CollectionDataSets.get3TupleDataSet(env);
DataSet<Tuple5<Integer, Long, Integer, String, Long>> ds2 = CollectionDataSets.getSmall5TupleDataSet(env);
DataSet<Tuple3<String, String, Integer>> joinDs =
ds1.join(ds2)
.where(1)
.equalTo(4)
.with(new T3T5BCJoin())
.withBroadcastSet(intDs, "ints");
List<Tuple3<String, String, Integer>> result = joinDs.collect();
String expected = "Hi,Hallo,55\n" +
"Hi,Hallo Welt wie,55\n" +
"Hello,Hallo Welt,55\n" +
"Hello world,Hallo Welt,55\n";
compareResultAsTuples(result, expected);
}