fix interface{} -> bool err

This commit is contained in:
wanggy 2021-01-21 18:33:18 +08:00 • committed by Travis Turner
parent d960d2fda9
commit 53c1fb6bbe
No known key found for this signature in database
GPG key ID: 37080CC2042BA34E

View file

@ -2005,7 +2005,13 @@ 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
//return result.(bool), err
}
// executeSetRowShard executes a SetRow() call for a single shard.