presto-elasticsearch/src/main/java/io/prestosql/elasticsearch/decoders/VarbinaryDecoder.java/VarbinaryDecoder/decode
class VarbinaryDecoder:    @Override
    public void decode(SearchHit hit, Supplier<Object> getter, BlockBuilder output)
    {
        Object value = getter.get();
        if (value == null) {
            output.appendNull();
        }
        else if (value instanceof String) {
            VARBINARY.writeSlice(output, Slices.wrappedBuffer(Base64.getDecoder().decode(value.toString())));
        }
        else {
            throw new PrestoException(TYPE_MISMATCH, "Expected a string value for VARCHAR field");
        }
    }