-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
[store/prolly] Add DiffKeyRangeMaps and IterKeyRange #4258
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, couple comments on names
// RangeDiffMaps returns diffs within a Range. See Range for which diffs are | ||
// returned. | ||
func RangeDiffMaps(ctx context.Context, from, to Map, rng Range, cb DiffFn) error { | ||
return rangeDiffOrderedTrees(ctx, from.tuples, to.tuples, rng, cb) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a use case for this old function, given the new one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we do. We could implement range diffs in the sql layer for our diff tables instead of applying a filter.
// IterKeyRange iterates over a physical key range defined by |startInclusive| | ||
// and |stopExclusive|. If |startInclusive| and/or |stopExclusive| is nil, the | ||
// range will be open towards that end. | ||
func (m Map) IterKeyRange(ctx context.Context, startInclusive, stopExclusive val.Tuple) (MapIter, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (m Map) IterKeyRange(ctx context.Context, startInclusive, stopExclusive val.Tuple) (MapIter, error) { | |
func (m Map) IterKeyRange(ctx context.Context, start, stop val.Tuple) (MapIter, error) { |
No description provided.