The query engine previously routed every incoming query to a sketch aggregation by matching the
query string against a pre-configured query_configs table in InferenceConfig. This meant:
- Every distinct query string needed its own config entry, even when the same sketch could answer
multiple queries (e.g. quantile(0.5, metric[5m]) and quantile(0.9, metric[5m]) both need a
KLL sketch, but each required a separate config row).
- The system could not answer any query it had not been explicitly pre-configured for.
The goal: let the engine understand what a query needs and find an existing aggregation that can
provide it, without requiring a one-to-one mapping in config.