mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
fix redundant arguments to make() calls
This commit is contained in:
parent
a3445ec884
commit
652b5695e1
4 changed files with 8 additions and 8 deletions
|
|
@ -192,7 +192,7 @@ func (e *Executor) validateCallArgs(c *pql.Call) error {
|
|||
case []int64, []uint64:
|
||||
// noop
|
||||
case []interface{}:
|
||||
b := make([]int64, len(v), len(v))
|
||||
b := make([]int64, len(v))
|
||||
for i := range v {
|
||||
b[i] = v[i].(int64)
|
||||
}
|
||||
|
|
@ -1554,7 +1554,7 @@ loop:
|
|||
// If a mapping of slices to a node fails then the slices are resplit across
|
||||
// secondary nodes and retried. This continues to occur until all nodes are exhausted.
|
||||
func (e *Executor) mapReduce(ctx context.Context, index string, slices []uint64, c *pql.Call, opt *ExecOptions, mapFn mapFunc, reduceFn reduceFunc) (interface{}, error) {
|
||||
ch := make(chan mapResponse, 0)
|
||||
ch := make(chan mapResponse)
|
||||
|
||||
// Wrap context with a cancel to kill goroutines on exit.
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
|
|
|
|||
|
|
@ -1013,7 +1013,7 @@ func (f *Fragment) Top(opt TopOptions) ([]Pair, error) {
|
|||
}
|
||||
|
||||
//Pop first opt.N elements out of heap
|
||||
r := make(Pairs, results.Len(), results.Len())
|
||||
r := make(Pairs, results.Len())
|
||||
x := results.Len()
|
||||
i := 1
|
||||
for results.Len() > 0 {
|
||||
|
|
|
|||
|
|
@ -1179,8 +1179,8 @@ func BenchmarkFragment_FullSnapshot(b *testing.B) {
|
|||
// Generate some intersecting data.
|
||||
maxX := 1048576 / 2
|
||||
sz := maxX
|
||||
rows := make([]uint64, sz, sz)
|
||||
cols := make([]uint64, sz, sz)
|
||||
rows := make([]uint64, sz)
|
||||
cols := make([]uint64, sz)
|
||||
|
||||
max := 0
|
||||
for row := 0; row < 100; row++ {
|
||||
|
|
@ -1215,8 +1215,8 @@ func BenchmarkFragment_Import(b *testing.B) {
|
|||
defer f.Close()
|
||||
maxX := 1048576 * 5 * 2
|
||||
sz := maxX
|
||||
rows := make([]uint64, sz, sz)
|
||||
cols := make([]uint64, sz, sz)
|
||||
rows := make([]uint64, sz)
|
||||
cols := make([]uint64, sz)
|
||||
i := 0
|
||||
for row := 0; row < 100; row++ {
|
||||
val := 1
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ type Holder struct {
|
|||
func NewHolder() *Holder {
|
||||
return &Holder{
|
||||
indexes: make(map[string]*Index),
|
||||
closing: make(chan struct{}, 0),
|
||||
closing: make(chan struct{}),
|
||||
|
||||
opened: make(chan struct{}),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue