Files
native/proto/col_map_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

26 lines
417 B
Go

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