app/vmselect/promql: remove the limit on the number of time series that can be sorted, since it may confuse users

Always sort time series returned from `/api/v1/query` and `/api/v1/query_range` unless `sort_*` function is used at top level of the query.
This commit is contained in:
Aliaksandr Valialkin 2021-04-02 15:02:00 +03:00
parent 245eba8896
commit 31d3d02d25

View file

@ -86,10 +86,6 @@ func Exec(ec *EvalConfig, q string, isFirstPointOnly bool) ([]netstorage.Result,
}
func maySortResults(e metricsql.Expr, tss []*timeseries) bool {
if len(tss) > 100 {
// There is no sense in sorting a lot of results
return false
}
fe, ok := e.(*metricsql.FuncExpr)
if !ok {
return true