Skip to content

Commit f579939

Browse files
committed
[ES|QL] Add supportsVersion to AggMetricDoubleLiteral
This commit adds an implementation for supportsVersion() to the AggregateMetricDoubleLiteral type in order to support backporting for serialization of this type.
1 parent 1d1feb6 commit f579939

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/AggregateMetricDoubleBlockBuilder.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,13 @@ public void writeTo(StreamOutput out) throws IOException {
201201

202202
@Override
203203
public TransportVersion getMinimalSupportedVersion() {
204-
return TransportVersions.ESQL_AGGREGATE_METRIC_DOUBLE_LITERAL;
204+
assert false : "must not be called when overriding supportsVersion";
205+
throw new UnsupportedOperationException("must not be called when overriding supportsVersion");
205206
}
206207

208+
@Override
209+
public boolean supportsVersion(TransportVersion version) {
210+
return version.onOrAfter(TransportVersions.ESQL_AGGREGATE_METRIC_DOUBLE_LITERAL);
211+
}
207212
}
208213
}

0 commit comments

Comments
 (0)