Commit 22bd055
committed
fix: support total_size=0 in byte_range_to_row_range
In certain cases DataFusion might decide to create a ranges for
empty files that have zero rows. In order to avoid hitting a
division by zero error in the
```rust
let average_row = total_size / row_count;
```
line, add a case to `byte_range_to_row_range` that returns an empty
0..0 range in cases when row_count is 0.1 parent 18359a8 commit 22bd055
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
435 | 441 | | |
436 | 442 | | |
437 | 443 | | |
| |||
497 | 503 | | |
498 | 504 | | |
499 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
500 | 509 | | |
501 | 510 | | |
502 | 511 | | |
| |||
0 commit comments