Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,34 @@ public void testCanStreamNoJoin()
assertThat(SchedulingUtils.canStream(parentSubPlan, valuesSubPlan("a"))).isTrue();
}

@Test
public void testCanStreamUnion()
{
/*
parent(union)
/ \ \
-------------------------------------- stage boundary
a b c
*/
SubPlan aSubPlan = valuesSubPlan("a");
RemoteSourceNode remoteSourceA = remoteSource("a");

SubPlan bSubPlan = valuesSubPlan("b");
RemoteSourceNode remoteSourceB = remoteSource("b");

SubPlan cSubPlan = valuesSubPlan("c");
RemoteSourceNode remoteSourceC = remoteSource("c");

SubPlan parentSubPlan = createSubPlan(
"parent",
union("union", ImmutableList.of(remoteSourceA, remoteSourceB, remoteSourceC)),
ImmutableList.of(aSubPlan, bSubPlan, cSubPlan));

assertThat(SchedulingUtils.canStream(parentSubPlan, aSubPlan)).isTrue();
assertThat(SchedulingUtils.canStream(parentSubPlan, bSubPlan)).isTrue();
assertThat(SchedulingUtils.canStream(parentSubPlan, cSubPlan)).isTrue();
}

@Test
public void testCanStreamJoin()
{
Expand Down
Loading