private DatasetVersionRecord updateDatasetVersionHelper(int accountId, int containerId, Dataset dataset,
      String version, long timeToLiveInSeconds, long creationTimeInMs, boolean datasetVersionTtlEnabled,
      long versionNumber, DatasetVersionState datasetVersionState) throws SQLException, AccountServiceException {
    PreparedStatement updateDatasetVersionSqlIfExpiredStatement =
        dataAccessor.getPreparedStatement(updateDatasetVersionIfExpiredSql, true);
    long newExpirationTimeMs =
        executeUpdateDatasetVersionIfExpiredSqlStatement(updateDatasetVersionSqlIfExpiredStatement, accountId,
            containerId, dataset.getDatasetName(), versionNumber, timeToLiveInSeconds, creationTimeInMs, dataset,
            datasetVersionTtlEnabled, datasetVersionState);
    return new DatasetVersionRecord(accountId, containerId, dataset.getDatasetName(), version, newExpirationTimeMs,
        null);
  }
Helper function to support update dataset version.
@param accountId the id for the parent account.
@param containerId the id of the container.
@param dataset the {@link Dataset}
@param version the version of the dataset.
@param timeToLiveInSeconds The dataset version level ttl.
@param creationTimeInMs the creation time of the dataset.
@param datasetVersionTtlEnabled set to true if dataset version ttl want to override the dataset level default ttl.
@param versionNumber the version number converted by version string.
@param datasetVersionState the {@link DatasetVersionState}
@return
@throws SQLException
@throws AccountServiceException
ambry-account/src/main/java/com/github/ambry/account/mysql/DatasetDao.java