( width int, data []byte)
| 309 | } |
| 310 | |
| 311 | func (p *baseRowsEventParser) parseUsedColumns( |
| 312 | width int, |
| 313 | data []byte) ( |
| 314 | usedColumns []ColumnDescriptor, |
| 315 | remaining []byte, |
| 316 | err error) { |
| 317 | |
| 318 | usedColumnBits, remaining, err := readBitArray(data, width) |
| 319 | if err != nil { |
| 320 | return nil, nil, err |
| 321 | } |
| 322 | |
| 323 | allColumns := p.context.ColumnDescriptors() |
| 324 | |
| 325 | usedColumns = make([]ColumnDescriptor, 0, 0) |
| 326 | for idx := 0; idx < width; idx++ { |
| 327 | if usedColumnBits[idx] { |
| 328 | usedColumns = append(usedColumns, allColumns[idx]) |
| 329 | } |
| 330 | } |
| 331 | return usedColumns, remaining, nil |
| 332 | } |
| 333 | |
| 334 | func (p *baseRowsEventParser) parseRow( |
| 335 | usedColumns []ColumnDescriptor, |
no test coverage detected