Skip to content

Commit 34c470d

Browse files
author
James Cor
committed
Merge branch 'main' into james/ctx
2 parents 9572a0d + afe6195 commit 34c470d

File tree

15 files changed

+24608
-22808
lines changed

15 files changed

+24608
-22808
lines changed

enginetest/enginetests.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4773,12 +4773,11 @@ func TestTracing(t *testing.T, harness Harness) {
47734773
require.NoError(t, err)
47744774

47754775
spans := tracer.Spans
4776-
// TODO restore TopN
47774776
var expectedSpans = []string{
4778-
"plan.Limit",
4777+
"plan.Limit", // why Limit if there's already TopN?
4778+
"plan.TopN",
47794779
"plan.Distinct",
47804780
"plan.Project",
4781-
"plan.Sort",
47824781
"plan.IndexedTableAccess",
47834782
}
47844783

enginetest/queries/imdb_plans.go

Lines changed: 23788 additions & 22572 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enginetest/queries/integration_plans.go

Lines changed: 72 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enginetest/queries/queries.go

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10019,6 +10019,103 @@ from typestable`,
1001910019
{uint32(1000)},
1002010020
},
1002110021
},
10022+
10023+
{
10024+
Query: `select distinct pk1 from two_pk order by pk1`,
10025+
Expected: []sql.Row{
10026+
{0},
10027+
{1},
10028+
},
10029+
},
10030+
{
10031+
Query: `select distinct pk2 from two_pk order by pk2`,
10032+
Expected: []sql.Row{
10033+
{0},
10034+
{1},
10035+
},
10036+
},
10037+
{
10038+
Query: `select distinct pk1 from two_pk order by pk2`,
10039+
Expected: []sql.Row{
10040+
{0},
10041+
{1},
10042+
},
10043+
},
10044+
{
10045+
Query: `select distinct pk2 from two_pk order by pk1`,
10046+
Expected: []sql.Row{
10047+
{0},
10048+
{1},
10049+
},
10050+
},
10051+
{
10052+
Query: `select distinct pk1, pk2 from two_pk order by pk1`,
10053+
Expected: []sql.Row{
10054+
{0, 0},
10055+
{0, 1},
10056+
{1, 0},
10057+
{1, 1},
10058+
},
10059+
},
10060+
{
10061+
Query: `select distinct pk1, pk2 from two_pk order by pk2`,
10062+
Expected: []sql.Row{
10063+
{0, 0},
10064+
{1, 0},
10065+
{0, 1},
10066+
{1, 1},
10067+
},
10068+
},
10069+
{
10070+
Query: `select distinct pk1, pk2 from two_pk order by pk1, pk2`,
10071+
Expected: []sql.Row{
10072+
{0, 0},
10073+
{0, 1},
10074+
{1, 0},
10075+
{1, 1},
10076+
},
10077+
},
10078+
{
10079+
Query: `select distinct pk1, pk2 from two_pk order by pk2, pk1`,
10080+
Expected: []sql.Row{
10081+
{0, 0},
10082+
{1, 0},
10083+
{0, 1},
10084+
{1, 1},
10085+
},
10086+
},
10087+
{
10088+
Query: `select distinct pk2, pk1 from two_pk order by pk1, pk2`,
10089+
Expected: []sql.Row{
10090+
{0, 0},
10091+
{1, 0},
10092+
{0, 1},
10093+
{1, 1},
10094+
},
10095+
},
10096+
{
10097+
Query: `select distinct pk2, pk1 from two_pk order by pk2, pk1`,
10098+
Expected: []sql.Row{
10099+
{0, 0},
10100+
{0, 1},
10101+
{1, 0},
10102+
{1, 1},
10103+
},
10104+
},
10105+
{
10106+
Query: `select distinct pk1 + 1 from two_pk order by pk1 + 1`,
10107+
Expected: []sql.Row{
10108+
{1},
10109+
{2},
10110+
},
10111+
},
10112+
{
10113+
Query: `select distinct pk2 + 1 from two_pk order by pk2 + 1`,
10114+
Expected: []sql.Row{
10115+
{1},
10116+
{2},
10117+
},
10118+
},
1002210119
}
1002310120

1002410121
var KeylessQueries = []QueryTest{

0 commit comments

Comments
 (0)