private int getPartition(RowData data, int[] partitions) {
        if (partitionNumber >= 0) {
            return partitionNumber;
        }
        List<Integer> pos = getFieldPos();
        // parse out the List<String> from partitionkey and then get list of positions in schema.
        long hashCode = 0;
        for (int i : pos) {
            Object fieldValue = valueFieldGetters[i].getFieldOrNull(data);
            if (fieldValue != null) {
                hashCode += fieldValue.hashCode();
            }
        }
        return partitions[((int) ((hashCode & Integer.MAX_VALUE) % partitions.length))];
    }
input: rowdata,  partitions
output: the hashed partition number
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/kafka/src/main/java/org/apache/inlong/sort/kafka/partitioner/SingleTableCustomFieldsPartitioner.java