1[
2    {
3        "testcase": "Outer Hash Join, build inner. Explain",
4        "ignore": "index_id",
5        "explain": {
6            "disabled": false,
7            "results": [
8                {
9                    "present": true
10                }
11            ],
12            "statement": "SELECT true AS present FROM $explan AS p WHERE ANY v WITHIN p.plan.`~children` SATISFIES v.`#operator` = 'HashJoin' END"
13        },
14        "statements":"SELECT c.firstName, c.lastName, c.customerId, p.purchaseId FROM customer c LEFT OUTER JOIN purchase p USE HASH(build) ON c.customerId = p.customerId WHERE c.lastName = \"Wyman\" ORDER BY p.purchaseId LIMIT 10",
15        "ordered": true,
16        "results": [
17        {
18            "customerId": "customer112",
19            "firstName": "Sherwood",
20            "lastName": "Wyman"
21        },
22        {
23            "customerId": "customer729",
24            "firstName": "Emile",
25            "lastName": "Wyman",
26            "purchaseId": "purchase1537"
27        },
28        {
29            "customerId": "customer729",
30            "firstName": "Emile",
31            "lastName": "Wyman",
32            "purchaseId": "purchase1829"
33        },
34        {
35            "customerId": "customer729",
36            "firstName": "Emile",
37            "lastName": "Wyman",
38            "purchaseId": "purchase2308"
39        },
40        {
41            "customerId": "customer605",
42            "firstName": "Sydnie",
43            "lastName": "Wyman",
44            "purchaseId": "purchase2408"
45        },
46        {
47            "customerId": "customer605",
48            "firstName": "Sydnie",
49            "lastName": "Wyman",
50            "purchaseId": "purchase2635"
51        },
52        {
53            "customerId": "customer729",
54            "firstName": "Emile",
55            "lastName": "Wyman",
56            "purchaseId": "purchase2933"
57        },
58        {
59            "customerId": "customer729",
60            "firstName": "Emile",
61            "lastName": "Wyman",
62            "purchaseId": "purchase336"
63        },
64        {
65            "customerId": "customer729",
66            "firstName": "Emile",
67            "lastName": "Wyman",
68            "purchaseId": "purchase3990"
69        },
70        {
71            "customerId": "customer605",
72            "firstName": "Sydnie",
73            "lastName": "Wyman",
74            "purchaseId": "purchase4530"
75        }
76    ]
77    },
78    {
79        "testcase": "Right outer Hash Join, join hint transferred. Explain",
80        "ignore": "index_id",
81        "explain": {
82            "disabled": false,
83            "results": [
84                {
85                    "present": true
86                }
87            ],
88            "statement": "SELECT true AS present FROM $explan AS p WHERE ANY v WITHIN p.plan.`~children` SATISFIES v.`#operator` = 'HashJoin' END"
89        },
90        "statements":"SELECT c.firstName, c.lastName, c.customerId, p.purchaseId FROM purchase p RIGHT OUTER JOIN customer c USE HASH(probe) ON c.customerId = p.customerId WHERE c.lastName = \"Wyman\" ORDER BY p.purchaseId LIMIT 10",
91        "ordered": true,
92        "results": [
93        {
94            "customerId": "customer112",
95            "firstName": "Sherwood",
96            "lastName": "Wyman"
97        },
98        {
99            "customerId": "customer729",
100            "firstName": "Emile",
101            "lastName": "Wyman",
102            "purchaseId": "purchase1537"
103        },
104        {
105            "customerId": "customer729",
106            "firstName": "Emile",
107            "lastName": "Wyman",
108            "purchaseId": "purchase1829"
109        },
110        {
111            "customerId": "customer729",
112            "firstName": "Emile",
113            "lastName": "Wyman",
114            "purchaseId": "purchase2308"
115        },
116        {
117            "customerId": "customer605",
118            "firstName": "Sydnie",
119            "lastName": "Wyman",
120            "purchaseId": "purchase2408"
121        },
122        {
123            "customerId": "customer605",
124            "firstName": "Sydnie",
125            "lastName": "Wyman",
126            "purchaseId": "purchase2635"
127        },
128        {
129            "customerId": "customer729",
130            "firstName": "Emile",
131            "lastName": "Wyman",
132            "purchaseId": "purchase2933"
133        },
134        {
135            "customerId": "customer729",
136            "firstName": "Emile",
137            "lastName": "Wyman",
138            "purchaseId": "purchase336"
139        },
140        {
141            "customerId": "customer729",
142            "firstName": "Emile",
143            "lastName": "Wyman",
144            "purchaseId": "purchase3990"
145        },
146        {
147            "customerId": "customer605",
148            "firstName": "Sydnie",
149            "lastName": "Wyman",
150            "purchaseId": "purchase4530"
151        }
152    ]
153    },
154    {
155        "testcase": "Right outer join, Hash Join build dominant, USE HASH hint ignored. Explain",
156        "ignore": "index_id",
157        "explain": {
158            "disabled": false,
159            "results": [
160                {
161                    "present": true
162                }
163            ],
164            "statement": "SELECT true AS present FROM $explan AS p WHERE ANY v WITHIN p.plan.`~children` SATISFIES v.`#operator` = 'NestedLoopJoin' END"
165        },
166        "statements":"SELECT c.firstName, c.lastName, c.customerId, p.purchaseId FROM purchase p USE HASH(probe) RIGHT OUTER JOIN customer c ON c.customerId = p.customerId WHERE c.lastName = \"Wyman\" ORDER BY p.purchaseId LIMIT 10",
167        "ordered": true,
168        "results": [
169        {
170            "customerId": "customer112",
171            "firstName": "Sherwood",
172            "lastName": "Wyman"
173        },
174        {
175            "customerId": "customer729",
176            "firstName": "Emile",
177            "lastName": "Wyman",
178            "purchaseId": "purchase1537"
179        },
180        {
181            "customerId": "customer729",
182            "firstName": "Emile",
183            "lastName": "Wyman",
184            "purchaseId": "purchase1829"
185        },
186        {
187            "customerId": "customer729",
188            "firstName": "Emile",
189            "lastName": "Wyman",
190            "purchaseId": "purchase2308"
191        },
192        {
193            "customerId": "customer605",
194            "firstName": "Sydnie",
195            "lastName": "Wyman",
196            "purchaseId": "purchase2408"
197        },
198        {
199            "customerId": "customer605",
200            "firstName": "Sydnie",
201            "lastName": "Wyman",
202            "purchaseId": "purchase2635"
203        },
204        {
205            "customerId": "customer729",
206            "firstName": "Emile",
207            "lastName": "Wyman",
208            "purchaseId": "purchase2933"
209        },
210        {
211            "customerId": "customer729",
212            "firstName": "Emile",
213            "lastName": "Wyman",
214            "purchaseId": "purchase336"
215        },
216        {
217            "customerId": "customer729",
218            "firstName": "Emile",
219            "lastName": "Wyman",
220            "purchaseId": "purchase3990"
221        },
222        {
223            "customerId": "customer605",
224            "firstName": "Sydnie",
225            "lastName": "Wyman",
226            "purchaseId": "purchase4530"
227        }
228    ]
229    },
230    {
231        "testcase": "Left outer join, Hash Join build dominant, USE HASH hint ignored. Explain",
232        "ignore": "index_id",
233        "explain": {
234            "disabled": false,
235            "results": [
236                {
237                    "present": true
238                }
239            ],
240            "statement": "SELECT true AS present FROM $explan AS p WHERE ANY v WITHIN p.plan.`~children` SATISFIES v.`#operator` = 'NestedLoopJoin' END"
241        },
242        "statements":"SELECT c.firstName, c.lastName, c.customerId, p.purchaseId FROM customer c LEFT OUTER JOIN purchase p USE HASH(probe) ON c.customerId = p.customerId WHERE c.lastName = \"Wyman\" ORDER BY p.purchaseId LIMIT 10",
243        "ordered": true,
244        "results": [
245        {
246            "customerId": "customer112",
247            "firstName": "Sherwood",
248            "lastName": "Wyman"
249        },
250        {
251            "customerId": "customer729",
252            "firstName": "Emile",
253            "lastName": "Wyman",
254            "purchaseId": "purchase1537"
255        },
256        {
257            "customerId": "customer729",
258            "firstName": "Emile",
259            "lastName": "Wyman",
260            "purchaseId": "purchase1829"
261        },
262        {
263            "customerId": "customer729",
264            "firstName": "Emile",
265            "lastName": "Wyman",
266            "purchaseId": "purchase2308"
267        },
268        {
269            "customerId": "customer605",
270            "firstName": "Sydnie",
271            "lastName": "Wyman",
272            "purchaseId": "purchase2408"
273        },
274        {
275            "customerId": "customer605",
276            "firstName": "Sydnie",
277            "lastName": "Wyman",
278            "purchaseId": "purchase2635"
279        },
280        {
281            "customerId": "customer729",
282            "firstName": "Emile",
283            "lastName": "Wyman",
284            "purchaseId": "purchase2933"
285        },
286        {
287            "customerId": "customer729",
288            "firstName": "Emile",
289            "lastName": "Wyman",
290            "purchaseId": "purchase336"
291        },
292        {
293            "customerId": "customer729",
294            "firstName": "Emile",
295            "lastName": "Wyman",
296            "purchaseId": "purchase3990"
297        },
298        {
299            "customerId": "customer605",
300            "firstName": "Sydnie",
301            "lastName": "Wyman",
302            "purchaseId": "purchase4530"
303        }
304    ]
305    }
306]
307
308