Source File
utils.go
Belonging Package
github.com/polarsignals/frostdb/pqarrow/arrowutils
package arrowutilsimport ()// ArrayConcatenator is an object that helps callers keep track of a slice of// arrays and concatenate them into a single one when needed. This is more// efficient and memory safe than using a builder.type ArrayConcatenator struct {arrs []arrow.Array}func ( *ArrayConcatenator) ( arrow.Array) {.arrs = append(.arrs, )}func ( *ArrayConcatenator) ( memory.Allocator) (arrow.Array, error) {, := array.Concatenate(.arrs, )if != nil {return nil,}.arrs = .arrs[:0]return ,}func ( *ArrayConcatenator) () int {return len(.arrs)}func ( *ArrayConcatenator) () {for , := range .arrs {.Release()}.arrs = .arrs[:0]}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |