MCPcopy Create free account
hub / github.com/apecloud/myduckserver / TestQueryPlans

Function TestQueryPlans

main_test.go:601–614  ·  view source on GitHub ↗

Tests of choosing the correct execution plan independent of result correctness. Mostly useful for confirming that the right indexes are being used for joining tables.

(t *testing.T)

Source from the content-addressed store, hash-verified

599}
600
601func TestSingleQueryPlan(t *testing.T) {
602 t.Skip()
603 tt := []queries.QueryPlanTest{
604 {
605 Query: `SELECT mytable.i, selfjoin.i FROM mytable INNER JOIN mytable selfjoin ON mytable.i = selfjoin.i WHERE selfjoin.i IN (SELECT 1 FROM DUAL)`,
606 ExpectedPlan: "Project\n" +
607 " ├─ columns: [mytable.i:0!null, selfjoin.i:2!null]\n" +
608 " └─ SemiJoin\n" +
609 " ├─ MergeJoin\n" +
610 " │ ├─ cmp: Eq\n" +
611 " │ │ ├─ mytable.i:0!null\n" +
612 " │ │ └─ selfjoin.i:2!null\n" +
613 " │ ├─ IndexedTableAccess(mytable)\n" +
614 " │ │ ├─ index: [mytable.i,mytable.s]\n" +
615 " │ │ ├─ static: [{[NULL, ∞), [NULL, ∞)}]\n" +
616 " │ │ ├─ colSet: (1,2)\n" +
617 " │ │ ├─ tableId: 1\n" +

Callers

nothing calls this directly

Calls 2

NewDuckHarnessFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected