presto-elasticsearch/src/main/java/io/prestosql/elasticsearch/ElasticsearchQueryBuilder.java/ElasticsearchQueryBuilder/getValue
class ElasticsearchQueryBuilder:    private static Object getValue(Type type, Object value)
    {
        if (type.equals(BIGINT) || type.equals(INTEGER) || type.equals(DOUBLE) || type.equals(BOOLEAN)) {
            return value;
        }
        if (type.equals(VARCHAR)) {
            return ((Slice) value).toStringUtf8();
        }
        throw new IllegalArgumentException("Unhandled type: " + type);
    }