Skip to content

Commit 6a73fd7

Browse files
committed
additional testcases7
1 parent a6b81c0 commit 6a73fd7

File tree

2 files changed

+52
-52
lines changed

2 files changed

+52
-52
lines changed

pkg/planner/core/casetest/physicalplantest/testdata/cascades_template_out.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
{
66
"SQL": "SELECT t1.id1, t1.id2, SUM(t1.id3) FROM t1, t2 WHERE t1.id1=t2.id1 AND t1.id2=t2.id2 GROUP BY t1.id1, t1.id2;",
77
"Plan": [
8-
"Projection root test.t1.id1, test.t1.id2, Column#11",
9-
"└─Projection root cast(test.t1.id3, decimal(32,0) BINARY)->Column#11, test.t1.id1, test.t1.id2",
8+
"Projection root test.t1.id1, test.t1.id2, Column",
9+
"└─Projection root cast(test.t1.id3, decimal(32,0) BINARY)->Column, test.t1.id1, test.t1.id2",
1010
" └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t2.id1) eq(test.t1.id2, test.t2.id2)]",
1111
" ├─IndexReader(Build) root index:IndexFullScan",
1212
" │ └─IndexFullScan cop[tikv] table:t2, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",
@@ -18,9 +18,9 @@
1818
{
1919
"SQL": "SELECT t1.id1, t1.id2, SUM(t1.id3) FROM t1, t4 WHERE t1.id1=t4.id1 AND t1.id2=t4.id2 GROUP BY t1.id1, t1.id2;",
2020
"Plan": [
21-
"Projection root test.t1.id1, test.t1.id2, Column#11",
22-
"└─HashAgg root group by:Column#16, Column#17, funcs:sum(Column#15)->Column#11, funcs:firstrow(Column#16)->test.t1.id1, funcs:firstrow(Column#17)->test.t1.id2",
23-
" └─Projection root cast(test.t1.id3, decimal(10,0) BINARY)->Column#15, test.t1.id1->Column#16, test.t1.id2->Column#17",
21+
"Projection root test.t1.id1, test.t1.id2, Column",
22+
"└─HashAgg root group by:Column, Column, funcs:sum(Column)->Column, funcs:firstrow(Column)->test.t1.id1, funcs:firstrow(Column)->test.t1.id2",
23+
" └─Projection root cast(test.t1.id3, decimal(10,0) BINARY)->Column, test.t1.id1->Column, test.t1.id2->Column",
2424
" └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t4.id1) eq(test.t1.id2, test.t4.id2)]",
2525
" ├─IndexReader(Build) root index:IndexFullScan",
2626
" │ └─IndexFullScan cop[tikv] table:t4, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",
@@ -32,8 +32,8 @@
3232
{
3333
"SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1, t1.id2;",
3434
"Plan": [
35-
"Projection root test.t1.id1, test.t1.id2, Column#11",
36-
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column#11, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
35+
"Projection root test.t1.id1, test.t1.id2, Column",
36+
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
3737
" └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t2.id1)]",
3838
" ├─IndexReader(Build) root index:IndexFullScan",
3939
" │ └─IndexFullScan cop[tikv] table:t2, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",
@@ -45,8 +45,8 @@
4545
{
4646
"SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1, t2, t3 WHERE t1.id1=t2.id1 AND t1.id2=t2.id2 AND t2.id1=t3.id1 AND t2.id2=t3.id2 GROUP BY t1.id1, t1.id2;",
4747
"Plan": [
48-
"Projection root test.t1.id1, test.t1.id2, Column#16",
49-
"└─Projection root 1->Column#16, test.t1.id1, test.t1.id2",
48+
"Projection root test.t1.id1, test.t1.id2, Column",
49+
"└─Projection root 1->Column, test.t1.id1, test.t1.id2",
5050
" └─HashJoin root inner join, equal:[eq(test.t2.id1, test.t3.id1) eq(test.t2.id2, test.t3.id2)]",
5151
" ├─IndexReader(Build) root index:IndexFullScan",
5252
" │ └─IndexFullScan cop[tikv] table:t3, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",
@@ -61,8 +61,8 @@
6161
{
6262
"SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1, t2, t4 WHERE t1.id1=t2.id1 AND t1.id2=t2.id2 AND t2.id1=t4.id1 AND t2.id2=t4.id2 GROUP BY t1.id1, t1.id2;",
6363
"Plan": [
64-
"Projection root test.t1.id1, test.t1.id2, Column#16",
65-
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column#16, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
64+
"Projection root test.t1.id1, test.t1.id2, Column",
65+
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
6666
" └─HashJoin root inner join, equal:[eq(test.t2.id1, test.t4.id1) eq(test.t2.id2, test.t4.id2)]",
6767
" ├─IndexReader(Build) root index:IndexFullScan",
6868
" │ └─IndexFullScan cop[tikv] table:t4, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",
@@ -77,8 +77,8 @@
7777
{
7878
"SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1, t2, t3, t4 WHERE t1.id1=t2.id1 AND t1.id2=t2.id2 AND t2.id1=t3.id1 AND t2.id2=t3.id2 AND t3.id1=t4.id1 AND t3.id2=t4.id2 GROUP BY t1.id1, t1.id2;",
7979
"Plan": [
80-
"Projection root test.t1.id1, test.t1.id2, Column#21",
81-
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column#21, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
80+
"Projection root test.t1.id1, test.t1.id2, Column",
81+
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
8282
" └─MergeJoin root inner join, left key:test.t3.id1, test.t3.id2, right key:test.t4.id1, test.t4.id2",
8383
" ├─IndexReader(Build) root index:IndexFullScan",
8484
" │ └─IndexFullScan cop[tikv] table:t4, index:UK_id1_id2(id1, id2) keep order:true, stats:pseudo",
@@ -97,10 +97,10 @@
9797
{
9898
"SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1, t2 WHERE ABS(t1.id1) = t2.id1 AND t1.id2 = t2.id2 GROUP BY t1.id1, t1.id2;",
9999
"Plan": [
100-
"Projection root test.t1.id1, test.t1.id2, Column#11",
101-
"└─Projection root 1->Column#11, test.t1.id1, test.t1.id2",
102-
" └─HashJoin root inner join, equal:[eq(test.t2.id2, test.t1.id2) eq(test.t2.id1, Column#12)]",
103-
" ├─Projection(Build) root test.t1.id1, test.t1.id2, abs(test.t1.id1)->Column#12",
100+
"Projection root test.t1.id1, test.t1.id2, Column",
101+
"└─Projection root 1->Column, test.t1.id1, test.t1.id2",
102+
" └─HashJoin root inner join, equal:[eq(test.t2.id2, test.t1.id2) eq(test.t2.id1, Column)]",
103+
" ├─Projection(Build) root test.t1.id1, test.t1.id2, abs(test.t1.id1)->Column",
104104
" │ └─TableReader root data:TableFullScan",
105105
" │ └─TableFullScan cop[tikv] table:t1 keep order:false, stats:pseudo",
106106
" └─IndexReader(Probe) root index:IndexFullScan",
@@ -111,10 +111,10 @@
111111
{
112112
"SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1, t2 WHERE t1.id1 = ABS(t2.id1) AND t1.id2 = t2.id2 GROUP BY t1.id1, t1.id2;",
113113
"Plan": [
114-
"Projection root test.t1.id1, test.t1.id2, Column#11",
115-
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column#11, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
116-
" └─HashJoin root inner join, equal:[eq(test.t1.id2, test.t2.id2) eq(test.t1.id1, Column#12)]",
117-
" ├─Projection(Build) root test.t2.id2, abs(test.t2.id1)->Column#12",
114+
"Projection root test.t1.id1, test.t1.id2, Column",
115+
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
116+
" └─HashJoin root inner join, equal:[eq(test.t1.id2, test.t2.id2) eq(test.t1.id1, Column)]",
117+
" ├─Projection(Build) root test.t2.id2, abs(test.t2.id1)->Column",
118118
" │ └─IndexReader root index:IndexFullScan",
119119
" │ └─IndexFullScan cop[tikv] table:t2, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",
120120
" └─TableReader(Probe) root data:TableFullScan",
@@ -125,7 +125,7 @@
125125
{
126126
"SQL": "SELECT t1.id1, t1.id2, SUM(t1.id3) FROM t1 WHERE EXISTS ( SELECT 1 FROM t2 WHERE t1.id1=t2.id1 AND t1.id2=t2.id2 ) GROUP BY t1.id1, t1.id2;",
127127
"Plan": [
128-
"Projection root test.t1.id1, test.t1.id2, cast(test.t1.id3, decimal(32,0) BINARY)->Column#12",
128+
"Projection root test.t1.id1, test.t1.id2, cast(test.t1.id3, decimal(32,0) BINARY)->Column",
129129
"└─HashJoin root semi join, left side:TableReader, equal:[eq(test.t1.id1, test.t2.id1) eq(test.t1.id2, test.t2.id2)]",
130130
" ├─IndexReader(Build) root index:IndexFullScan",
131131
" │ └─IndexFullScan cop[tikv] table:t2, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",
@@ -137,8 +137,8 @@
137137
{
138138
"SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1 left join t2 on t1.id1 = t2.id1 and t1.id2 = t2.id2 inner join t3 on t1.id1 = t3.id1 and t1.id2 = t3.id2 GROUP BY t1.id1, t1.id2;",
139139
"Plan": [
140-
"Projection root test.t1.id1, test.t1.id2, Column#16",
141-
"└─Projection root 1->Column#16, test.t1.id1, test.t1.id2",
140+
"Projection root test.t1.id1, test.t1.id2, Column",
141+
"└─Projection root 1->Column, test.t1.id1, test.t1.id2",
142142
" └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t3.id1) eq(test.t1.id2, test.t3.id2)]",
143143
" ├─IndexReader(Build) root index:IndexFullScan",
144144
" │ └─IndexFullScan cop[tikv] table:t3, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",
@@ -153,8 +153,8 @@
153153
{
154154
"SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1 left join t2 on t1.id1 = t2.id1 and t1.id2 = t2.id2 inner join t4 on t1.id1 = t4.id1 and t1.id2 = t4.id2 GROUP BY t1.id1, t1.id2;",
155155
"Plan": [
156-
"Projection root test.t1.id1, test.t1.id2, Column#16",
157-
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column#16, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
156+
"Projection root test.t1.id1, test.t1.id2, Column",
157+
"└─HashAgg root group by:test.t1.id1, test.t1.id2, funcs:count(test.t1.id3)->Column, funcs:firstrow(test.t1.id1)->test.t1.id1, funcs:firstrow(test.t1.id2)->test.t1.id2",
158158
" └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t4.id1) eq(test.t1.id2, test.t4.id2)]",
159159
" ├─IndexReader(Build) root index:IndexFullScan",
160160
" │ └─IndexFullScan cop[tikv] table:t4, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo",

0 commit comments

Comments
 (0)