MCPcopy Create free account
hub / github.com/brimdata/super / stringOrBytesContents

Function stringOrBytesContents

runtime/vam/expr/slice.go:257–268  ·  view source on GitHub ↗
(vec vector.Any)

Source from the content-addressed store, hash-verified

255}
256
257func stringOrBytesContents(vec vector.Any) ([]uint32, []byte) {
258 switch vec := vec.(type) {
259 case *vector.String:
260 offsets, bytes := vec.Table().Slices()
261 return offsets, bytes
262 case *vector.Bytes:
263 offsets, bytes := vec.Table().Slices()
264 return offsets, bytes
265 default:
266 panic(vec)
267 }
268}
269
270func arrayOrSetContents(vec vector.Any) ([]uint32, vector.Any) {
271 switch vec := vec.(type) {

Callers 1

evalStringOrBytesFastMethod · 0.85

Calls 2

SlicesMethod · 0.80
TableMethod · 0.45

Tested by

no test coverage detected