Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions enginetest/enginetests.go
Original file line number Diff line number Diff line change
Expand Up @@ -4773,12 +4773,11 @@ func TestTracing(t *testing.T, harness Harness) {
require.NoError(t, err)

spans := tracer.Spans
// TODO restore TopN
var expectedSpans = []string{
"plan.Limit",
"plan.Limit", // why Limit if there's already TopN?
"plan.TopN",
"plan.Distinct",
"plan.Project",
"plan.Sort",
"plan.IndexedTableAccess",
}

Expand Down
46,360 changes: 23,788 additions & 22,572 deletions enginetest/queries/imdb_plans.go

Large diffs are not rendered by default.

144 changes: 72 additions & 72 deletions enginetest/queries/integration_plans.go

Large diffs are not rendered by default.

97 changes: 97 additions & 0 deletions enginetest/queries/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -10019,6 +10019,103 @@ from typestable`,
{uint32(1000)},
},
},

{
Query: `select distinct pk1 from two_pk order by pk1`,
Expected: []sql.Row{
{0},
{1},
},
},
{
Query: `select distinct pk2 from two_pk order by pk2`,
Expected: []sql.Row{
{0},
{1},
},
},
{
Query: `select distinct pk1 from two_pk order by pk2`,
Expected: []sql.Row{
{0},
{1},
},
},
{
Query: `select distinct pk2 from two_pk order by pk1`,
Expected: []sql.Row{
{0},
{1},
},
},
{
Query: `select distinct pk1, pk2 from two_pk order by pk1`,
Expected: []sql.Row{
{0, 0},
{0, 1},
{1, 0},
{1, 1},
},
},
{
Query: `select distinct pk1, pk2 from two_pk order by pk2`,
Expected: []sql.Row{
{0, 0},
{1, 0},
{0, 1},
{1, 1},
},
},
{
Query: `select distinct pk1, pk2 from two_pk order by pk1, pk2`,
Expected: []sql.Row{
{0, 0},
{0, 1},
{1, 0},
{1, 1},
},
},
{
Query: `select distinct pk1, pk2 from two_pk order by pk2, pk1`,
Expected: []sql.Row{
{0, 0},
{1, 0},
{0, 1},
{1, 1},
},
},
{
Query: `select distinct pk2, pk1 from two_pk order by pk1, pk2`,
Expected: []sql.Row{
{0, 0},
{1, 0},
{0, 1},
{1, 1},
},
},
{
Query: `select distinct pk2, pk1 from two_pk order by pk2, pk1`,
Expected: []sql.Row{
{0, 0},
{0, 1},
{1, 0},
{1, 1},
},
},
{
Query: `select distinct pk1 + 1 from two_pk order by pk1 + 1`,
Expected: []sql.Row{
{1},
{2},
},
},
{
Query: `select distinct pk2 + 1 from two_pk order by pk2 + 1`,
Expected: []sql.Row{
{1},
{2},
},
},
}

var KeylessQueries = []QueryTest{
Expand Down
Loading
Loading