Commit aeeb0ba
authored
fix(datafusion-cli): solve row count bug adding
Currently `print_options::MaxRows::Unlimited` basically always panics
with `attempt to add with overflow`, because we are summing `usize::MAX`
with a positive number.
`saturating_add` solves this issue
# MRE
```rs
fn main() {
let max = usize::MAX;
println!("max: {}", max);
let max = max + 1;
println!("max: {}", max);
}
```saturating_add to prevent potential overflow (#20185)1 parent 75428f1 commit aeeb0ba
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| |||
0 commit comments