presto-kudu/src/main/java/io/prestosql/plugin/kudu/TypeHelper.java/TypeHelper/getSlice
class TypeHelper:    public static Slice getSlice(Type type, RowResult row, int field)
    {
        if (type instanceof VarcharType) {
            return Slices.utf8Slice(row.getString(field));
        }
        if (type instanceof VarbinaryType) {
            return Slices.wrappedBuffer(row.getBinary(field));
        }
        if (type instanceof DecimalType) {
            BigDecimal dec = row.getDecimal(field);
            return Decimals.encodeScaledValue(dec);
        }
        throw new IllegalStateException("getSlice not implemented for " + type);
    }