Merge pull request #2137 from travisturner/backport-fix

fix interface{} -> bool err
This commit is contained in:
Travis Turner 2021-01-27 08:13:04 -06:00 committed by GitHub
commit 8886da126f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2005,7 +2005,12 @@ func (e *executor) executeSetRow(ctx context.Context, index string, c *pql.Call,
}
result, err := e.mapReduce(ctx, index, shards, c, opt, mapFn, reduceFn)
return result.(bool), err
r, ok := result.(bool)
if !ok {
err = errors.Wrapf(err, "mapReduce result is not bool,err:%s", err.Error())
return false, err
}
return r, err
}
// executeSetRowShard executes a SetRow() call for a single shard.