presto-main/src/main/java/io/prestosql/execution/QueryStateMachine.java/QueryStateMachine/isDone
class QueryStateMachine:    public boolean isDone()
    {
        return queryState.get().isDone();
    }