MCPcopy
hub / github.com/grafana/tempo / collect

Method collect

pkg/parquetquery/iters.go:1576–1606  ·  view source on GitHub ↗

Collect data from the given iterators until they point at the next row (according to the configured definition level) or are exhausted.

()

Source from the content-addressed store, hash-verified

1574// the next row (according to the configured definition level)
1575// or are exhausted.
1576func (j *LeftJoinIterator) collect() error {
1577 var err error
1578
1579 rowNumber := j.peeksRequired[0].RowNumber
1580
1581 j.collector.Reset(rowNumber)
1582
1583 // Always collect required.
1584 err = j.collectRequired(rowNumber)
1585 if err != nil {
1586 return err
1587 }
1588
1589 // Fast path - no optional iterators we are done.
1590 if len(j.optional) == 0 {
1591 return nil
1592 }
1593
1594 // Collect is only called after we have found a match among all
1595 // required iterators, therefore we only need to seek the optional ones to same location.
1596 err = j.seekAllOptional(rowNumber, j.defLevelsRequired[0])
1597 if err != nil {
1598 return err
1599 }
1600
1601 err = j.collectOptional(rowNumber)
1602 if err != nil {
1603 return err
1604 }
1605 return nil
1606}
1607
1608func (j *LeftJoinIterator) Close() {
1609 for _, i := range j.required {

Callers 1

NextMethod · 0.95

Calls 4

collectRequiredMethod · 0.95
seekAllOptionalMethod · 0.95
collectOptionalMethod · 0.95
ResetMethod · 0.65

Tested by

no test coverage detected