class WindowSpecification {

  public String toSqlString() {
    StringBuilder sb = new StringBuilder();
    if (!partitionColumns.isEmpty()) {
      sb.append("PARTITION BY ");
      sb.append(String.join(", ", partitionColumns));
      sb.append(System.lineSeparator());
    }
    if (!sort.isEmpty()) {
      sb.append("ORDER BY ");
      sb.append(
          Streams.stream(sort.iterator())
              .map(this::formatOrdering)
              .collect(Collectors.joining(", ")));
    }
    return sb.toString();
  }

  private  WindowSpecification(String windowName, Set<String> partitionColumns, Sort sort);

}