Skip to content

Commit e75606d

Browse files
authored
RunEnd ends array max is length of the array (#1017)
1 parent ea83f36 commit e75606d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

encodings/runend/src/compress.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ pub fn runend_encode(array: &PrimitiveArray) -> (PrimitiveArray, PrimitiveArray)
5959
compressed_ends
6060
.statistics()
6161
.set(Stat::Min, scalar_at(&compressed_ends, 0).vortex_unwrap());
62-
compressed_ends.statistics().set(
63-
Stat::Max,
64-
scalar_at(&compressed_ends, compressed_ends.len() - 1).vortex_unwrap(),
65-
);
62+
compressed_ends
63+
.statistics()
64+
.set(Stat::Max, (array.len() as u64).into());
6665
}
6766

6867
assert_eq!(array.dtype(), compressed_values.dtype());

0 commit comments

Comments
 (0)