Repository navigation
Commit 633c52d
authored
Return an empty array from fill_null on an empty input (#10627)
## Summary
Closes #10626.
- `FillNull::execute` now returns an empty canonical array of the result
dtype (the input dtype with the fill value's nullability) when the input
is empty, before it asks for a scalar fill. Compare and the boolean
operators already return early for empty inputs in the same way.
- New test `empty_input_ignores_non_constant_fill` runs `FillNull` on an
empty input with an empty, non-constant fill and checks the result is
empty and non-nullable.
- New test `repeated_fill_over_empty_chunk` builds a chunked array with
an empty chunk, fills nulls twice and checks the values. This is the
shape the fuzzer found.
---------
Signed-off-by: Vincent <1729065730@qq.com>1 parent 1671cb3 commit 633c52d
1 file changed
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
134 | | - | |
135 | | - | |
136 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
137 | 147 | | |
138 | 148 | | |
139 | 149 | | |
| |||
403 | 413 | | |
404 | 414 | | |
405 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
406 | 438 | | |
407 | 439 | | |
408 | 440 | | |
| |||
0 commit comments