public UdafImpl getUdafImpl() {
    return new LazyUdafImpl<>(this);
  }
@Test
  public void nonparameterizedGetUdafImpl_throwsIllegalStateException() {
    LazyAggregateCombineFn<?, ?, ?> combiner =
        new LazyAggregateCombineFn<>(new NonParameterizedAggregateFn());
    AggregateFunction aggregateFunction = combiner.getUdafImpl();
    RelDataTypeFactory typeFactory = new JavaTypeFactoryImpl(RelDataTypeSystem.DEFAULT);

    exceptions.expect(IllegalStateException.class);

    List<FunctionParameter> params = aggregateFunction.getParameters();
    params.get(0).getType(typeFactory);
  }