public static String createDeleteStatement(
      String fqtn, String columnName, String columnPattern, String granularity, int count) {
    if (!StringUtils.isBlank(columnPattern)) {
      String query =
          String.format(
              "DELETE FROM %s WHERE %s",
              getQuotedFqtn(fqtn),
              String.format(
                  RETENTION_CONDITION_WITH_PATTERN_TEMPLATE,
                  columnName,
                  count,
                  granularity,
                  columnPattern));
      log.info(
          "Table: {}. Column pattern: {}, columnName {}, granularity {}s, " + "retention query: {}",
          fqtn,
          columnPattern,
          columnName,
          granularity,
          query);
      return query;
    } else {
      String query =
          String.format(
              "DELETE FROM %s WHERE %s",
              getQuotedFqtn(fqtn),
              String.format(
                  RETENTION_CONDITION_TEMPLATE, columnName, granularity, count, granularity));
      log.info("Table: {}. No column pattern provided: deleteQuery: {}", fqtn, query);
      return query;
    }
  }
@Test
  void testCreateDeleteStatement() {
    String expected =
        String.format(
            "DELETE FROM `db`.`table-name` WHERE timestamp < date_trunc('day', current_timestamp() - INTERVAL 2 days)");
    Assertions.assertEquals(
        expected, SparkJobUtil.createDeleteStatement("db.table-name", "timestamp", "", "day", 2));
  }