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

Method DecodeToBytes

pkg/util/rowcodec/decoder.go:487–489  ·  view source on GitHub ↗

DecodeToBytes decodes raw byte slice to row data.

(outputOffset map[int64]int, handle kv.Handle, value []byte, cacheBytes []byte)

Source from the content-addressed store, hash-verified

485
486// DecodeToBytes decodes raw byte slice to row data.
487func (decoder *BytesDecoder) DecodeToBytes(outputOffset map[int64]int, handle kv.Handle, value []byte, cacheBytes []byte) ([][]byte, error) {
488 return decoder.decodeToBytesInternal(outputOffset, handle, value, cacheBytes)
489}
490
491func (*BytesDecoder) encodeOldDatum(tp byte, val []byte) []byte {
492 buf := make([]byte, 0, 1+binary.MaxVarintLen64+len(val))

Callers 6

getRowDataFunction · 0.80
getRowDataMethod · 0.80
TestDecodeRowWithHandleFunction · 0.80
TestTypesNewRowCodecFunction · 0.80
TestNilAndDefaultFunction · 0.80
TestVarintCompatibilityFunction · 0.80

Calls 1

decodeToBytesInternalMethod · 0.95

Tested by 4

TestDecodeRowWithHandleFunction · 0.64
TestTypesNewRowCodecFunction · 0.64
TestNilAndDefaultFunction · 0.64
TestVarintCompatibilityFunction · 0.64