use of io.crate.analyze.relations.JoinPair in project crate by crate.
the class ManyTableConsumerTest method testOptimizeJoinNoPresort.
@Test
public void testOptimizeJoinNoPresort() throws Exception {
JoinPair pair1 = new JoinPair(T3.T1, T3.T2, JoinType.CROSS);
JoinPair pair2 = new JoinPair(T3.T2, T3.T3, JoinType.CROSS);
@SuppressWarnings("unchecked") Collection<QualifiedName> qualifiedNames = ManyTableConsumer.orderByJoinConditions(Arrays.asList(T3.T1, T3.T2, T3.T3), ImmutableSet.<Set<QualifiedName>>of(), ImmutableList.of(pair1, pair2), ImmutableList.<QualifiedName>of());
assertThat(qualifiedNames, Matchers.contains(T3.T1, T3.T2, T3.T3));
}
use of io.crate.analyze.relations.JoinPair in project crate by crate.
the class ManyTableConsumerTest method testNoOptimizeWithSortingAndOuterJoin.
@Test
public void testNoOptimizeWithSortingAndOuterJoin() throws Exception {
JoinPair pair1 = new JoinPair(T3.T1, T3.T2, JoinType.LEFT);
JoinPair pair2 = new JoinPair(T3.T2, T3.T3, JoinType.LEFT);
@SuppressWarnings("unchecked") Collection<QualifiedName> qualifiedNames = ManyTableConsumer.orderByJoinConditions(Arrays.asList(T3.T1, T3.T2, T3.T3), ImmutableSet.<Set<QualifiedName>>of(), ImmutableList.of(pair1, pair2), ImmutableList.of(T3.T3, T3.T2));
assertThat(qualifiedNames, Matchers.contains(T3.T1, T3.T2, T3.T3));
}
Aggregations