Help us shape the future of Go! Take the 2026 Go Developer Survey

exec

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package exec drives a physical operator tree to completion.

It is a SERIAL driver, and it stayed one. This doc used to say "the seam where morsel-driven parallelism arrives in v0.2 is here and only here", and step 5 put parallelism somewhere else entirely: physical.parallelOp wraps the pipeline below this loop, so a query runs on N threads without exec knowing. The prediction was wrong about the place, and the reason is worth keeping — parallelOp's round-robin dispatch is what BUYS input order structurally, and a scheduler here would have to re-establish it, which is the harder problem.

What is still true: nothing here knows about spilling, budgets or temporary files. Every one of those lives below, which is why three operators gained the ability to spill without this file changing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Batches

func Batches(ctx context.Context, root physical.Operator) iter.Seq2[*data.Batch, error]

Batches streams results without materialising the whole frame.

The iterator yields (batch, nil) until the stream ends, or (nil, err) once on failure and then stops. Breaking out of the range loop closes the operator tree, which is what makes an early `break` safe.

func Collect

func Collect(ctx context.Context, root physical.Operator) (*data.Batch, error)

Collect runs the tree to completion and concatenates every batch.

func Count

func Count(ctx context.Context, root physical.Operator) (int64, error)

Count runs the tree and returns the row count without retaining any batch.

func Schema

func Schema(root physical.Operator) *dtype.Schema

Schema returns the tree's output schema without executing it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL