|  | @@ -27,6 +27,7 @@ import org.elasticsearch.test.cluster.LogType;
 | 
	
		
			
				|  |  |  import org.elasticsearch.xcontent.XContentBuilder;
 | 
	
		
			
				|  |  |  import org.elasticsearch.xcontent.XContentType;
 | 
	
		
			
				|  |  |  import org.elasticsearch.xcontent.json.JsonXContent;
 | 
	
		
			
				|  |  | +import org.elasticsearch.xpack.esql.core.plugin.EsqlCorePlugin;
 | 
	
		
			
				|  |  |  import org.elasticsearch.xpack.esql.core.type.DataType;
 | 
	
		
			
				|  |  |  import org.elasticsearch.xpack.esql.qa.rest.RestEsqlTestCase;
 | 
	
		
			
				|  |  |  import org.elasticsearch.xpack.esql.tools.ProfileParser;
 | 
	
	
		
			
				|  | @@ -42,6 +43,7 @@ import java.nio.charset.StandardCharsets;
 | 
	
		
			
				|  |  |  import java.util.ArrayList;
 | 
	
		
			
				|  |  |  import java.util.Arrays;
 | 
	
		
			
				|  |  |  import java.util.Comparator;
 | 
	
		
			
				|  |  | +import java.util.HashMap;
 | 
	
		
			
				|  |  |  import java.util.HashSet;
 | 
	
		
			
				|  |  |  import java.util.List;
 | 
	
		
			
				|  |  |  import java.util.Locale;
 | 
	
	
		
			
				|  | @@ -672,19 +674,25 @@ public class RestEsqlIT extends RestEsqlTestCase {
 | 
	
		
			
				|  |  |                    "type": "Point",
 | 
	
		
			
				|  |  |                    "coordinates": [-77.03653, 38.897676]
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                """),
 | 
	
		
			
				|  |  | -            Map.entry(DataType.AGGREGATE_METRIC_DOUBLE, """
 | 
	
		
			
				|  |  | +                """)
 | 
	
		
			
				|  |  | +        );
 | 
	
		
			
				|  |  | +        if (EsqlCorePlugin.AGGREGATE_METRIC_DOUBLE_FEATURE_FLAG.isEnabled()) {
 | 
	
		
			
				|  |  | +            typesAndValues = new HashMap<>(typesAndValues);
 | 
	
		
			
				|  |  | +            typesAndValues.put(DataType.AGGREGATE_METRIC_DOUBLE, """
 | 
	
		
			
				|  |  |                  {
 | 
	
		
			
				|  |  |                    "max": 14983.1
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                """)
 | 
	
		
			
				|  |  | -        );
 | 
	
		
			
				|  |  | +                """);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          Set<DataType> shouldBeSupported = Stream.of(DataType.values()).filter(DataType::isRepresentable).collect(Collectors.toSet());
 | 
	
		
			
				|  |  |          shouldBeSupported.remove(DataType.CARTESIAN_POINT);
 | 
	
		
			
				|  |  |          shouldBeSupported.remove(DataType.CARTESIAN_SHAPE);
 | 
	
		
			
				|  |  |          shouldBeSupported.remove(DataType.NULL);
 | 
	
		
			
				|  |  |          shouldBeSupported.remove(DataType.DOC_DATA_TYPE);
 | 
	
		
			
				|  |  |          shouldBeSupported.remove(DataType.TSID_DATA_TYPE);
 | 
	
		
			
				|  |  | +        if (EsqlCorePlugin.AGGREGATE_METRIC_DOUBLE_FEATURE_FLAG.isEnabled() == false) {
 | 
	
		
			
				|  |  | +            shouldBeSupported.remove(DataType.AGGREGATE_METRIC_DOUBLE);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          for (DataType type : shouldBeSupported) {
 | 
	
		
			
				|  |  |              assertTrue(typesAndValues.containsKey(type));
 | 
	
		
			
				|  |  |          }
 |