public static void applyDataChangeEvent(DataChangeEvent event) {
        ValuesTable table = globalTables.get(event.tableId());
        Preconditions.checkNotNull(table, event.tableId() + " is not existed");
        table.applyDataChangeEvent(event);
        LOG.info("apply DataChangeEvent: " + event);
    }
@Test
    public void testApplyDataChangeEvent() {
        List<String> results = new ArrayList<>();
        results.add("default.default.table1:col1=1;col2=1");
        results.add("default.default.table1:col1=2;col2=2");
        results.add("default.default.table1:col1=3;col2=3");
        Assert.assertEquals(results, ValuesDatabase.getResults(table1));

        BinaryRecordDataGenerator generator =
                new BinaryRecordDataGenerator(RowType.of(DataTypes.STRING(), DataTypes.STRING()));
        DataChangeEvent deleteEvent =
                DataChangeEvent.deleteEvent(
                        table1,
                        generator.generate(
                                new Object[] {
                                    BinaryStringData.fromString("1"),
                                    BinaryStringData.fromString("1")
                                }));
        ValuesDatabase.applyDataChangeEvent(deleteEvent);
        results.clear();
        results.add("default.default.table1:col1=2;col2=2");
        results.add("default.default.table1:col1=3;col2=3");
        Assert.assertEquals(results, ValuesDatabase.getResults(table1));

        DataChangeEvent updateEvent =
                DataChangeEvent.updateEvent(
                        table1,
                        generator.generate(
                                new Object[] {
                                    BinaryStringData.fromString("2"),
                                    BinaryStringData.fromString("2")
                                }),
                        generator.generate(
                                new Object[] {
                                    BinaryStringData.fromString("2"),
                                    BinaryStringData.fromString("x")
                                }));
        ValuesDatabase.applyDataChangeEvent(updateEvent);
        results.clear();
        results.add("default.default.table1:col1=2;col2=x");
        results.add("default.default.table1:col1=3;col2=3");
        Assert.assertEquals(results, ValuesDatabase.getResults(table1));
    }