Skip to content

Commit 2249061

Browse files
committed
opt/bench: properly set EvalCtx.Annotations in the harness
This was exposed recently via 8d77202 that triggered some warnings in a couple of benchmarks (before this patch we'd crash with "no Annotations provided" error since we forgot to properly initialize the eval context). Release note: None
1 parent e860c36 commit 2249061

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/sql/opt/bench/bench_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ func newHarness(tb testing.TB, query benchQuery, schemas []string) *harness {
854854
semaCtx: tree.MakeSemaContext(nil /* resolver */),
855855
evalCtx: eval.MakeTestingEvalContext(cluster.MakeTestingClusterSettings()),
856856
}
857+
h.evalCtx.Annotations = &h.semaCtx.Annotations
857858

858859
// Set session settings to their global defaults.
859860
if err := sql.TestingResetSessionVariables(h.ctx, h.evalCtx); err != nil {

0 commit comments

Comments
 (0)