Refuse duplicate aggregate columns and page aggregates after the fold
A repeated extract function names one response column twice, which openvoxdb aliases as <name>_2: unknown to the merge spec, it froze at the first backend's value. A limit pushed upstream truncated each backend's groups before the cross-backend fold, so a group could be partly counted or missed. - Refuses any extract projecting one response column twice, naming the clash - Fetches every group and applies limit/offset after the fold - Documents the float64 avg divergence from Postgres numeric
This commit is contained in:
@@ -471,6 +471,11 @@ func (s *Server) serveCombined(w http.ResponseWriter, r *http.Request, path stri
|
||||
return
|
||||
}
|
||||
upstream := page.upstreamParams(in)
|
||||
if spec != nil && len(spec.aggs) > 0 {
|
||||
// An aggregate returns one row per distinct group, so the whole result is
|
||||
// fetched and paged locally rather than truncated per backend.
|
||||
upstream = unpagedParams(in)
|
||||
}
|
||||
if spec != nil && spec.query != "" {
|
||||
// The backends answer the rewritten query, so they no longer carry the
|
||||
// column the client's order_by may name; the merged rows are sorted here.
|
||||
|
||||
Reference in New Issue
Block a user