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

Function decodeRestoredValues

pkg/tablecodec/tablecodec.go:847–859  ·  view source on GitHub ↗
(columns []rowcodec.ColInfo, restoredVal []byte)

Source from the content-addressed store, hash-verified

845}
846
847func decodeRestoredValues(columns []rowcodec.ColInfo, restoredVal []byte) ([][]byte, error) {
848 colIDs := make(map[int64]int, len(columns))
849 for i, col := range columns {
850 colIDs[col.ID] = i
851 }
852 // We don't need to decode handle here, and colIDs >= 0 always.
853 rd := rowcodec.NewByteDecoder(columns, []int64{-1}, nil, nil)
854 resultValues, err := rd.DecodeToBytesNoHandle(colIDs, restoredVal)
855 if err != nil {
856 return nil, errors.Trace(err)
857 }
858 return resultValues, nil
859}
860
861// decodeRestoredValuesV5 decodes index values whose format is introduced in TiDB 5.0.
862// Unlike the format in TiDB 4.0, the new format is optimized for storage space:

Callers 1

decodeIndexKvGeneralFunction · 0.85

Calls 2

NewByteDecoderFunction · 0.92
DecodeToBytesNoHandleMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…