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

Use uint16 for EncodeDecimal #749

Merged
merged 1 commit into from
Jun 22, 2024
Merged

Use uint16 for EncodeDecimal #749

merged 1 commit into from
Jun 22, 2024

Conversation

Tang8330
Copy link
Contributor

@Tang8330 Tang8330 commented Jun 22, 2024

As per title.

@Tang8330 Tang8330 marked this pull request as ready for review June 22, 2024 01:16
@Tang8330 Tang8330 requested a review from nathan-artie June 22, 2024 01:16
@@ -86,7 +86,7 @@ func TestEncodeDecimal(t *testing.T) {
for _, testCase := range testCases {
encodedValue, err := EncodeDecimal(testCase.value, testCase.scale)
if testCase.expectedErr == "" {
decodedValue := DecodeDecimal(encodedValue, nil, testCase.scale)
decodedValue := DecodeDecimal(encodedValue, nil, int(testCase.scale))
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be nice to make make DecodeDecimal and Decimal use int16 too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I tried, it's pretty hard

Copy link
Contributor

Choose a reason for hiding this comment

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

What about int64 then?

@Tang8330 Tang8330 merged commit 2d925ee into master Jun 22, 2024
1 check passed
@Tang8330 Tang8330 deleted the use-uint16 branch June 22, 2024 01:23
@Tang8330
Copy link
Contributor Author

Tang8330 commented Jun 22, 2024 via email

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.

2 participants