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

Enable uint64 support #8923

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions models/points.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ const (
MaxKeyLength = 65535
)

// enableUint64Support will enable uint64 support if set to true.
var enableUint64Support = false

// EnableUintSupport manually enables uint support for the point parser.
// This function will be removed in the future and only exists for unit tests during the
// transition.
func EnableUintSupport() {
enableUint64Support = true
}

// Point defines the values that will be written to the database.
type Point interface {
// Name return the measurement name for the point.
Expand Down Expand Up @@ -957,10 +947,6 @@ func scanNumber(buf []byte, i int) (int, error) {
}
}
} else if isUnsigned {
// Return an error if uint64 support has not been enabled.
if !enableUint64Support {
return i, ErrInvalidNumber
}
// Make sure the last char is a 'u' for unsigned
if buf[i-1] != 'u' {
return i, ErrInvalidNumber
Expand Down
5 changes: 0 additions & 5 deletions models/points_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2495,8 +2495,3 @@ func BenchmarkMakeKey(b *testing.B) {
})
}
}

func init() {
// Force uint support to be enabled for testing.
models.EnableUintSupport()
}
7 changes: 0 additions & 7 deletions models/uint_support.go

This file was deleted.

5 changes: 0 additions & 5 deletions tests/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9501,8 +9501,3 @@ func TestServer_NestedAggregateWithMathPanics(t *testing.T) {
})
}
}

func init() {
// Force uint support to be enabled for testing.
models.EnableUintSupport()
}