public static LogicalSchema buildSchema(
      final LogicalSchema sourceSchema,
      final List<Expression> partitionBys,
      final FunctionRegistry functionRegistry
  ) {
    final List<PartitionByColumn> partitionByCols =
        getPartitionByColumnName(sourceSchema, partitionBys);

    return buildSchema(sourceSchema, partitionBys, functionRegistry, partitionByCols);
  }
@Test
  public void shouldThrowIfPartitioningByMultipleExpressionsIncludingNull() {
    // Given:
    final List<Expression> partitionBy = ImmutableList.of(
        new UnqualifiedColumnReferenceExp(COL1),
        new NullLiteral()
    );

    // Expect / When:
    final Exception e = assertThrows(
        KsqlException.class,
        () -> PartitionByParamsFactory.buildSchema(
            SCHEMA,
            partitionBy,
            functionRegistry
        ));

    // Then:
    assertThat(e.getMessage(), containsString("Cannot PARTITION BY multiple columns including NULL"));
  }