From 041726fbf76868e2ddc0c95c2acea517293b2dc7 Mon Sep 17 00:00:00 2001 From: Travis Date: Fri, 22 May 2020 10:59:54 -0500 Subject: [PATCH] clean up the TODOs and some comments --- roaring/roaring.go | 2 +- row.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/roaring/roaring.go b/roaring/roaring.go index 9605a6299..5924673ea 100644 --- a/roaring/roaring.go +++ b/roaring/roaring.go @@ -160,7 +160,7 @@ type Containers interface { // replace the given container. UpdateEvery(fn func(uint64, *Container, bool) (*Container, bool)) - // Iterator returns a Contiterator which after a call to Next(), a call to Value() will + // Iterator returns a ContainterIterator which after a call to Next(), a call to Value() will // return the first container at or after key. found will be true if a // container is found at key. Iterator(key uint64) (citer ContainerIterator, found bool) diff --git a/row.go b/row.go index e50c6ab67..f1c67123c 100644 --- a/row.go +++ b/row.go @@ -374,7 +374,7 @@ func (r *Row) Difference(others ...*Row) *Row { return &Row{segments: output} } -// GenericUnary returns the results of a generic op on r. +// GenericUnaryOp returns the results of a generic op on r. func (r *Row) GenericUnaryOp(op ext.GenericBitmapOpBitmap, args map[string]interface{}) *Row { work := r var segments []rowSegment @@ -660,7 +660,8 @@ func (s *rowSegment) Xor(other *rowSegment) *rowSegment { // Shift returns s shifted by 1 bit. func (s *rowSegment) Shift() (*rowSegment, error) { - //TODO deal with overflow + // TODO: deal with overflow + // See issue: https://github.com/molecula/pilosa/issues/403 data, err := s.data.Shift(1) if err != nil { return nil, errors.Wrap(err, "shifting roaring data") @@ -675,9 +676,8 @@ func (s *rowSegment) Shift() (*rowSegment, error) { }, nil } -// GenericUnary returns s subject to op. +// GenericUnaryOp returns s subject to op. func (s *rowSegment) GenericUnaryOp(op ext.GenericBitmapOpBitmap, args map[string]interface{}) *rowSegment { - //TODO deal with overflow data := UnwrapBitmap(op([]ext.Bitmap{WrapBitmap(s.data)}, args)) return &rowSegment{