class DefaultMinTerminator<ENTITY> implements MinTerminator<ENTITY> {

    private DefaultMinTerminator() {
    }

    @Override
    public <T> Optional<T> apply(
        final SqlStreamOptimizerInfo<ENTITY> info,
        final SqlStreamTerminator<ENTITY> sqlStreamTerminator,
        final ReferencePipeline<T> pipeline,
        final Comparator<? super T> comparator
    ) {<FILL_FUNCTION_BODY>}

    public static final MinTerminator<?> DEFAULT = new DefaultMinTerminator<>();

}

        requireNonNull(info);
        requireNonNull(sqlStreamTerminator);
        requireNonNull(pipeline);
        requireNonNull(comparator);

        final ReferencePipeline<T> optimizedPipeline = sqlStreamTerminator.optimize(pipeline);
        return sqlStreamTerminator
            .attachTraceData(optimizedPipeline)
            .getAsReferenceStream().min(comparator);
    
<no_super_class>