presto-elasticsearch/src/main/java/io/prestosql/elasticsearch/decoders/RowDecoder.java/RowDecoder/decode
class RowDecoder:    @Override
    public void decode(SearchHit hit, Supplier<Object> getter, BlockBuilder output)
    {
        Object data = getter.get();

        if (data == null) {
            output.appendNull();
        }
        else if (data instanceof Map) {
            BlockBuilder row = output.beginBlockEntry();
            for (int i = 0; i < decoders.size(); i++) {
                String field = fieldNames.get(i);
                decoders.get(i).decode(hit, () -> getField((Map<String, Object>) data, field), row);
            }
            output.closeEntry();
        }
        else {
            throw new PrestoException(TYPE_MISMATCH, "Expected object for ROW field");
        }
    }