Skip to content

Commit

Permalink
Add some more explicit returns as things were modified
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksontj committed Sep 14, 2024
1 parent d235e07 commit 670defb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/proxystorage/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ func (p *ProxyStorage) NodeReplacer(ctx context.Context, s *parser.EvalStmt, nod
// we can set it as the args (the vector of data) and the promql engine handles the types properly
case "scalar":
n.Args[0] = ret
return nil, nil
return n, nil
// the functions of sort() and sort_desc() need whole results to calculate.
case "sort", "sort_desc":
return &parser.Call{
Expand Down Expand Up @@ -707,6 +707,7 @@ func (p *ProxyStorage) NodeReplacer(ctx context.Context, s *parser.EvalStmt, nod
}
n.OriginalOffset = offset
n.UnexpandedSeriesSet = proxyquerier.NewSeriesSet(series, promhttputil.WarningsConvert(warnings), err)
return n, nil

// If we hit this someone is asking for a matrix directly, if so then we don't
// have anyway to ask for less-- since this is exactly what they are asking for
Expand Down

0 comments on commit 670defb

Please sign in to comment.