Commit dae99ac
authored
feat: selectivity metrics (for Explain Analyze) in Hash Join (apache#18488)
## Which issue does this PR close?
- Closes apache#18409
## What changes are included in this PR?
Added a distinct element calculator in core hash join loop. It also
works on an assumption that indices will be returned in an increasing
order, I couldn't see a place where this assumption is broken, but if
that's not the case, please do help me out.
Also, I am not 100% sure my implementation for `avg_fanout` is correct,
so do let me know if that needs changes.
## Are these changes tested?
No failures in `sqllogictests`/tests in `datafusion/core/tests/sql/`,
should I add a test case for this?1 parent 2a6f3aa commit dae99ac
File tree
3 files changed
+84
-2
lines changed- datafusion
- core/tests/sql
- physical-plan/src/joins
- hash_join
3 files changed
+84
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1156 | 1156 | | |
1157 | 1157 | | |
1158 | 1158 | | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
300 | 329 | | |
301 | 330 | | |
302 | 331 | | |
| |||
480 | 509 | | |
481 | 510 | | |
482 | 511 | | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
483 | 516 | | |
484 | 517 | | |
485 | 518 | | |
| |||
509 | 542 | | |
510 | 543 | | |
511 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
512 | 557 | | |
513 | 558 | | |
514 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
1328 | 1330 | | |
1329 | 1331 | | |
1330 | 1332 | | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
1331 | 1337 | | |
1332 | 1338 | | |
1333 | 1339 | | |
| |||
1371 | 1377 | | |
1372 | 1378 | | |
1373 | 1379 | | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
1374 | 1388 | | |
1375 | 1389 | | |
1376 | 1390 | | |
| |||
1380 | 1394 | | |
1381 | 1395 | | |
1382 | 1396 | | |
| 1397 | + | |
| 1398 | + | |
1383 | 1399 | | |
1384 | 1400 | | |
1385 | 1401 | | |
| |||
0 commit comments