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

code clean: refine similar functions in tidb/util/codec and server/internal/dump/dump.go #44970

Closed
Defined2014 opened this issue Jun 27, 2023 · 4 comments · Fixed by #49837
Closed
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.

Comments

@Defined2014
Copy link
Contributor

Defined2014 commented Jun 27, 2023

Enhancement

There are some similar functions, we could refine and improve them.

For example, the dump.Uint64 function is very similar with EncodeUint. And also we could use binary.BigEndian.AppendUint64 or binary.LittleEndian.AppendUint64 instead of them either.

@Defined2014 Defined2014 added type/enhancement The issue or PR belongs to an enhancement. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Jun 27, 2023
@Defined2014
Copy link
Contributor Author

Defined2014 commented Jun 27, 2023

And also some similar functions in tidb/executor/aggfuncs/func_count_distinct.go, like

func appendInt64(encodedBytes, buf []byte, val int64) []byte {

@Defined2014 Defined2014 changed the title code clean: combine some similar functions in tidb/util/codec and tidb/server/util.go code clean: refine similar functions in tidb/util/codec and tidb/server/util.go Jun 27, 2023
@Defined2014 Defined2014 changed the title code clean: refine similar functions in tidb/util/codec and tidb/server/util.go code clean: refine similar functions in tidb/util/codec and server/internal/dump/dump.go Jun 27, 2023
@NicoleRobin
Copy link

I want to solve this issue, please assign it to me.

@Defined2014
Copy link
Contributor Author

I want to solve this issue, please assign it to me.

Done @NicoleRobin

@Shivansh2407
Copy link

Hey @Defined2014 and @NicoleRobin, is this still being worked upon? I'd be happy to take this up. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants