Skip to content

ztest: use storage.InternalEngine for SPQ-style tests#6962

Merged
nwt merged 1 commit into
mainfrom
internalengine
May 19, 2026
Merged

ztest: use storage.InternalEngine for SPQ-style tests#6962
nwt merged 1 commit into
mainfrom
internalengine

Conversation

@nwt
Copy link
Copy Markdown
Member

@nwt nwt commented May 18, 2026

When ztest executes a SPQ-style test, it provides the test's input to the runtime by passing an sio.Reader to runtime.CompileQuery, prompting the compiler to prepend an ast.DefaultScan to the test's AST to signal to the runtime that the flowgraph should read from the sio.Reader. If the same test is executed via the super command, the input will be read via an ast.FileScan, and this different mechanism can produce differently structured vectors. To eliminate that difference, add pkg/storage.InternalEngine and use it in ztest.runInternal to allow SPQ-style tests to read their input from an ast.FileScan rather than an ast.DefaultScan.

When ztest executes a SPQ-style test, it provides the test's input to
the runtime by passing an sio.Reader to runtime.CompileQuery, prompting
the compiler to prepend an ast.DefaultScan to the test's AST to signal
to the runtime that the flowgraph should read from the sio.Reader.  If
the same test is executed via the super command, the input will be read
via an ast.FileScan, and this different mechanism can produce
differently structured vectors.  To eliminate that difference, add
pkg/storage.InternalEngine and use it in ztest.runInternal to allow
SPQ-style tests to read their input from an ast.FileScan rather than an
ast.DefaultScan.
@nwt nwt requested a review from a team May 18, 2026 23:46
@nwt nwt merged commit 59ade20 into main May 19, 2026
2 checks passed
@nwt nwt deleted the internalengine branch May 19, 2026 14:19
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