presto-main/src/main/java/io/prestosql/dispatcher/QueuedStatementResource.java/QueuedStatementResource/isSubmissionFinished
class QueuedStatementResource:        public synchronized boolean isSubmissionFinished()
        {
            return querySubmissionFuture != null && querySubmissionFuture.isDone();
        }