elapsedTime = Duration.nanosSince(createNanos);
}
// don't report failure info is query is marked as success
FailureInfo failureInfo = null;
ErrorCode errorCode = null;
if (state != FINISHED) {
failureInfo = failureCause == null ? null : toFailure(failureCause).toFailureInfo();
errorCode = ErrorCodes.toErrorCode(failureCause);
}