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