We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd60978 commit 362be7eCopy full SHA for 362be7e
1 file changed
vortex-array/src/arrays/listview/array.rs
@@ -484,6 +484,8 @@ pub trait ListViewArrayExt: TypedArrayRef<ListView> {
484
.as_::<u64>()
485
.ok_or_else(|| vortex_err!("could not cast sum of sizes to u64"))?;
486
487
+ // if the same elements are referenced more than once the estimate may be
488
+ // greater than 1.0, so clamp
489
let estimate = (sizes_sum as f32 / n_elts as f32).min(1.0);
490
491
debug_assert!(estimate >= 0.0);
0 commit comments