diff --git a/pkg/parquetquery/iters.go b/pkg/parquetquery/iters.go index 7d8aea60bc4..ee747018258 100644 --- a/pkg/parquetquery/iters.go +++ b/pkg/parquetquery/iters.go @@ -9,8 +9,8 @@ import ( "math" "sync" "sync/atomic" + "unique" - "github.com/grafana/tempo/pkg/parquetquery/intern" "github.com/grafana/tempo/pkg/util" pq "github.com/parquet-go/parquet-go" "go.opentelemetry.io/otel" @@ -781,7 +781,6 @@ type SyncIteratorOpt func(*SyncIterator) func SyncIteratorOptIntern() SyncIteratorOpt { return func(i *SyncIterator) { i.intern = true - i.interner = intern.New() } } @@ -814,8 +813,7 @@ type SyncIterator struct { currPageN int at IteratorResult // Current value pointed at by iterator. Returned by call Next and SeekTo, valid until next call. - intern bool - interner *intern.Interner + intern bool } var _ Iterator = (*SyncIterator)(nil) @@ -1248,7 +1246,7 @@ func (c *SyncIterator) makeResult(t RowNumber, v *pq.Value) *IteratorResult { // always have length 0 or 1. if len(c.at.Entries) == 1 { if c.intern { - c.at.Entries[0].Value = c.interner.UnsafeClone(v) + c.at.Entries[0].Value = *unique.Make(v).Value() } else { c.at.Entries[0].Value = v.Clone() } @@ -1259,12 +1257,7 @@ func (c *SyncIterator) makeResult(t RowNumber, v *pq.Value) *IteratorResult { func (c *SyncIterator) Close() { c.closeCurrRowGroup() - c.span.End() - - if c.intern && c.interner != nil { - c.interner.Close() - } } // ColumnIterator asynchronously iterates through the given row groups and column. Applies