run gofmt on the previous commit

This commit is contained in:
Travis 2017-01-27 17:48:44 -06:00
parent ce3b797172
commit 85a1a71024

View file

@ -52,15 +52,15 @@ func (e *Executor) Execute(ctx context.Context, db string, q *pql.Query, slices
// If slices aren't specified, then include all of them.
if len(slices) == 0 {
if needsSlices(q.Calls){
if needsSlices(q.Calls) {
// Round up the number of slices.
maxSlice := e.Index.DB(db).MaxSlice()
maxSlice := e.Index.DB(db).MaxSlice()
// Generate a slices of all slices.
slices = make([]uint64, maxSlice+1)
for i := range slices {
slices[i] = uint64(i)
}
// Generate a slices of all slices.
slices = make([]uint64, maxSlice+1)
for i := range slices {
slices[i] = uint64(i)
}
}
}
@ -880,19 +880,19 @@ func hasOnlySetBitmapAttrs(calls pql.Calls) bool {
}
func needsSlices(calls pql.Calls) bool {
if len(calls) == 0 {
return false
}
if len(calls) == 0 {
return false
}
for _, call := range calls {
if _, ok := call.(pql.BitmapCall); !ok {
return true
}else if _, ok := call.(*pql.Count); !ok {
} else if _, ok := call.(*pql.Count); !ok {
return true
}else if _, ok := call.(*pql.TopN); !ok {
} else if _, ok := call.(*pql.TopN); !ok {
return true
}
}
return false
return false
}