Commit bd4532a
committed
Address Rich-T-kid review on #23128: assert! + comment tightening
* Dispatcher (`mod.rs`): change the `list_size < 0` guard from a
`return not_impl_err!` to a bare `assert!`. `group_column_supported_type`
already rejects negative sizes at the schema-check layer, so any
reachable path with `list_size < 0` is a programmer bug rather than
an unsupported case worth returning gracefully. Split the existing
test into an allow-list case (checked via `bool`) and a dispatcher
case (verified with `#[should_panic]`) so both surfaces stay covered.
* Constructor (`fixed_size_list.rs`): fold the multi-line invariant
comment above `assert!` into the assert message itself, which now
reads "requires non-negative list size (allow-list / dispatcher
should have rejected earlier)". Simpler to read at the panic site,
and the rationale surfaces exactly where a future reader would want
it (the panic backtrace). Same trim on `list_len_usize`.
* Dispatcher consistency-fuzz corpus (`mod.rs`): shorten the
FixedSizeList<non-primitive> comment to a one-liner pointing at
EPIC #22715, instead of the two-line prose explanation.
Tests: `cargo test -p datafusion-physical-plan --lib multi_group_by`
now runs 42/42 (up from 41), including the split negative-size cases
and the new `#[should_panic]` guarantee. Clippy clean.1 parent 56ecc8d commit bd4532a
2 files changed
Lines changed: 33 additions & 41 deletions
File tree
- datafusion/physical-plan/src/aggregates/group_values/multi_group_by
Lines changed: 22 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 63 | | |
69 | 64 | | |
70 | | - | |
| 65 | + | |
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
| |||
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | 77 | | |
| 78 | + | |
| 79 | + | |
88 | 80 | | |
89 | 81 | | |
90 | 82 | | |
| |||
439 | 431 | | |
440 | 432 | | |
441 | 433 | | |
442 | | - | |
443 | | - | |
444 | | - | |
| 434 | + | |
| 435 | + | |
445 | 436 | | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
| 437 | + | |
| 438 | + | |
450 | 439 | | |
451 | 440 | | |
452 | 441 | | |
| |||
458 | 447 | | |
459 | 448 | | |
460 | 449 | | |
| 450 | + | |
461 | 451 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
472 | 464 | | |
| 465 | + | |
| 466 | + | |
473 | 467 | | |
474 | 468 | | |
475 | 469 | | |
| |||
Lines changed: 11 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1096 | 1096 | | |
1097 | 1097 | | |
1098 | 1098 | | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
1109 | 1108 | | |
1110 | 1109 | | |
1111 | 1110 | | |
| |||
1430 | 1429 | | |
1431 | 1430 | | |
1432 | 1431 | | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
| 1432 | + | |
| 1433 | + | |
1436 | 1434 | | |
1437 | 1435 | | |
1438 | 1436 | | |
| |||
0 commit comments