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 shouldNotThrowOnOtherExpressionTypesInProjection() {
    // Given:
    final Expression someExpression = mock(Expression.class);
    givenSelectExpression(someExpression);

    // When:
    analyzer.analyze(analysis, selects);

    // Then: did not throw.
  }