presto-main/src/main/java/io/prestosql/execution/QueryStateMachine.java/QueryStateMachine/updateQueryInfo
class QueryStateMachine:    public QueryInfo updateQueryInfo(Optional<StageInfo> stageInfo)
    {
        QueryInfo queryInfo = getQueryInfo(stageInfo);
        if (queryInfo.isFinalQueryInfo()) {
            finalQueryInfo.compareAndSet(Optional.empty(), Optional.of(queryInfo));
        }
        return queryInfo;
    }