use of org.apache.flink.api.java.ExecutionEnvironment in project flink by apache.
the class LeftOuterJoinOperatorTest method testLeftOuter2.
@Test
public void testLeftOuter2() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple5<Integer, Long, String, Long, Integer>> ds1 = env.fromCollection(emptyTupleData, tupleTypeInfo);
DataSet<Tuple5<Integer, Long, String, Long, Integer>> ds2 = env.fromCollection(emptyTupleData, tupleTypeInfo);
// should work
ds1.leftOuterJoin(ds2).where("f1").equalTo("f3").with(new DummyJoin());
}
use of org.apache.flink.api.java.ExecutionEnvironment in project flink by apache.
the class LeftOuterJoinOperatorTest method testLeftOuter9.
@Test(expected = InvalidProgramException.class)
public void testLeftOuter9() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple5<Integer, Long, String, Long, Integer>> ds1 = env.fromCollection(emptyTupleData, tupleTypeInfo);
DataSet<Tuple5<Integer, Long, String, Long, Integer>> ds2 = env.fromCollection(emptyTupleData, tupleTypeInfo);
// key types do not match
ds1.leftOuterJoin(ds2).where(0).equalTo(1).with(new DummyJoin());
}
use of org.apache.flink.api.java.ExecutionEnvironment in project flink by apache.
the class LeftOuterJoinOperatorTest method testLeftOuter1.
@Test
public void testLeftOuter1() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple5<Integer, Long, String, Long, Integer>> ds1 = env.fromCollection(emptyTupleData, tupleTypeInfo);
DataSet<Tuple5<Integer, Long, String, Long, Integer>> ds2 = env.fromCollection(emptyTupleData, tupleTypeInfo);
// should work
ds1.leftOuterJoin(ds2).where(0).equalTo(4).with(new DummyJoin());
}
use of org.apache.flink.api.java.ExecutionEnvironment in project flink by apache.
the class LeftOuterJoinOperatorTest method testLeftOuter8.
@Test(expected = CompositeType.InvalidFieldReferenceException.class)
public void testLeftOuter8() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple5<Integer, Long, String, Long, Integer>> ds1 = env.fromCollection(emptyTupleData, tupleTypeInfo);
DataSet<Tuple5<Integer, Long, String, Long, Integer>> ds2 = env.fromCollection(emptyTupleData, tupleTypeInfo);
// invalid key reference
ds1.leftOuterJoin(ds2).where(1).equalTo("f5").with(new DummyJoin());
}
use of org.apache.flink.api.java.ExecutionEnvironment in project flink by apache.
the class MaxByOperatorTest method testOutOfTupleBoundsDataset2.
/**
* This test validates that an index which is out of bounds throws an
* IndexOutOfBOundsExcpetion.
*/
@Test(expected = IndexOutOfBoundsException.class)
public void testOutOfTupleBoundsDataset2() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple5<Integer, Long, String, Long, Integer>> tupleDs = env.fromCollection(emptyTupleData, tupleTypeInfo);
// should not work, key out of tuple bounds
tupleDs.maxBy(-1);
}
Aggregations