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

Method writeValue

cmd/super/compile/shared.go:129–143  ·  view source on GitHub ↗
(ctx context.Context, v any)

Source from the content-addressed store, hash-verified

127}
128
129func (s *Shared) writeValue(ctx context.Context, v any) error {
130 val, err := sup.MarshalBSUP(v)
131 if err != nil {
132 return err
133 }
134 writer, err := s.OutputFlags.Open(ctx, storage.NewLocalEngine())
135 if err != nil {
136 return err
137 }
138 err = vio.Copy(writer, sbuf.ValToPuller(super.NewContext(), val))
139 if closeErr := writer.Close(); err == nil {
140 err = closeErr
141 }
142 return err
143}
144
145func printRuntime(r exec.Runtime) {
146 fmt.Fprintf(os.Stderr, "runtime: %s\n", r)

Callers 1

RunMethod · 0.95

Calls 7

MarshalBSUPFunction · 0.92
NewLocalEngineFunction · 0.92
CopyFunction · 0.92
ValToPullerFunction · 0.92
NewContextFunction · 0.92
CloseMethod · 0.65
OpenMethod · 0.45

Tested by

no test coverage detected