@Override
    public int hashcode(DataChangeEvent event) {
        GenericRow genericRow = PaimonWriterHelper.convertEventToGenericRow(event, fieldGetters);
        return channelComputer.channel(genericRow);
    }
@Test
    public void testHashCodeForFixedBucketTable() {
        TableId tableId = TableId.tableId(TEST_DATABASE, "test_table");
        Map<String, String> tableOptions = new HashMap<>();
        tableOptions.put("bucket", "10");
        MetadataApplier metadataApplier =
                new PaimonMetadataApplier(catalogOptions, tableOptions, new HashMap<>());
        Schema schema =
                Schema.newBuilder()
                        .physicalColumn("col1", DataTypes.STRING().notNull())
                        .physicalColumn("col2", DataTypes.STRING())
                        .physicalColumn("pt", DataTypes.STRING())
                        .primaryKey("col1", "pt")
                        .partitionKey("pt")
                        .build();
        CreateTableEvent createTableEvent = new CreateTableEvent(tableId, schema);
        metadataApplier.applySchemaChange(createTableEvent);
        BinaryRecordDataGenerator generator =
                new BinaryRecordDataGenerator(schema.getColumnDataTypes().toArray(new DataType[0]));
        PaimonHashFunction hashFunction =
                new PaimonHashFunction(catalogOptions, tableId, schema, ZoneId.systemDefault(), 4);
        DataChangeEvent dataChangeEvent1 =
                DataChangeEvent.insertEvent(
                        tableId,
                        generator.generate(
                                new Object[] {
                                    BinaryStringData.fromString("1"),
                                    BinaryStringData.fromString("1"),
                                    BinaryStringData.fromString("2024")
                                }));
        int key1 = hashFunction.hashcode(dataChangeEvent1);

        DataChangeEvent dataChangeEvent2 =
                DataChangeEvent.updateEvent(
                        tableId,
                        generator.generate(
                                new Object[] {
                                    BinaryStringData.fromString("1"),
                                    BinaryStringData.fromString("1"),
                                    BinaryStringData.fromString("2024")
                                }),
                        generator.generate(
                                new Object[] {
                                    BinaryStringData.fromString("1"),
                                    BinaryStringData.fromString("2"),
                                    BinaryStringData.fromString("2024")
                                }));
        int key2 = hashFunction.hashcode(dataChangeEvent2);

        DataChangeEvent dataChangeEvent3 =
                DataChangeEvent.deleteEvent(
                        tableId,
                        generator.generate(
                                new Object[] {
                                    BinaryStringData.fromString("1"),
                                    BinaryStringData.fromString("2"),
                                    BinaryStringData.fromString("2024")
                                }));
        int key3 = hashFunction.hashcode(dataChangeEvent3);

        assertThat(key1).isEqualTo(key2);
        assertThat(key1).isEqualTo(key3);
    }