presto-kudu/src/main/java/io/prestosql/plugin/kudu/TypeHelper.java/TypeHelper/getJavaValue
class TypeHelper:    public static Object getJavaValue(Type type, Object nativeValue)
    {
        if (type instanceof VarcharType) {
            return ((Slice) nativeValue).toStringUtf8();
        }
        if (type == TimestampType.TIMESTAMP) {
            return ((Long) nativeValue) * 1000;
        }
        if (type == BigintType.BIGINT) {
            return nativeValue;
        }
        if (type == IntegerType.INTEGER) {
            return ((Long) nativeValue).intValue();
        }
        if (type == SmallintType.SMALLINT) {
            return ((Long) nativeValue).shortValue();
        }
        if (type == TinyintType.TINYINT) {
            return ((Long) nativeValue).byteValue();
        }
        if (type == DoubleType.DOUBLE) {
            return nativeValue;
        }
        if (type == RealType.REAL) {
            // conversion can result in precision lost
            return intBitsToFloat(((Long) nativeValue).intValue());
        }
        if (type == BooleanType.BOOLEAN) {
            return nativeValue;
        }
        if (type instanceof VarbinaryType) {
            return ((Slice) nativeValue).toByteBuffer();
        }
        if (type instanceof DecimalType) {
            return nativeValue;
        }
        throw new IllegalStateException("Back conversion not implemented for " + type);
    }