Repository navigation
Commit c9a3fbe
authored
Drop null patch elements when sparse lists share their elements (#11182)
## Summary
Since #11173, sparse lists with a null or empty fill reuse the patch
lists' elements in their output. When the patch lists are already
zero-copy to a list, `MakeExact` only trims the ends, so null patch
lists keep their elements. Those elements are exported and written.
This PR uses `MakeExactWithEmptyNulls` on the null or empty fill path so
that null patches are lists of length 0.
## Changes
- The shared-elements path rebuilds the patch lists with
`MakeExactWithEmptyNulls`.
- If null lists hold nothing, the rebuild returns the array as is;
otherwise the elements become a lazy filter over the ranges valid lists
use.
- `empty_fill_reuses_elements` test now uses a null patch with no
elements.
Signed-off-by: Matt Katz <[email protected]>1 parent fdd96d0 commit c9a3fbe
2 files changed
Lines changed: 43 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
| 381 | + | |
389 | 382 | | |
390 | 383 | | |
391 | 384 | | |
392 | 385 | | |
393 | 386 | | |
394 | 387 | | |
395 | | - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
396 | 391 | | |
| 392 | + | |
397 | 393 | | |
398 | 394 | | |
399 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
72 | 104 | | |
73 | 105 | | |
74 | 106 | | |
| |||
0 commit comments