Repository navigation
Commit e73c844
Remove repeated elements from IN lists
DataFusion builds the IN list of a hash join filter from the keys of
the build side, which repeat. Each repeat makes the conversion and the
lookup more costly.
- `in_list_of` removes equal elements after it sorts them. One null
keeps the SQL semantics.
- The DataFusion converter converts equal literals once.
- The converter reads the type and nullability of a predicate, and does
not ask for its return field. DataFusion names that field by
formatting the whole expression, which for a large IN list costs more
than the conversion.
- `contiguous_integer_bounds` checks the dtype before it views a scalar
as a primitive, because a failed view builds an error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Kruszewski <github@robertk.io>1 parent 86d2845 commit e73c844
3 files changed
Lines changed: 48 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1208 | 1208 | | |
1209 | 1209 | | |
1210 | 1210 | | |
| 1211 | + | |
| 1212 | + | |
1211 | 1213 | | |
1212 | 1214 | | |
1213 | 1215 | | |
1214 | 1216 | | |
1215 | 1217 | | |
| 1218 | + | |
1216 | 1219 | | |
1217 | 1220 | | |
1218 | 1221 | | |
| |||
1224 | 1227 | | |
1225 | 1228 | | |
1226 | 1229 | | |
1227 | | - | |
1228 | | - | |
| 1230 | + | |
| 1231 | + | |
1229 | 1232 | | |
1230 | 1233 | | |
| 1234 | + | |
1231 | 1235 | | |
1232 | 1236 | | |
1233 | 1237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
277 | 284 | | |
278 | 285 | | |
279 | 286 | | |
| |||
442 | 449 | | |
443 | 450 | | |
444 | 451 | | |
| 452 | + | |
| 453 | + | |
445 | 454 | | |
446 | 455 | | |
447 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
448 | 462 | | |
449 | 463 | | |
450 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
368 | 395 | | |
369 | 396 | | |
370 | 397 | | |
| |||
0 commit comments