hash

package
v0.0.0-...-0601960 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenHashMurMur

func GenHashMurMur(key []byte) uint32

func HashValue

func HashValue(val *types.Value) uint32

* @return the hash of the value

Types

type LinearProbeHashTable

type LinearProbeHashTable struct {
	// contains filtered or unexported fields
}

Limitation: current implementation contain BlockArraySize(252) * 1020 = 257,040 record info at most

func NewLinearProbeHashTable

func NewLinearProbeHashTable(bpm *buffer.BufferPoolManager, numBuckets int, headerPageId types.PageID) *LinearProbeHashTable

numBuckets should be less than 1020

func (*LinearProbeHashTable) GetHeaderPageId

func (ht *LinearProbeHashTable) GetHeaderPageId() types.PageID

func (*LinearProbeHashTable) GetValue

func (ht *LinearProbeHashTable) GetValue(key []byte) []uint64

func (*LinearProbeHashTable) Insert

func (ht *LinearProbeHashTable) Insert(key []byte, value uint64) (err error)

func (*LinearProbeHashTable) Remove

func (ht *LinearProbeHashTable) Remove(key []byte, value uint64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL