mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
* implemented distinct
* implemented distinct
* uses first cut of a buffer pool, and extendible hashing with thresholded spill to disk
* tests
* cleaned up some stuff around query plan output to make developing tooling easier
* added optimization to call PQL Distinct()
* fixed test
* fix for passing wrong index name in orchestrator
* back out change to DistinctTimestamp
* fix other instance of wrong table name being passed
* use full index name instead of abbreviated one for translation. sigh.
* removed some unused code
Co-authored-by: Matthew Jaffee <jaffee@pilosa.com>
(cherry picked from commit f030d58d95)
24 lines
382 B
Go
24 lines
382 B
Go
package extendiblehash
|
|
|
|
import (
|
|
"github.com/zeebo/xxh3"
|
|
)
|
|
|
|
type Hashable interface {
|
|
Hash() uint64
|
|
}
|
|
|
|
// use the same seed all the time - this is not for crypto
|
|
var protoSeed uint64 = 20041973
|
|
|
|
var hasher = xxh3.NewSeed(protoSeed)
|
|
|
|
type Key []byte
|
|
|
|
// BEWARE - not concurrent!!
|
|
func (k Key) Hash() uint64 {
|
|
hasher.Reset()
|
|
hasher.Write(k)
|
|
hash := hasher.Sum64()
|
|
return hash
|
|
}
|