Skip to content

Commit 4d5fc1e

Browse files
added param to pass golden query plans to enginetest
1 parent 96aa709 commit 4d5fc1e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

enginetest/enginetests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,11 @@ func TestReadOnlyDatabases(t *testing.T, harness Harness) {
245245

246246
// Tests generating the correct query plans for various queries using databases and tables provided by the given
247247
// harness.
248-
func TestQueryPlans(t *testing.T, harness Harness) {
248+
func TestQueryPlans(t *testing.T, harness Harness, planTests []queries.QueryPlanTest) {
249249
harness.Setup(setup.SimpleSetup...)
250250
e := mustNewEngine(t, harness)
251251
defer e.Close()
252-
for _, tt := range queries.PlanTests {
252+
for _, tt := range planTests {
253253
TestQueryPlan(t, harness, e, tt.Query, tt.ExpectedPlan)
254254
}
255255
}

enginetest/memory_engine_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ func TestQueryPlans(t *testing.T) {
320320
harness := enginetest.NewMemoryHarness(indexInit.name, 1, 2, indexInit.nativeIndexes, indexInit.driverInitializer)
321321
// The IN expression requires mergeable indexes meaning that an unmergeable index returns a different result, so we skip this test
322322
harness.QueriesToSkip("SELECT a.* FROM mytable a inner join mytable b on (a.i = b.s) WHERE a.i in (1, 2, 3, 4)")
323-
enginetest.TestQueryPlans(t, harness)
323+
enginetest.TestQueryPlans(t, harness, queries.PlanTests)
324324
})
325325
}
326326
}

0 commit comments

Comments
 (0)