Skip to content

Commit 42317d6

Browse files
connortsui20robert3005
authored andcommitted
use compute fn is_sorted
Signed-off-by: Connor Tsui <[email protected]>
1 parent b8e19dd commit 42317d6

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

  • vortex-array/src/arrays/varbin

‎vortex-array/src/arrays/varbin/mod.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use crate::validity::Validity;
1818
use crate::vtable::{
1919
ArrayVTable, NotSupported, VTable, ValidityHelper, ValidityVTableFromValidityHelper,
2020
};
21-
use crate::{Array, ArrayRef, EncodingId, EncodingRef, vtable};
21+
use crate::{Array, ArrayRef, EncodingId, EncodingRef, compute as compute_fn, vtable};
2222

2323
mod accessor;
2424
pub mod builder;
@@ -173,9 +173,7 @@ impl VarBinArray {
173173
);
174174

175175
// Check offsets are sorted
176-
if let Some(is_sorted) = offsets.statistics().compute_is_sorted() {
177-
vortex_ensure!(is_sorted, "offsets must be sorted");
178-
}
176+
vortex_ensure!(!compute_fn::is_sorted(offsets)?, "offsets must be sorted");
179177

180178
// Check first offset is 0 and last offset doesn't exceed bytes length
181179
let first_offset = offsets

0 commit comments

Comments
 (0)