This is an automated email from the ASF dual-hosted git repository.

alsay pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datasketches-go.git

commit c1ce959da78f87f35da1bf3809338a665d41b9f3
Author: Pierre Lacave <[email protected]>
AuthorDate: Wed Dec 20 22:57:53 2023 +0100

    constant all upper case
---
 frequencies/long_sketch.go | 2 +-
 frequencies/utils.go       | 2 +-
 hll/hll_sketch.go          | 2 +-
 thetacommon/theta_utils.go | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/frequencies/long_sketch.go b/frequencies/long_sketch.go
index 996ac6a..544a252 100644
--- a/frequencies/long_sketch.go
+++ b/frequencies/long_sketch.go
@@ -76,7 +76,7 @@ func NewLongSketch(lgMaxMapSize int, lgCurMapSize int) 
(*LongSketch, error) {
        curMapCap := hashMap.getCapacity()
        maxMapCap := int(float64(uint64(1<<lgMaxMapSize)) * loadFactor)
        offset := int64(0)
-       sampleSize := min(sampleSize, maxMapCap)
+       sampleSize := min(_SAMPLE_SIZE, maxMapCap)
        return &LongSketch{
                lgMaxMapSize: int(lgMaxMapSize),
                curMapCap:    curMapCap,
diff --git a/frequencies/utils.go b/frequencies/utils.go
index 2d42118..6af4804 100644
--- a/frequencies/utils.go
+++ b/frequencies/utils.go
@@ -23,7 +23,7 @@ const (
        // randomly selected entries from a list of numbers and outputting
        // the empirical median will give a constant-factor approximation to the
        // true median with high probability.
-       sampleSize = 1024
+       _SAMPLE_SIZE = 1024
 )
 
 // hash returns an index into the hash table.
diff --git a/hll/hll_sketch.go b/hll/hll_sketch.go
index 7672f34..b85e235 100644
--- a/hll/hll_sketch.go
+++ b/hll/hll_sketch.go
@@ -316,5 +316,5 @@ func (h *hllSketchImpl) GetSerializationVersion() int {
 }
 
 func (h *hllSketchImpl) hash(bs []byte) (uint64, uint64) {
-       return murmur3.SeedSum128(thetacommon.DefaultUpdateSeed, 
thetacommon.DefaultUpdateSeed, bs)
+       return murmur3.SeedSum128(thetacommon.DEFAULT_UPDATE_SEED, 
thetacommon.DEFAULT_UPDATE_SEED, bs)
 }
diff --git a/thetacommon/theta_utils.go b/thetacommon/theta_utils.go
index 06213b1..403560c 100644
--- a/thetacommon/theta_utils.go
+++ b/thetacommon/theta_utils.go
@@ -18,5 +18,5 @@
 package thetacommon
 
 const (
-       DefaultUpdateSeed = uint64(9001)
+       DEFAULT_UPDATE_SEED = uint64(9001)
 )


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to