All downsampled indices will contain fields of type aggregate_metric_double, which is the result of downsampling numeric fields with time_series_metric attribute set to gauge. Supporting aggregate_metric_double is required to supported tsdb in es|ql.
ES|QL has a much more advanced type system than aggregations. Aggregations almost always return numeric responses as double, whereas es|ql returns numeric fields in the type that they are mapped.
The first step to this is implementing the 4 basic aggregation functions (min, max, sum, and count) to work for aggregate_metric_double, and return a double or long where is appropriate