@Override
  public SchemaKStream<?> buildStream(final PlanBuildContext buildContext) {

    if (!joinKey.isForeignKey()) {
      ensureMatchingPartitionCounts(buildContext.getServiceContext().getTopicClient());
    }

    final JoinerFactory joinerFactory = new JoinerFactory(
        buildContext,
        this,
        buildContext.buildNodeContext(getId().toString()));

    return joinerFactory.getJoiner(left.getNodeOutputType(), right.getNodeOutputType()).join();
  }
@Test
  public void shouldNotAllowStreamToTableOuterJoin() {
    // Given:
    setupStream(left, leftSchemaKStream);
    setupTable(right, rightSchemaKTable);

    final JoinNode joinNode = new JoinNode(nodeId, OUTER, joinKey,       true, left,
        right, empty(), "KAFKA");

    // When:
    final Exception e = assertThrows(
        KsqlException.class,
        () -> joinNode.buildStream(planBuildContext)
    );

    // Then:
    assertThat(e.getMessage(), containsString(
        "Invalid join type encountered: [FULL] OUTER JOIN"));
  }