-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Support int64 data types #2261
Support int64 data types #2261
Conversation
case int: | ||
return Number | ||
return Float | ||
case int64, int32, int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is really necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might just need int64
.
Can you add an integration test that writes & reads ints? I tested this change on an ARM 32 bit system and it seems to work. The output is interesting once we it gets above |
Thanks @dgnorton -- I'll add some more tests. The formatting issue you pointed out, yeah, I've seen that before. I am assuming it's due to the use of |
@@ -976,6 +976,39 @@ func TestServer_StartRetentionPolicyEnforcement_ErrZeroInterval(t *testing.T) { | |||
} | |||
} | |||
|
|||
// Ensure the server respects limit and offset in show series queries | |||
func TestServer_WriteAllDataTypes(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must add test to server.go
since it's the only way to control the types.
Updated with unit test. +1 @dgnorton ? |
Why can it only be tested through server.go? Users read & write int64 values through the usual API. |
If by "usual API" you mean they write through the JSON API, Go's JSON unmarshalling casts all numbers to float64. http://golang.org/pkg/encoding/json/#Unmarshal There is no way to get integer values into the system through the JSON API. It'll need an API change, or perhaps some code on our side. |
I think we used to do it using |
You could be right @dgnorton -- but I think that is orthogonal to this change. Regardless of how integers get into the system, we need to have support for encoding them. This is what this change does. |
lgtm |
No description provided.