presto-main/src/main/java/io/prestosql/dispatcher/QueuedStatementResource.java/QueuedStatementResource/createQueryResults
class QueuedStatementResource:        private QueryResults createQueryResults(long token, UriInfo uriInfo, String xForwardedProto, DispatchInfo dispatchInfo)
        {
            URI nextUri = getNextUri(token, uriInfo, xForwardedProto, dispatchInfo);

            Optional<QueryError> queryError = dispatchInfo.getFailureInfo()
                    .map(this::toQueryError);

            return QueuedStatementResource.createQueryResults(
                    queryId,
                    nextUri,
                    queryError,
                    uriInfo,
                    xForwardedProto,
                    dispatchInfo.getElapsedTime(),
                    dispatchInfo.getQueuedTime());
        }