class DefaultReduceIdentityTerminator<ENTITY> implements ReduceIdentityTerminator<ENTITY> {

    private DefaultReduceIdentityTerminator() {
    }

    @Override
    public <T> T apply(
        final SqlStreamOptimizerInfo<ENTITY> info,        
        final SqlStreamTerminator<ENTITY> sqlStreamTerminator,
        final ReferencePipeline<T> pipeline,
        final T identity,
        final BinaryOperator<T> accumulator
    ) {<FILL_FUNCTION_BODY>}

    public static final ReduceIdentityTerminator<?> DEFAULT = new DefaultReduceIdentityTerminator<>();

}

        requireNonNull(info);
        requireNonNull(sqlStreamTerminator);
        requireNonNull(pipeline);
        // identity nullable
        requireNonNull(accumulator);

        final ReferencePipeline<T> optimizedPipeline = sqlStreamTerminator.optimize(pipeline);
        return sqlStreamTerminator
            .attachTraceData(optimizedPipeline)
            .getAsReferenceStream().reduce(identity, accumulator);
    
<no_super_class>