public static Optional<List<ResolvedExpression>> getResolvedFilterExpressions(
            LogicalTableModify tableModify) {
        FlinkContext context = ShortcutUtils.unwrapContext(tableModify.getCluster());
        RelNode input = tableModify.getInput().getInput(0);
        // no WHERE clause, return an empty list
        if (input instanceof LogicalTableScan) {
            return Optional.of(Collections.emptyList());
        }
        if (!(input instanceof LogicalFilter)) {
            return Optional.empty();
        }

        Filter filter = (Filter) input;
        if (RexUtil.SubQueryFinder.containsSubQuery(filter)) {
            return Optional.empty();
        }

        // optimize the filter
        filter = prepareFilter(filter);

        // resolve the filter to get resolved expression
        List<ResolvedExpression> resolveExpression = resolveFilter(context, filter);
        return Optional.ofNullable(resolveExpression);
    }
@Test
    public void testGetResolveFilterExpressions() {
        CatalogTable catalogTable =
                CatalogTable.of(
                        Schema.newBuilder()
                                .column("f0", DataTypes.INT().notNull())
                                .column("f1", DataTypes.STRING().nullable())
                                .column("f2", DataTypes.BIGINT().nullable())
                                .column("f3", DataTypes.TIMESTAMP_WITH_LOCAL_TIME_ZONE().nullable())
                                .build(),
                        null,
                        Collections.emptyList(),
                        Collections.emptyMap());
        catalogManager.createTable(
                catalogTable, ObjectIdentifier.of("builtin", "default", "t"), false);

        // verify there's no where clause
        LogicalTableModify tableModify = getTableModifyFromSql("DELETE FROM t");
        Optional<List<ResolvedExpression>> optionalResolvedExpressions =
                DeletePushDownUtils.getResolvedFilterExpressions(tableModify);
        verifyExpression(optionalResolvedExpressions, "[]");

        tableModify = getTableModifyFromSql("DELETE FROM t where f0 = 1 and f1 = '123'");
        optionalResolvedExpressions = DeletePushDownUtils.getResolvedFilterExpressions(tableModify);
        verifyExpression(optionalResolvedExpressions, "[equals(f0, 1), equals(f1, '123')]");

        tableModify = getTableModifyFromSql("DELETE FROM t where f0 = 1 + 6 and f0 < 6");
        optionalResolvedExpressions = DeletePushDownUtils.getResolvedFilterExpressions(tableModify);
        assertThat(optionalResolvedExpressions).isPresent();
        verifyExpression(optionalResolvedExpressions, "[false]");

        tableModify = getTableModifyFromSql("DELETE FROM t where f0 = f2 + 1");
        optionalResolvedExpressions = DeletePushDownUtils.getResolvedFilterExpressions(tableModify);
        verifyExpression(
                optionalResolvedExpressions, "[equals(cast(f0, BIGINT NOT NULL), plus(f2, 1))]");

        // resolve filters is not available as it contains sub-query
        tableModify = getTableModifyFromSql("DELETE FROM t where f0 > (select count(1) from t)");
        optionalResolvedExpressions = DeletePushDownUtils.getResolvedFilterExpressions(tableModify);
        assertThat(optionalResolvedExpressions).isEmpty();

        String dateTime = "2024-05-13 08:00:00";
        tableModify =
                getTableModifyFromSql(String.format("DELETE FROM t where f3 > '%s'", dateTime));
        LocalDateTime ldt = TimestampStringUtils.toLocalDateTime(new TimestampString(dateTime));
        Instant instant = ldt.toInstant(ZoneId.systemDefault().getRules().getOffset(ldt));
        optionalResolvedExpressions = DeletePushDownUtils.getResolvedFilterExpressions(tableModify);
        assertThat(optionalResolvedExpressions).isPresent();
        verifyExpression(
                optionalResolvedExpressions,
                String.format("[greaterThan(f3, %s)]", instant.toString()));
    }