v0.0.437 properly handle $group in wmo extraModPipeline
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 3m23s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 3m23s
This commit is contained in:
@@ -125,3 +125,17 @@ func (c *Coll[TData]) createToken(fieldPrimary string, dirPrimary ct.SortDirecti
|
||||
Extra: ct.Extra{},
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *Coll[TData]) needsDoubleSort(ctx context.Context) bool {
|
||||
for _, ppl := range c.extraModPipeline {
|
||||
for _, stage := range ppl(ctx) {
|
||||
for _, bsone := range stage {
|
||||
if bsone.Key == "$group" {
|
||||
// a group stage in extraModPipeline results in unsorted data, which means the caller must sort again after these pipeline stages...
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user