use of org.apache.flink.api.java.tuple.Tuple4 in project flink by apache.
the class GroupingTest method testGroupSortKeyFields5.
@Test(expected = InvalidProgramException.class)
public void testGroupSortKeyFields5() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple4<Integer, Long, CustomType, Long[]>> tupleDs = env.fromCollection(tupleWithCustomData, tupleWithCustomInfo);
// should not work
tupleDs.groupBy(0).sortGroup(3, Order.ASCENDING);
}
use of org.apache.flink.api.java.tuple.Tuple4 in project flink by apache.
the class GroupingTest method testGroupSortByKeyExpression5.
@Test(expected = InvalidProgramException.class)
public void testGroupSortByKeyExpression5() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple4<Integer, Long, CustomType, Long[]>> tupleDs = env.fromCollection(tupleWithCustomData, tupleWithCustomInfo);
// should not work
tupleDs.groupBy("f0").sortGroup("f1", Order.ASCENDING).sortGroup("f2", Order.ASCENDING);
}
use of org.apache.flink.api.java.tuple.Tuple4 in project flink by apache.
the class GroupingTest method testGroupSortByKeySelector3.
@SuppressWarnings("serial")
@Test(expected = InvalidProgramException.class)
public void testGroupSortByKeySelector3() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple4<Integer, Long, CustomType, Long[]>> tupleDs = env.fromCollection(tupleWithCustomData, tupleWithCustomInfo);
// should not work
tupleDs.groupBy(new KeySelector<Tuple4<Integer, Long, CustomType, Long[]>, Long>() {
@Override
public Long getKey(Tuple4<Integer, Long, CustomType, Long[]> value) throws Exception {
return value.f1;
}
}).sortGroup(new KeySelector<Tuple4<Integer, Long, CustomType, Long[]>, Long[]>() {
@Override
public Long[] getKey(Tuple4<Integer, Long, CustomType, Long[]> value) throws Exception {
return value.f3;
}
}, Order.ASCENDING);
}
use of org.apache.flink.api.java.tuple.Tuple4 in project flink by apache.
the class GroupingTest method testGroupSortByKeyExpression4.
@Test(expected = InvalidProgramException.class)
public void testGroupSortByKeyExpression4() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple4<Integer, Long, CustomType, Long[]>> tupleDs = env.fromCollection(tupleWithCustomData, tupleWithCustomInfo);
// should not work
tupleDs.groupBy("f0").sortGroup("f2", Order.ASCENDING);
}
use of org.apache.flink.api.java.tuple.Tuple4 in project flink by apache.
the class GroupingTest method testGroupSortKeyFields4.
@Test(expected = InvalidProgramException.class)
public void testGroupSortKeyFields4() {
final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
DataSet<Tuple4<Integer, Long, CustomType, Long[]>> tupleDs = env.fromCollection(tupleWithCustomData, tupleWithCustomInfo);
// should not work
tupleDs.groupBy(0).sortGroup(2, Order.ASCENDING);
}
Aggregations