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

tablecodec.go:EncodeIndexSeekKey change the initial capacity of key #28

Open
jiangyuhang17 opened this issue May 1, 2020 · 0 comments

Comments

@jiangyuhang17
Copy link

https://github.com/pingcap-incubator/tinysql/blob/bf13c144faf71010b2d77f754d6c81463b1ac6e8/tablecodec/tablecodec.go#L88

Why not take the length of idxID into account when allocating the capacity of key in the EncodeIndexSeekKey function, like the following:

key := make([]byte, 0, prefixLen+idLen+len(encodedValue))
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

1 participant