Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

CountRange was incorrect if rangekey was prior to inital container #759

Merged
merged 3 commits into from Aug 11, 2017

Conversation

tgruben
Copy link
Member

@tgruben tgruben commented Aug 9, 2017

Overview

Count and CountRange results where not matching due to incorrect handling of less than edge case

Fixes Unreported bug

Pull request checklist

Code review checklist

This is the checklist that the reviewer will follow while reviewing your pull request. You do not need to do anything with this checklist, but be aware of what the reviewer will be looking for.

  • Ensure that any changes to external docs have been included in this pull request.
  • If the changes require that minor/major versions need to be updated, tag the PR appropriately.
  • Ensure the new code is properly commented and follows Idiomatic Go.
  • Check that tests have been written and that they cover the new functionality.
  • Run tests and ensure they pass.
  • Build and run the code, performing any applicable integration testing.

@@ -191,6 +191,27 @@ func TestBitmap_Max(t *testing.T) {
}
}
}
func TestBitmap_BitmapCountRangeBug(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's name this test something other than Bug; that will become meaningless going forward.

fragment.go Outdated
@@ -274,7 +274,8 @@ func (f *Fragment) openCache() error {
// Read in all rows by ID.
// This will cause them to be added to the cache.
for _, id := range pb.IDs {
n := f.row(id, false, false).Count()
//n := f.row(id, false, false).Count()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

Copy link
Member

@travisturner travisturner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment to that test so we know what it's for. As long as you're ok with that, the rest looks good.

@tgruben tgruben merged commit 04de544 into FeatureBaseDB:master Aug 11, 2017
@tgruben tgruben deleted the bug-CountRange branch November 6, 2018 22:29
seebs pushed a commit to seebs/pilosa that referenced this pull request Nov 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants