Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong logic of interval.Range.Equal method #16079

Closed
yaojingguo opened this issue May 23, 2017 · 2 comments
Closed

wrong logic of interval.Range.Equal method #16079

yaojingguo opened this issue May 23, 2017 · 2 comments
Assignees
Milestone

Comments

@yaojingguo
Copy link
Contributor

The existing Equal method considers Range A and Range B to be equal if
A's Start is equal to B's End and A's End is equal to B's Start. The
correct logic is to consider Range A and Range B to be equal if A's Start
is equal to B's Start and A's End is equal to B's End.

@bdarnell
Copy link
Contributor

@dt just noticed this recently too. This method is unused and we should just delete it.

@dianasaur323 dianasaur323 added this to the 1.1 milestone May 25, 2017
yaojingguo added a commit to yaojingguo/cockroach that referenced this issue May 26, 2017
1. Implement Iterator method for btree and add tests.
2. Restore Range.Equal method and fix the wrong logic of Range.Equal.
   The existing Equal method considers Range A and Range B to be equal
   if A's Start is equal to B's End and A's End is equal to B's Start.
   The correct logic is to consider Range A and Range B to be equal if
   A's Start is equal to B's Start and A's End is equal to B's End. See
   cockroachdb#16079.
3. Add complile time checks to ensure that btree and llrbTree implement
   the Tree interface.
4. s/llbrNode/llrbNode/g and s/llbrTree/llrbTree/g.
5. Move comment from llrbTree to Tree.
yaojingguo added a commit to yaojingguo/cockroach that referenced this issue May 27, 2017
1. Implement Iterator method for btree and add tests.
2. Restore Range.Equal method and fix the wrong logic of Range.Equal.
   The existing Equal method considers Range A and Range B to be equal
   if A's Start is equal to B's End and A's End is equal to B's Start.
   The correct logic is to consider Range A and Range B to be equal if
   A's Start is equal to B's Start and A's End is equal to B's End. See
   cockroachdb#16079.
3. Add complile time checks to ensure that btree and llrbTree implement
   the Tree interface.
4. s/llbrNode/llrbNode/g and s/llbrTree/llrbTree/g.
5. Move comment from llrbTree to Tree.
@a-robinson
Copy link
Contributor

Looks like this got fixed in #8867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants