presto-main/src/main/java/io/prestosql/operator/TableFinishOperator.java/TableFinishOperator/needsInput
class TableFinishOperator:    @Override
    public boolean needsInput()
    {
        if (state != State.RUNNING) {
            return false;
        }
        return statisticsAggregationOperator.needsInput();
    }