public AggregateAnalysisResult analyze(
      final ImmutableAnalysis analysis,
      final List<SelectExpression> finalProjection
  ) {
    if (!analysis.getGroupBy().isPresent()) {
      throw new IllegalArgumentException("Not an aggregate query");
    }

    final AggAnalyzer aggAnalyzer = new AggAnalyzer(analysis, functionRegistry);
    aggAnalyzer.process(finalProjection);
    return aggAnalyzer.result();
  }
@Test
  public void shouldThrowOnQualifiedColumnReference() {
    // Given:
    givenSelectExpression(new QualifiedColumnReferenceExp(
        SourceName.of("Fred"),
        SystemColumns.WINDOWEND_NAME
    ));

    // When:
    assertThrows(UnsupportedOperationException.class,
        () -> analyzer.analyze(analysis, selects));
  }