From 90eb860b03f9835527a7c1d6f0917e003156744d Mon Sep 17 00:00:00 2001 From: Matthew Jaffee Date: Fri, 27 May 2022 08:57:12 -0500 Subject: [PATCH] fix hardcoded containers per rowshard There are 16 containers in a row in a shard with the default shard width of 2^20, but since you can change the shard width at compile time, everything should be computed off that. --- roaring/filter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roaring/filter.go b/roaring/filter.go index 04a37536c..3e26a148b 100644 --- a/roaring/filter.go +++ b/roaring/filter.go @@ -1214,7 +1214,7 @@ func getFirstRowAsContainers(citer ContainerIterator) []containerWithKey { citerContainers := make([]containerWithKey, 0) for citer.Next() { key, cont := citer.Value() - if key > 15 { + if key >= rowWidth { continue } citerContainers = append(citerContainers, containerWithKey{Container: cont, key: FilterKey(key)})