Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
map from int instead of slice
Browse files Browse the repository at this point in the history
  • Loading branch information
jaffee committed Oct 9, 2019
1 parent 1d062fd commit 58c2816
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gpexp/importbatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type Batch struct {

// rowIDs is a map of field index (in the header) to slices of
// length batchSize which contain row IDs.
rowIDs [][]uint64
rowIDs map[int][]uint64

// rowIDSets is a map from field name to a batchSize slice of
// slices of row IDs. When a given record can have more than one
Expand All @@ -83,7 +83,7 @@ type Batch struct {
// TODO support mutex and bool fields.

// for each field, keep a map of key to which record indexes that key mapped to
toTranslate []map[string][]int
toTranslate map[int]map[string][]int

// toTranslateSets is a map from field name to a map of string
// keys that need to be translated to sets of record indexes which
Expand Down Expand Up @@ -124,9 +124,9 @@ func NewBatch(client *pilosa.Client, size int, index *pilosa.Index, fields []*pi
return nil, errors.New("can't batch with no fields or batch size")
}
headerMap := make(map[string]*pilosa.Field, len(fields))
rowIDs := make([][]uint64, len(fields))
rowIDs := make(map[int][]uint64, len(fields))
values := make(map[string][]int64)
tt := make([]map[string][]int, len(fields))
tt := make(map[int]map[string][]int, len(fields))
ttSets := make(map[string]map[string][]int)
hasTime := false
for i, field := range fields {
Expand Down

0 comments on commit 58c2816

Please sign in to comment.