Commit dad8002
authored
[Data] Avoid slicing block when total_pending_rows < target (#58699)
## Description
Previously we will try slice the block when `self._total_pending_rows >=
self._target_num_rows` or `flush_remaining` is True, but flush_remaining
doesn't mean `self._total_pending_rows >= self._target_num_rows ` so it
could make the slicing failed because our slicing logic is based on
assumption there should be at least one full block.
This PR fix the logic and added test for such case.
---------
Signed-off-by: You-Cheng Lin <[email protected]>1 parent 83a456e commit dad8002
File tree
2 files changed
+13
-1
lines changed- python/ray/data
- _internal
- tests/unit
2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| |||
0 commit comments