This commit is contained in:
Aliaksandr Valialkin 2024-05-26 00:21:57 +02:00
parent 5be91507fa
commit 7994b5b22a
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -133,16 +133,18 @@ func (ps *pipeStats) hasFilterInWithQuery() bool {
func (ps *pipeStats) initFilterInValues(cache map[string][]string, getFieldValuesFunc getFieldValuesFunc) (pipe, error) {
funcsNew := make([]pipeStatsFunc, len(ps.funcs))
for i, f := range ps.funcs {
for i := range ps.funcs {
f := &ps.funcs[i]
iffNew, err := f.iff.initFilterInValues(cache, getFieldValuesFunc)
if err != nil {
return nil, err
}
f.iff = iffNew
funcsNew[i] = f
fNew := *f
fNew.iff = iffNew
funcsNew[i] = fNew
}
psNew := *ps
ps.funcs = funcsNew
psNew.funcs = funcsNew
return &psNew, nil
}