### Description

Something like `select * from apps where version > '1.2.3'::version` fails with:
```
Caused by: java.lang.IllegalArgumentException: Illegal value type: class org.elasticsearch.xpack.versionfield.Version, value: 1.2.3
	at org.elasticsearch.xpack.versionfield.VersionStringFieldMapper$VersionStringFieldType.indexedValueForSearch(VersionStringFieldMapper.java:287)
	at org.elasticsearch.xpack.versionfield.VersionStringFieldMapper$VersionStringFieldType.rangeQuery(VersionStringFieldMapper.java:320)
	at org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.index.mapper.SimpleMappedFieldType.rangeQuery(SimpleMappedFieldType.java:52)
	at org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.index.query.RangeQueryBuilder.doToQuery(RangeQueryBuilder.java:539)
	at org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:115)
	at org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.index.query.SearchExecutionContext.lambda$toQuery$4(SearchExecutionContext.java:486)
	at org.elasticsearch.server@8.9.0-SNAPSHOT/org.elasticsearch.index.query.SearchExecutionContext.toQuery(SearchExecutionContext.java:498)
	... 15 more


```
x-pack/plugin/ql/src/main/java/org/elasticsearch/xpack/ql/planner/ExpressionTranslators.java
static Query translate(BinaryComparison bc, TranslatorHandler handler) {
            FieldAttribute field = checkIsFieldAttribute(bc.left());
            Source source = bc.source();
            String name = handler.nameOf(field);
            Object value = valueOf(bc.right());
            String format = null;
            boolean isDateLiteralComparison = false;
            
            
            if (value instanceof ZonedDateTime || value instanceof OffsetTime) {
                DateFormatter formatter;
                if (value instanceof ZonedDateTime) {
                    formatter = DateFormatter.forPattern(DATE_FORMAT);
                    
                    
                    
                    value = formatter.format((ZonedDateTime) value);
                } else {
                    formatter = DateFormatter.forPattern(TIME_FORMAT);
                    value = formatter.format((OffsetTime) value);
                }
                format = formatter.pattern();
                isDateLiteralComparison = true;
            }
            ZoneId zoneId = null;
            if (DataTypes.isDateTime(field.dataType())) {
                zoneId = bc.zoneId();
            }
            if (bc instanceof GreaterThan) {
                return new RangeQuery(source, name, value, false, null, false, format, zoneId);