mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
modify needsSlices() to use call.Name
This commit is contained in:
parent
b6907c4e19
commit
22e9c1cafa
1 changed files with 7 additions and 7 deletions
14
executor.go
14
executor.go
|
|
@ -995,20 +995,20 @@ func hasOnlySetBitmapAttrs(calls []*pql.Call) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func needsSlices(calls pql.Calls) bool {
|
||||
func needsSlices(calls []*pql.Call) bool {
|
||||
if len(calls) == 0 {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, call := range calls {
|
||||
if _, ok := call.(pql.BitmapCall); !ok {
|
||||
switch call.Name {
|
||||
case "ClearBit", "Profile", "SetBit", "SetBitmapAttrs", "SetProfileAttrs":
|
||||
continue
|
||||
case "Count", "TopN":
|
||||
return true
|
||||
} else if _, ok := call.(*pql.Count); !ok {
|
||||
return true
|
||||
} else if _, ok := call.(*pql.TopN); !ok {
|
||||
// default catches Bitmap calls
|
||||
default:
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue