presto-elasticsearch/src/main/java/io/prestosql/elasticsearch/decoders/IntegerDecoder.java/IntegerDecoder/decode
class IntegerDecoder:    @Override
    public void decode(SearchHit hit, Supplier<Object> getter, BlockBuilder output)
    {
        Object value = getter.get();
        if (value == null) {
            output.appendNull();
        }
        else if (value instanceof Number) {
            INTEGER.writeLong(output, toIntExact(((Number) value).longValue()));
        }
        else {
            throw new PrestoException(TYPE_MISMATCH, "Expected a numeric value for INTEGER field");
        }
    }