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 5b08e6fb16
commit c79e4a2f90

View file

@ -85,10 +85,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