()
| 24 | } |
| 25 | |
| 26 | func (p *ResultPool) Get() *IteratorResult { |
| 27 | if x := p.pool.Get(); x != nil { |
| 28 | return x.(*IteratorResult) |
| 29 | } |
| 30 | |
| 31 | return &IteratorResult{ |
| 32 | Entries: make([]struct { |
| 33 | Key string |
| 34 | Value parquet.Value |
| 35 | }, 0, p.cap), |
| 36 | OtherEntries: make([]struct { |
| 37 | Key string |
| 38 | Value any |
| 39 | }, 0, p.cap), |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | func (p *ResultPool) Release(r *IteratorResult) { |
| 44 | r.Reset() |