121121 * Ensure the capabilities for this type are always enabled.</li>
122122 * <li>
123123 * Mark the type with a new transport version via
124- * {@link Builder#supportedOn (TransportVersion)}. This will enable the type on
124+ * {@link Builder#supportedSince (TransportVersion)}. This will enable the type on
125125 * non-SNAPSHOT builds as long as all nodes in the cluster (and remote clusters)
126126 * support it.</li>
127127 * <li>
@@ -296,9 +296,13 @@ public enum DataType implements Writeable {
296296 // NOTE: If INDEX_SOURCE somehow gets backported to a version that doesn't actually support these types, we'll be missing validation for
297297 // mixed/multi clusters with remotes that don't support these types. This is low-ish risk because these types require specific
298298 // geo functions to turn up in the query, and those types aren't available before 9.2.0 either.
299- GEOHASH (builder ().esType ("geohash" ).typeName ("GEOHASH" ).estimatedSize (Long .BYTES ).supportedOn (DataTypesTransportVersions .INDEX_SOURCE )),
300- GEOTILE (builder ().esType ("geotile" ).typeName ("GEOTILE" ).estimatedSize (Long .BYTES ).supportedOn (DataTypesTransportVersions .INDEX_SOURCE )),
301- GEOHEX (builder ().esType ("geohex" ).typeName ("GEOHEX" ).estimatedSize (Long .BYTES ).supportedOn (DataTypesTransportVersions .INDEX_SOURCE )),
299+ GEOHASH (
300+ builder ().esType ("geohash" ).typeName ("GEOHASH" ).estimatedSize (Long .BYTES ).supportedSince (DataTypesTransportVersions .INDEX_SOURCE )
301+ ),
302+ GEOTILE (
303+ builder ().esType ("geotile" ).typeName ("GEOTILE" ).estimatedSize (Long .BYTES ).supportedSince (DataTypesTransportVersions .INDEX_SOURCE )
304+ ),
305+ GEOHEX (builder ().esType ("geohex" ).typeName ("GEOHEX" ).estimatedSize (Long .BYTES ).supportedSince (DataTypesTransportVersions .INDEX_SOURCE )),
302306
303307 /**
304308 * Fields with this type represent a Lucene doc id. This field is a bit magic in that:
@@ -322,7 +326,7 @@ public enum DataType implements Writeable {
322326 // mixed/multi clusters with remotes that don't support these types. This is low-ish risk because _tsid requires specifically being
323327 // used in `FROM idx METADATA _tsid` or in the `TS` command, which both weren't available before 9.2.0.
324328 TSID_DATA_TYPE (
325- builder ().esType ("_tsid" ).estimatedSize (Long .BYTES * 2 ).docValues ().supportedOn (DataTypesTransportVersions .INDEX_SOURCE )
329+ builder ().esType ("_tsid" ).estimatedSize (Long .BYTES * 2 ).docValues ().supportedSince (DataTypesTransportVersions .INDEX_SOURCE )
326330 ),
327331 /**
328332 * Fields with this type are the partial result of running a non-time-series aggregation
@@ -333,13 +337,13 @@ public enum DataType implements Writeable {
333337 AGGREGATE_METRIC_DOUBLE (
334338 builder ().esType ("aggregate_metric_double" )
335339 .estimatedSize (Double .BYTES * 3 + Integer .BYTES )
336- .supportedOn (DataTypesTransportVersions .ESQL_AGGREGATE_METRIC_DOUBLE_CREATED_VERSION )
340+ .supportedSince (DataTypesTransportVersions .ESQL_AGGREGATE_METRIC_DOUBLE_CREATED_VERSION )
337341 ),
338342 /**
339343 * Fields with this type are dense vectors, represented as an array of float values.
340344 */
341345 DENSE_VECTOR (
342- builder ().esType ("dense_vector" ).estimatedSize (4096 ).supportedOn (DataTypesTransportVersions .ESQL_DENSE_VECTOR_CREATED_VERSION )
346+ builder ().esType ("dense_vector" ).estimatedSize (4096 ).supportedSince (DataTypesTransportVersions .ESQL_DENSE_VECTOR_CREATED_VERSION )
343347 );
344348
345349 public static final Set <DataType > UNDER_CONSTRUCTION = Arrays .stream (DataType .values ())
@@ -744,7 +748,7 @@ public DataType counter() {
744748
745749 @ Override
746750 public void writeTo (StreamOutput out ) throws IOException {
747- if (supportedVersion .supports (out .getTransportVersion ()) == false ) {
751+ if (supportedVersion .supportedOn (out .getTransportVersion ()) == false ) {
748752 /*
749753 * TODO when we implement version aware planning flip this to an IllegalStateException
750754 * so we throw a 500 error. It'll be our bug then. Right now it's a sign that the user
@@ -955,8 +959,8 @@ Builder counter(DataType counter) {
955959 * <p>
956960 * Generally, we should add a dedicated transport version when a type is enabled on release builds.
957961 */
958- Builder supportedOn (TransportVersion supportedVersion ) {
959- this .supportedVersion = SupportedVersion .supportedOn (supportedVersion );
962+ Builder supportedSince (TransportVersion supportedVersion ) {
963+ this .supportedVersion = SupportedVersion .supportedSince (supportedVersion );
960964 return this ;
961965 }
962966
0 commit comments