@Override
  public LogicalSchema getSchema() {
    return outputSchema;
  }
@Test
  public void shouldBuildPullQueryOutputSchemaSelectValueAndWindowBounds() {
    // Given:
    when(keyFormat.isWindowed()).thenReturn(true);
    when(source.getSchema()).thenReturn(INPUT_SCHEMA.withPseudoAndKeyColsInValue(true));

    final UnqualifiedColumnReferenceExp windowstartRef =
        new UnqualifiedColumnReferenceExp(SystemColumns.WINDOWSTART_NAME);
    final UnqualifiedColumnReferenceExp windowendRef =
        new UnqualifiedColumnReferenceExp(SystemColumns.WINDOWEND_NAME);
    selects = ImmutableList.<SelectItem>builder()
        .add(new SingleColumn(windowstartRef, Optional.of(SystemColumns.WINDOWSTART_NAME)))
        .add((new SingleColumn(windowendRef, Optional.of(SystemColumns.WINDOWEND_NAME))))
        .add((new SingleColumn(COL0_REF, Optional.of(COL0)))).build();
    when(analysis.getSelectColumnNames()).thenReturn(
        ImmutableSet.of(SystemColumns.WINDOWSTART_NAME, SystemColumns.WINDOWEND_NAME, COL0));

    // When:
    final QueryProjectNode projectNode = new QueryProjectNode(
        NODE_ID,
        source,
        selects,
        metaStore,
        ksqlConfig,
        analysis,
        true,
        plannerOptions,
        false
    );

    // Then:
    final LogicalSchema expected = LogicalSchema.builder()
        .keyColumn(SystemColumns.WINDOWSTART_NAME, SqlTypes.BIGINT)
        .keyColumn(SystemColumns.WINDOWEND_NAME, SqlTypes.BIGINT)
        .valueColumn(COL0, SqlTypes.STRING)
        .build();

    assertThat(expected, is(projectNode.getSchema()));
  }