private Dataset.VersionSchema executeGetVersionSchema(PreparedStatement statement, int accountId, int containerId,
      String datasetName) throws SQLException, AccountServiceException {
    ResultSet resultSet = null;
    Dataset.VersionSchema versionSchema;
    try {
      statement.setInt(1, accountId);
      statement.setInt(2, containerId);
      statement.setString(3, datasetName);
      resultSet = statement.executeQuery();
      if (!resultSet.next()) {
        throw new AccountServiceException(
            "Version Schema not found for account: " + accountId + " container: " + containerId + " dataset: "
                + datasetName, AccountServiceErrorCode.NotFound);
      }
      versionSchema = Dataset.VersionSchema.values()[resultSet.getInt(VERSION_SCHEMA)];
    } finally {
      //If result set is not created in a try-with-resources block, it needs to be closed in a finally block.
      closeQuietly(resultSet);
    }
    return versionSchema;
  }
Get version schema corresponding to the dataset.
@param statement the mysql statement to get the version schema of the dataset.
@param accountId the id of the parent account.
@param containerId the if of the container.
@param datasetName the name of the dataset.
@return the name of the dataset.
@throws SQLException
ambry-account/src/main/java/com/github/ambry/account/mysql/DatasetDao.java