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

[store/prolly] Add DiffKeyRangeMaps and IterKeyRange #4258

Closed
wants to merge 3 commits into from

Conversation

druvv
Copy link
Contributor

@druvv druvv commented Sep 1, 2022

No description provided.

Copy link
Contributor

@andy-wm-arthur andy-wm-arthur left a 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

Comment on lines +127 to 131
// 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)
}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

go/store/prolly/map.go Show resolved Hide resolved
// 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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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) {

@druvv druvv closed this Sep 2, 2022
@Hydrocharged Hydrocharged deleted the dhruv/iter-diff-key-range branch October 13, 2022 12:48
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

Successfully merging this pull request may close these issues.

None yet

2 participants