Decode decodes multiple rows of Decoder.intermChk and stores the result in chk.
(chk *Chunk)
| 256 | |
| 257 | // Decode decodes multiple rows of Decoder.intermChk and stores the result in chk. |
| 258 | func (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. |