MCPcopy
hub / github.com/uber/aresdb / ReadShardValue

Function ReadShardValue

memstore/memstore_test.go:82–93  ·  view source on GitHub ↗

ReadShardValue reads a value from a shard at given position.

(shard *TableShard, columnID int, primaryKey []byte)

Source from the content-addressed store, hash-verified

80
81// ReadShardValue reads a value from a shard at given position.
82func ReadShardValue(shard *TableShard, columnID int, primaryKey []byte) (unsafe.Pointer, bool) {
83 vp, index := getVectorParty(shard, columnID, primaryKey)
84 if vp == nil {
85 return nil, false
86 }
87
88 validity := vp.GetValidity(index)
89 if validity {
90 return vp.GetDataValue(index).OtherVal, true
91 }
92 return nil, false
93}
94
95// ReadShardBool reads a bool value from a shard at given position.
96func ReadShardBool(shard *TableShard, columnID int, primaryKey []byte) (bool, bool) {

Callers 2

recovery_test.goFile · 0.85
ingestion_test.goFile · 0.85

Calls 3

getVectorPartyFunction · 0.85
GetValidityMethod · 0.65
GetDataValueMethod · 0.65

Tested by

no test coverage detected