{
// create table scan for build data with a single split, so it is only waiting on the no-more buffers call
StageExecutionPlan build = createTableScanPlan("build", metadata, 1);
// create an exchange to read the build data
ExchangeNode exchangeNode = new ExchangeNode(new PlanNodeId(planId + "-build"),
build.getFragment().getId(),
ImmutableList.copyOf(build.getFragment().getSymbols().keySet()));
// create table scan for probe data with three splits, so it will not send the no-more buffers call
StageExecutionPlan probe = createTableScanPlan("probe", metadata, 10);
// join build and probe
PlanFragment joinPlan = new PlanFragment(new PlanFragmentId(planId),
new PlanNodeId(planId),
probe.getFragment().getSymbols(), // this is wrong, but it works
new JoinNode(new PlanNodeId(planId), JoinNode.Type.INNER, probe.getFragment().getRoot(), exchangeNode, ImmutableList.<EquiJoinClause>of()));
return new StageExecutionPlan(joinPlan,
probe.getDataSource(),
ImmutableList.<StageExecutionPlan>of(build),
ImmutableMap.<PlanNodeId, OutputReceiver>of());