seekRowGroup skips ahead to the row group that could contain the value at the desired row number. Does nothing if the current row group is already the correct one.
(seekTo RowNumber, definitionLevel int)
| 639 | // seekRowGroup skips ahead to the row group that could contain the value at the |
| 640 | // desired row number. Does nothing if the current row group is already the correct one. |
| 641 | func (c *SyncIterator) seekRowGroup(seekTo RowNumber, definitionLevel int) (done bool) { |
| 642 | if c.currRowGroup != nil && CompareRowNumbers(definitionLevel, seekTo, c.currRowGroupMax) >= 0 { |
| 643 | // Done with this row group |
| 644 | c.closeCurrRowGroup() |
| 645 | } |
| 646 | |
| 647 | for c.currRowGroup == nil { |
| 648 | |
| 649 | rg, minRN, maxRN := c.popRowGroup() |
| 650 | if rg == nil { |
| 651 | return true |
| 652 | } |
| 653 | |
| 654 | if CompareRowNumbers(definitionLevel, seekTo, maxRN) != -1 { |
| 655 | continue |
| 656 | } |
| 657 | |
| 658 | cc := &ColumnChunkHelper{ColumnChunk: rg.ColumnChunks()[c.column]} |
| 659 | if c.filter != nil && !c.filter.KeepColumnChunk(cc) { |
| 660 | cc.Close() |
| 661 | continue |
| 662 | } |
| 663 | |
| 664 | // This row group matches both row number and filter. |
| 665 | c.setRowGroup(rg, minRN, maxRN, cc) |
| 666 | } |
| 667 | |
| 668 | return c.currRowGroup == nil |
| 669 | } |
| 670 | |
| 671 | // seekPages skips ahead in the current row group to the page that could contain the value at |
| 672 | // the desired row number. Does nothing if the current page is already the correct one. |
no test coverage detected