|
5 | 5 | { |
6 | 6 | "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;", |
7 | 7 | "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", |
10 | 10 | " └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t2.id1) eq(test.t1.id2, test.t2.id2)]", |
11 | 11 | " ├─IndexReader(Build) root index:IndexFullScan", |
12 | 12 | " │ └─IndexFullScan cop[tikv] table:t2, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
|
18 | 18 | { |
19 | 19 | "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;", |
20 | 20 | "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", |
24 | 24 | " └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t4.id1) eq(test.t1.id2, test.t4.id2)]", |
25 | 25 | " ├─IndexReader(Build) root index:IndexFullScan", |
26 | 26 | " │ └─IndexFullScan cop[tikv] table:t4, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
|
32 | 32 | { |
33 | 33 | "SQL": "SELECT t1.id1, t1.id2, COUNT(t1.id3) FROM t1, t2 WHERE t1.id1 = t2.id1 GROUP BY t1.id1, t1.id2;", |
34 | 34 | "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", |
37 | 37 | " └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t2.id1)]", |
38 | 38 | " ├─IndexReader(Build) root index:IndexFullScan", |
39 | 39 | " │ └─IndexFullScan cop[tikv] table:t2, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
|
45 | 45 | { |
46 | 46 | "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;", |
47 | 47 | "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", |
50 | 50 | " └─HashJoin root inner join, equal:[eq(test.t2.id1, test.t3.id1) eq(test.t2.id2, test.t3.id2)]", |
51 | 51 | " ├─IndexReader(Build) root index:IndexFullScan", |
52 | 52 | " │ └─IndexFullScan cop[tikv] table:t3, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
|
61 | 61 | { |
62 | 62 | "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;", |
63 | 63 | "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", |
66 | 66 | " └─HashJoin root inner join, equal:[eq(test.t2.id1, test.t4.id1) eq(test.t2.id2, test.t4.id2)]", |
67 | 67 | " ├─IndexReader(Build) root index:IndexFullScan", |
68 | 68 | " │ └─IndexFullScan cop[tikv] table:t4, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
|
77 | 77 | { |
78 | 78 | "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;", |
79 | 79 | "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", |
82 | 82 | " └─MergeJoin root inner join, left key:test.t3.id1, test.t3.id2, right key:test.t4.id1, test.t4.id2", |
83 | 83 | " ├─IndexReader(Build) root index:IndexFullScan", |
84 | 84 | " │ └─IndexFullScan cop[tikv] table:t4, index:UK_id1_id2(id1, id2) keep order:true, stats:pseudo", |
|
97 | 97 | { |
98 | 98 | "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;", |
99 | 99 | "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", |
104 | 104 | " │ └─TableReader root data:TableFullScan", |
105 | 105 | " │ └─TableFullScan cop[tikv] table:t1 keep order:false, stats:pseudo", |
106 | 106 | " └─IndexReader(Probe) root index:IndexFullScan", |
|
111 | 111 | { |
112 | 112 | "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;", |
113 | 113 | "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", |
118 | 118 | " │ └─IndexReader root index:IndexFullScan", |
119 | 119 | " │ └─IndexFullScan cop[tikv] table:t2, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
120 | 120 | " └─TableReader(Probe) root data:TableFullScan", |
|
125 | 125 | { |
126 | 126 | "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;", |
127 | 127 | "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", |
129 | 129 | "└─HashJoin root semi join, left side:TableReader, equal:[eq(test.t1.id1, test.t2.id1) eq(test.t1.id2, test.t2.id2)]", |
130 | 130 | " ├─IndexReader(Build) root index:IndexFullScan", |
131 | 131 | " │ └─IndexFullScan cop[tikv] table:t2, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
|
137 | 137 | { |
138 | 138 | "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;", |
139 | 139 | "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", |
142 | 142 | " └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t3.id1) eq(test.t1.id2, test.t3.id2)]", |
143 | 143 | " ├─IndexReader(Build) root index:IndexFullScan", |
144 | 144 | " │ └─IndexFullScan cop[tikv] table:t3, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
|
153 | 153 | { |
154 | 154 | "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;", |
155 | 155 | "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", |
158 | 158 | " └─HashJoin root inner join, equal:[eq(test.t1.id1, test.t4.id1) eq(test.t1.id2, test.t4.id2)]", |
159 | 159 | " ├─IndexReader(Build) root index:IndexFullScan", |
160 | 160 | " │ └─IndexFullScan cop[tikv] table:t4, index:UK_id1_id2(id1, id2) keep order:false, stats:pseudo", |
|
0 commit comments