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