Documentation
¶
Index ¶
- func GenHashMurMur(key []byte) uint32
- func HashValue(val *types.Value) uint32
- type LinearProbeHashTable
- type TmpTuple
- type TmpTuplePage
- func (p *TmpTuplePage) Get(tuple_ *tuple.Tuple, offset uint32)
- func (p *TmpTuplePage) GetFreeSpacePointer() uint32
- func (p *TmpTuplePage) GetNextPosToInsert() []byte
- func (p *TmpTuplePage) GetOffset() uint32
- func (p *TmpTuplePage) GetTablePageId() types.PageID
- func (p *TmpTuplePage) Init(page_id types.PageID, page_size uint32)
- func (p *TmpTuplePage) Insert(tuple_ *tuple.Tuple, out *TmpTuple) bool
- func (p *TmpTuplePage) SetFreeSpacePointer(size uint32)
- func (p *TmpTuplePage) SetPageId(page_id types.PageID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenHashMurMur ¶
Types ¶
type LinearProbeHashTable ¶
type LinearProbeHashTable struct {
// contains filtered or unexported fields
}
*
- Implementation of linear probing hash table that is backed by a buffer pool
- manager. Non-unique keys are supported. Supports insert and delete. The
- table dynamically grows once full.
TODO: (SDB) LinearProbeHashTable does not dynamically grows...
func NewLinearProbeHashTable ¶
func NewLinearProbeHashTable(bpm *buffer.BufferPoolManager, numBuckets int, headerPageId types.PageID) *LinearProbeHashTable
func (*LinearProbeHashTable) GetHeaderPageId ¶ added in v0.0.2
func (ht *LinearProbeHashTable) GetHeaderPageId() types.PageID
func (*LinearProbeHashTable) GetValue ¶
func (ht *LinearProbeHashTable) GetValue(key []byte) []uint32
func (*LinearProbeHashTable) Insert ¶
func (ht *LinearProbeHashTable) Insert(key []byte, value uint32) (err error)
func (*LinearProbeHashTable) Remove ¶
func (ht *LinearProbeHashTable) Remove(key []byte, value uint32)
type TmpTuple ¶
type TmpTuple struct {
// contains filtered or unexported fields
}
when doing hash join we create a temp page to store all the tuple from left table which corresponds to the input key from right tuple so that we can refer to this page when calling Next from the hash join executor
type TmpTuplePage ¶
*
- TmpTuplePage format: *
- Sizes are in bytes.
- | PageId (4) | LSN (4) | FreeSpace (4) | (free space) | TupleSize2 | TupleData2 | TupleSize1 | TupleData1 | *
- We choose this format because DeserializeExpression expects to read Size followed by Data.
func CastPageAsTmpTuplePage ¶
func CastPageAsTmpTuplePage(page *page.Page) *TmpTuplePage
CastPageAsTmpTuplePage casts the abstract Page struct into TmpTuplePage
func (*TmpTuplePage) GetFreeSpacePointer ¶
func (p *TmpTuplePage) GetFreeSpacePointer() uint32
func (*TmpTuplePage) GetNextPosToInsert ¶
func (p *TmpTuplePage) GetNextPosToInsert() []byte
func (*TmpTuplePage) GetOffset ¶
func (p *TmpTuplePage) GetOffset() uint32
func (*TmpTuplePage) GetTablePageId ¶
func (p *TmpTuplePage) GetTablePageId() types.PageID
func (*TmpTuplePage) Init ¶
func (p *TmpTuplePage) Init(page_id types.PageID, page_size uint32)
similar code learned from table_page.h/cpp :)
func (*TmpTuplePage) Insert ¶
func (p *TmpTuplePage) Insert(tuple_ *tuple.Tuple, out *TmpTuple) bool
func (*TmpTuplePage) SetFreeSpacePointer ¶
func (p *TmpTuplePage) SetFreeSpacePointer(size uint32)
func (*TmpTuplePage) SetPageId ¶
func (p *TmpTuplePage) SetPageId(page_id types.PageID)
Click to show internal directories.
Click to hide internal directories.