Skip to content

Commit d7b759c

Browse files
author
Harshil Goel
committed
Removed uidlist
1 parent ee38a7d commit d7b759c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

algo/uidlist.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func IntersectCompressedWith(pack *pb.UidPack, afterUID uint64, v, o *pb.List) {
4343
if pack == nil {
4444
return
4545
}
46-
dec := codec.Decoder{Pack: pack, UnpackedBlocks: make(map[int][]uint64)}
46+
dec := codec.Decoder{Pack: pack}
4747
dec.Seek(afterUID, codec.SeekStart)
4848
n := dec.ApproxLen()
4949
m := len(v.Uids)

codec/codec.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,12 @@ type Decoder struct {
151151
Pack *pb.UidPack
152152
blockIdx int
153153
uids []uint64
154-
155-
UnpackedBlocks map[int][]uint64
156154
}
157155

158156
// NewDecoder returns a decoder for the given UidPack and properly initializes it.
159157
func NewDecoder(pack *pb.UidPack) *Decoder {
160158
decoder := &Decoder{
161-
Pack: pack,
162-
UnpackedBlocks: make(map[int][]uint64),
159+
Pack: pack
163160
}
164161
decoder.Seek(0, SeekStart)
165162
return decoder
@@ -215,7 +212,6 @@ func (d *Decoder) UnpackBlock() []uint64 {
215212
}
216213

217214
d.uids = d.uids[:block.NumUids]
218-
d.UnpackedBlocks[d.blockIdx] = append(make([]uint64, 0, len(d.uids)), d.uids...)
219215
return d.uids
220216
}
221217

0 commit comments

Comments
 (0)