public LogicalSchema getIntermediateSchema() {
    return intermediateSchema;
  }
@Test
  public void shouldBuildPullQueryIntermediateSchemaSelectKeyNonWindowed() {
    // Given:
    selects = ImmutableList.of(new SingleColumn(K_REF, Optional.of(ALIAS)));
    when(keyFormat.isWindowed()).thenReturn(false);
    when(analysis.getSelectColumnNames()).thenReturn(ImmutableSet.of(ColumnName.of("K")));

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

    // Then:
    final LogicalSchema expectedSchema = QueryLogicalPlanUtil.buildIntermediateSchema(
        INPUT_SCHEMA, true, false);
    assertThat(expectedSchema, is(projectNode.getIntermediateSchema()));
  }