Skip to content

Commit 362be7e

Browse files
author
Matthew Katz
committed
add doc comment
Signed-off-by: Matthew Katz <katz@spiraldb.com>
1 parent dd60978 commit 362be7e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • vortex-array/src/arrays/listview

vortex-array/src/arrays/listview/array.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,8 @@ pub trait ListViewArrayExt: TypedArrayRef<ListView> {
484484
.as_::<u64>()
485485
.ok_or_else(|| vortex_err!("could not cast sum of sizes to u64"))?;
486486

487+
// if the same elements are referenced more than once the estimate may be
488+
// greater than 1.0, so clamp
487489
let estimate = (sizes_sum as f32 / n_elts as f32).min(1.0);
488490

489491
debug_assert!(estimate >= 0.0);

0 commit comments

Comments
 (0)