Files
native/proto/col_arr_go123.go
zeekay 765c3d0aa1 hanzo-ds/native: de-branded native protocol lib (fork of clickhouse ch-go v0.71.0)
Module path, package names, and identifiers de-branded to native/proto/compress/
pool/tracing. Server wire-protocol strings preserved. Vendored codec surface used
by hanzo-ds/go (proto + compress).
2026-07-10 13:10:07 -07:00

23 lines
373 B
Go

//go:build go1.23
package proto
import "iter"
// RowRange returns a [iter.Seq] iterator over i-th row.
func (c ColArr[T]) RowRange(i int) iter.Seq[T] {
var start int
end := int(c.Offsets[i])
if i > 0 {
start = int(c.Offsets[i-1])
}
return func(yield func(T) bool) {
for idx := start; idx < end; idx++ {
if !yield(c.Data.Row(idx)) {
return
}
}
}
}