private static void writeSlice()

in paimon-presto-common/src/main/java/org/apache/paimon/presto/PrestoTypeUtils.java [289:299]


    private static void writeSlice(BlockBuilder output, Type type, Object value) {
        if (type instanceof VarcharType
                || type instanceof com.facebook.presto.common.type.CharType) {
            type.writeSlice(output, wrappedBuffer(((BinaryString) value).toBytes()));
        } else if (type instanceof VarbinaryType) {
            type.writeSlice(output, wrappedBuffer((byte[]) value));
        } else {
            throw new PrestoException(
                    GENERIC_INTERNAL_ERROR, "Unhandled type for Slice: " + type.getTypeSignature());
        }
    }