Commit 3388c15
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 ec2c602 commit 3388c15
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
433 | 439 | | |
434 | 440 | | |
435 | 441 | | |
| |||
495 | 501 | | |
496 | 502 | | |
497 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
498 | 507 | | |
499 | 508 | | |
500 | 509 | | |
| |||
0 commit comments