public static void primaryKeyRange(PartialRow partialRow, Type type, String primaryKey, String value) {
        switch (type) {
            case STRING:
                partialRow.addString(primaryKey, value);
                break;
            case FLOAT:
                partialRow.addFloat(primaryKey, Float.valueOf(value));
                break;
            case INT8:
                partialRow.addByte(primaryKey, Byte.valueOf(value));
                break;
            case INT16:
                partialRow.addShort(primaryKey, Short.valueOf(value));
                break;
            case INT32:
                partialRow.addInt(primaryKey, Integer.valueOf(value));
                break;
            case INT64:
                partialRow.addLong(primaryKey, Long.valueOf(value));
                break;
            case DOUBLE:
                partialRow.addDouble(primaryKey, Double.valueOf(value));
                break;
            case BOOL:
                partialRow.addBoolean(primaryKey, Boolean.valueOf(value));
                break;
            case UNIXTIME_MICROS:
                partialRow.addTimestamp(primaryKey, Timestamp.valueOf(value));
                break;
            case BINARY:
                partialRow.addBinary(primaryKey, value.getBytes());
                break;
            default:
                throw new IllegalArgumentException("Illegal var type: " + type);
        }
    }
util for kudu use
Date: 2019/12/16
Company: www.dtstack.com
@author maqi
kudu/kudu-side/kudu-side-core/src/main/java/com/dtstack/flink/sql/side/kudu/utils/KuduUtil.java