MCPcopy Index your code
hub / github.com/pingcap/tidb / Decode

Method Decode

pkg/util/chunk/codec.go:258–269  ·  view source on GitHub ↗

Decode decodes multiple rows of Decoder.intermChk and stores the result in chk.

(chk *Chunk)

Source from the content-addressed store, hash-verified

256
257// Decode decodes multiple rows of Decoder.intermChk and stores the result in chk.
258func (c *Decoder) Decode(chk *Chunk) {
259 requiredRows := chk.RequiredRows() - chk.NumRows()
260 // Set the requiredRows to a multiple of 8.
261 requiredRows = (requiredRows + 7) >> 3 << 3
262 if requiredRows > c.remainedRows {
263 requiredRows = c.remainedRows
264 }
265 for i := range chk.NumCols() {
266 c.decodeColumn(chk, i, requiredRows)
267 }
268 c.remainedRows -= requiredRows
269}
270
271// Reset decodes data and store the result in Decoder.intermChk. This decode phase uses pointer operations with less
272// CPU and memory costs.

Callers 15

getPrometheusAddrMethod · 0.95
RunTestStatusAPIMethod · 0.95
TestAllServerInfoFunction · 0.95
TestRegionsFromMetaFunction · 0.95
TestTiFlashReplicaFunction · 0.95
TestServerInfoFunction · 0.95
TestGetSchemaStorageFunction · 0.95
TestIngestParamFunction · 0.95
TestRegionsAPIFunction · 0.95
TestRangesAPIFunction · 0.95

Calls 4

decodeColumnMethod · 0.95
RequiredRowsMethod · 0.80
NumRowsMethod · 0.65
NumColsMethod · 0.65

Tested by 15

TestAllServerInfoFunction · 0.76
TestRegionsFromMetaFunction · 0.76
TestTiFlashReplicaFunction · 0.76
TestServerInfoFunction · 0.76
TestGetSchemaStorageFunction · 0.76
TestIngestParamFunction · 0.76
TestRegionsAPIFunction · 0.76
TestRangesAPIFunction · 0.76
regionContainsTableMethod · 0.76
TestListTableRegionsFunction · 0.76
TestListTableRangesFunction · 0.76