presto-main/src/main/java/io/prestosql/operator/StatisticsWriterOperator.java/StatisticsWriterOperator/finish
class StatisticsWriterOperator:    @Override
    public void finish()
    {
        if (state == State.RUNNING) {
            state = State.FINISHING;
        }
    }