diff --git a/bsi.go b/bsi.go index 308de8e0b..7d76ec3c8 100644 --- a/bsi.go +++ b/bsi.go @@ -24,9 +24,9 @@ import ( type bsiData []*Row // pivotDescending loops over nonzero BSI values in descending order. -// For each value, the provided function is called with the value and -// a slice of the associated columns. TODO, document branch and -// limit/offset behavior (particularly when nil). +// For each value, the provided function is called with the value and a slice of the associated columns. +// If limit or offset are not-nil, they will be applied. +// Applying a limit or offset may modify the pointed-to value. func (bsi bsiData) pivotDescending(filter *Row, branch uint64, limit, offset *uint64, fn func(uint64, ...uint64)) { // This "pivot" algorithm works by treating the BSI data as a tree. // Each branch of this tree corresponds to a power-of-2-sized range of BSI values.