presto-accumulo/src/main/java/io/prestosql/plugin/accumulo/serializers/StringRowSerializer.java/StringRowSerializer/decode
class StringRowSerializer:    @SuppressWarnings("unchecked")
    @Override
    public <T> T decode(Type type, byte[] value)
    {
        String strValue = new String(value, UTF_8);
        if (type.equals(BIGINT)) {
            return (T) (Long) Long.parseLong(strValue);
        }
        if (type.equals(BOOLEAN)) {
            return (T) (Boolean) Boolean.parseBoolean(strValue);
        }
        if (type.equals(DATE)) {
            return (T) (Long) Long.parseLong(strValue);
        }
        if (type.equals(DOUBLE)) {
            return (T) (Double) Double.parseDouble(strValue);
        }
        if (type.equals(INTEGER)) {
            return (T) (Long) ((Integer) Integer.parseInt(strValue)).longValue();
        }
        if (type.equals(REAL)) {
            return (T) (Double) ((Float) Float.parseFloat(strValue)).doubleValue();
        }
        if (type.equals(SMALLINT)) {
            return (T) (Long) ((Short) Short.parseShort(strValue)).longValue();
        }
        if (type.equals(TIME)) {
            return (T) (Long) Long.parseLong(strValue);
        }
        if (type.equals(TIMESTAMP)) {
            return (T) (Long) Long.parseLong(strValue);
        }
        if (type.equals(TINYINT)) {
            return (T) (Long) ((Byte) Byte.parseByte(strValue)).longValue();
        }
        if (type.equals(VARBINARY)) {
            return (T) value;
        }
        if (type.equals(VARCHAR)) {
            return (T) strValue;
        }
        throw new PrestoException(NOT_SUPPORTED, "Unsupported type " + type);
    }