From 410a372351f95e46ee6d14458e81cdae544cec92 Mon Sep 17 00:00:00 2001 From: Nia Weiss Date: Fri, 20 Nov 2020 12:38:53 -0500 Subject: [PATCH] clarify bsi-building preconditions --- bsi.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bsi.go b/bsi.go index 7d76ec3c8..afb7dd89a 100644 --- a/bsi.go +++ b/bsi.go @@ -220,6 +220,7 @@ func (b *rowBuilder) flushKey() { } // Add a value to the bitmap. +// Values must be added sequentially. func (b *rowBuilder) Add(v uint64) { vkey := v / (1 << 16) if b.key != vkey { @@ -270,7 +271,7 @@ func (b *rowBuilder) Build() *Row { type bsiBuilder []rowBuilder // Insert a value into the BSI data. -// It is assumed that it did not previously exist. +// Columns must be inserted sequentially, and duplicates are not allowed. func (b *bsiBuilder) Insert(col, val uint64) { for val != 0 { i := bits.TrailingZeros64(val)