MCPcopy Create free account
hub / github.com/pingcap/tidb / NewByteDecoder

Function NewByteDecoder

pkg/util/rowcodec/decoder.go:390–399  ·  view source on GitHub ↗

NewByteDecoder creates a BytesDecoder. defBytes: provided default value bytes in old datum format(flag+colData).

(columns []ColInfo, handleColIDs []int64, defBytes func(i int) ([]byte, error), loc *time.Location)

Source from the content-addressed store, hash-verified

388// NewByteDecoder creates a BytesDecoder.
389// defBytes: provided default value bytes in old datum format(flag+colData).
390func NewByteDecoder(columns []ColInfo, handleColIDs []int64, defBytes func(i int) ([]byte, error), loc *time.Location) *BytesDecoder {
391 return &BytesDecoder{
392 decoder: decoder{
393 columns: columns,
394 handleColIDs: handleColIDs,
395 loc: loc,
396 },
397 defBytes: defBytes,
398 }
399}
400
401func (decoder *BytesDecoder) decodeToBytesInternal(outputOffset map[int64]int, handle kv.Handle, value []byte, cacheBytes []byte) ([][]byte, error) {
402 var r row

Callers 10

buildTableScanMethod · 0.92
buildMemTableReaderFunction · 0.92
getColIDAndPkColIDsFunction · 0.92
decodeRestoredValuesFunction · 0.92
decodeRestoredValuesV5Function · 0.92
TestDecodeRowWithHandleFunction · 0.92
TestTypesNewRowCodecFunction · 0.92
TestNilAndDefaultFunction · 0.92
TestVarintCompatibilityFunction · 0.92

Calls

no outgoing calls

Tested by 4

TestDecodeRowWithHandleFunction · 0.74
TestTypesNewRowCodecFunction · 0.74
TestNilAndDefaultFunction · 0.74
TestVarintCompatibilityFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…