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

coprocessor: support unique index scan #2526

Merged
merged 12 commits into from
Dec 8, 2017
Merged

Conversation

hanfei1991
Copy link
Member

@hanfei1991 hanfei1991 commented Nov 28, 2017

Use get interface when scanning unique index.
@AndreMouche PTAL

@iamxy
Copy link
Collaborator

iamxy commented Nov 29, 2017

/rebuild

let r1 = get_idx_range(TABLE_ID, INDEX_ID, 0, 1); // point get
let r2 = get_idx_range(TABLE_ID, INDEX_ID, 1, 4); // range seek
let r3 = get_idx_range(TABLE_ID, INDEX_ID, 4, 5); // point get
let r4 = get_idx_range(TABLE_ID, INDEX_ID, 5, KEY_NUMBER + 1 as i64); // range seek
Copy link
Member

Choose a reason for hiding this comment

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

It seems KEY_NUMBER is defined as usize

let mut scanner = IndexScanExecutor::new(wrapper.scan, wrapper.ranges, store, true);

for tid in 0..KEY_NUMBER {
let handle = KEY_NUMBER - tid - 1;
Copy link
Member

Choose a reason for hiding this comment

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

The result should be order by handle ascending since desc in request is false.

Copy link
Member

@AndreMouche AndreMouche left a comment

Choose a reason for hiding this comment

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

LGTM

@AndreMouche
Copy link
Member

@breeswish PTAL

@AndreMouche
Copy link
Member

@coocood PTAL

@coocood
Copy link
Contributor

coocood commented Dec 6, 2017

LGTM

@zhangjinpeng87
Copy link
Member

@AndreMouche Can we merge now?

@BusyJay
Copy link
Member

BusyJay commented Dec 7, 2017

/run-integration-tests

@AndreMouche AndreMouche merged commit 8842e17 into tikv:master Dec 8, 2017
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
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.

7 participants