Skip to content

another nudge toward the default vector runtime#6727

Merged
mccanne merged 3 commits intomainfrom
vio
Mar 14, 2026
Merged

another nudge toward the default vector runtime#6727
mccanne merged 3 commits intomainfrom
vio

Conversation

@mccanne
Copy link
Collaborator

@mccanne mccanne commented Mar 14, 2026

This commit moves us another step closer to the vam-only runtime. These changes are purely package moves and renames. No code changes.

We created package vio to mirror sbuf and moved the vector interfaces into this package. Also recast vector.Puller/Writer to Pusher/Puller as is idomatic in database engines. The idea here is that the sio writers will become serializers that impelment the vector.Push interface and write to io.Writer. Like now, they'll have close which means flush any partially serialized data to the writer.

We also moved the vam materializer/dematerializer to sbuf to emphasize that it's the bridge to escape into and out of the scode world from the vector runtime.

mccanne added 2 commits March 14, 2026 10:34
This commit moves us another step closer to the vam-only runtime.
These changes are purely package moves and renames.  No code changes.

We created package vio to mirror sbuf and moved the vector interfaces
into this package.  Also recast vector.Puller/Writer to Pusher/Puller
as is idomatic in database engines.  The idea here is that the
sio writers will become serializers that impelment the vector.Push
interface and write to io.Writer.  Like now, they'll have close
which means flush any partially serialized data to the writer.

We also moved the vam materializer/dematerializer to sbuf to emphasize
that it's the bridge to escape into and out of the scode world
from the vector runtime.
// NewWriter returns a writer to w.
func NewWriter(w io.WriteCloser) *csup.Writer {
return csup.NewWriter(w)
// NewSerializer returns a new CSUP serialized that outputs to w.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// NewSerializer returns a new CSUP serialized that outputs to w.
// NewSerializer returns a new CSUP serializer that outputs to w.

vector/named.go Outdated
Comment on lines +29 to +40

type Labeled struct {
Any
Label string
}

func Unlabel(vec Any) (Any, string) {
if vec, ok := vec.(*Labeled); ok {
return vec.Any, vec.Label
}
return vec, ""
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should go in vio too or, barring that, in a separate file since its unrelated to vector.Named.

sbuf/mux.go Outdated
Comment on lines +35 to +58
@@ -55,3 +55,4 @@ func CopyMux(outputs map[string]sio.WriteCloser, parent Puller) error {
batch.Unref()
}
}
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just delete this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meant to!

@mccanne mccanne merged commit e83dede into main Mar 14, 2026
4 checks passed
@mccanne mccanne deleted the vio branch March 14, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants