Skip to content

Commit

Permalink
Merge #36165
Browse files Browse the repository at this point in the history
36165: exec: add columnar hashRouter r=asubiotto a=asubiotto

Still need to add a random integration test and clean up comments/commit message. PTAL if you have a chance though as the general structure is finished (don't mind the nits).

Co-authored-by: Alfonso Subiotto Marqués <alfonso@cockroachlabs.com>
  • Loading branch information
craig[bot] and asubiotto committed Apr 5, 2019
2 parents d6a33f1 + 3a49fb6 commit 1a5eaba
Show file tree
Hide file tree
Showing 4 changed files with 1,289 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/sql/exec/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ const (
var hashKey [4]uintptr

func init() {
rand.Read((*[len(hashKey) * ptrSize]byte)(unsafe.Pointer(&hashKey))[:])
hashKey[0] |= 1 // make sure these numbers are odd
hashKey[1] |= 1
hashKey[2] |= 1
hashKey[3] |= 1
for i := range hashKey {
hashKey[i] = 1
}
}

func readUnaligned32(p unsafe.Pointer) uint32 {
Expand Down
Loading

0 comments on commit 1a5eaba

Please sign in to comment.