private static Class<?> toJavaClass(LogicalType type) {
        switch (type.getTypeRoot()) {
            case NULL:
                return Object.class;
            case BOOLEAN:
                return Boolean.class;
            case BINARY:
            case VARBINARY:
                return byte[].class;
            case TINYINT:
                return Byte.class;
            case SMALLINT:
                return Short.class;
            case INTEGER:
            case INTERVAL_YEAR_MONTH:
                return Integer.class;
            case FLOAT:
                return Float.class;
            case DOUBLE:
                return Double.class;
            case BIGINT:
            case INTERVAL_DAY_TIME:
                return Long.class;
            case CHAR:
            case VARCHAR:
            case DATE:
            case TIME_WITHOUT_TIME_ZONE:
            case TIMESTAMP_WITHOUT_TIME_ZONE:
            case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
                return String.class;
            case DECIMAL:
                return BigDecimal.class;
            case ARRAY:
                ArrayType arrayType = (ArrayType) type;
                return Array.newInstance(toJavaClass(arrayType.getElementType()), 1).getClass();
            case MAP:
            case MULTISET:
            case ROW:
                return Map.class;
            case RAW:
            default:
                throw new UnsupportedOperationException("Not support to parse type: " + type);
        }
    }
Creates a runtime converter which assuming input object is not null.
inlong-sort/sort-formats/format-rowdata/format-rowdata-json/src/main/java/org/apache/inlong/sort/formats/json/RowDataToFieldConverters.java