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

sql: Bugfixes and increased tests for IndexSkipTableReader #39833

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

rohany
Copy link
Contributor

@rohany rohany commented Aug 22, 2019

I investigated the index skip table reader and added some additional tests for null / maximal key handling. It turns out that the for loop we had was incorrect anyway, and PrefixEnd did what was needed.

Fixes #39659.

Release note: None

@rohany rohany requested review from asubiotto and a team August 22, 2019 21:29
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for looking into this. :lgtm: once we remove the copy code.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @asubiotto and @rohany)


pkg/sql/distsqlrun/index_skip_table_reader.go, line 218 at r1 (raw file):

			// so that we skip all values with the same prefix, and "skip" to the
			// next distinct value.
			t.spans[t.currentSpan].Key = key.PrefixEnd()

Since PrefixEnd creates a copy and modifies that, I think we could remove the copy I added.

@rohany
Copy link
Contributor Author

rohany commented Aug 23, 2019

bors r=asubiotto

craig bot pushed a commit that referenced this pull request Aug 23, 2019
39833: sql: Bugfixes and increased tests for IndexSkipTableReader r=asubiotto a=rohany

I investigated the index skip table reader and added some additional tests for null / maximal key handling. It turns out that the for loop we had was incorrect anyway, and PrefixEnd did what was needed.

Fixes #39659.

Release note: None

Co-authored-by: Rohan Yadav <rohany@alumni.cmu.edu>
@craig
Copy link
Contributor

craig bot commented Aug 23, 2019

Build succeeded

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.

distsql: revisit forward loose scan lookup key construction
3 participants