Skip to content

Commit

Permalink
explicitly assert dtype of canonical array
Browse files Browse the repository at this point in the history
  • Loading branch information
a10y committed Oct 28, 2024
1 parent 737a3c9 commit c854777
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vortex-array/src/array/varbin/flatten.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod test {

use crate::array::varbin::builder::VarBinBuilder;
use crate::validity::ArrayValidity;
use crate::IntoCanonical;
use crate::{ArrayDType, IntoCanonical};

#[rstest]
#[case(DType::Utf8(Nullability::Nullable))]
Expand All @@ -43,9 +43,10 @@ mod test {
varbin.push_value("123456789012".as_bytes());
// non-inlinable value
varbin.push_value("1234567890123".as_bytes());
let varbin = varbin.finish(dtype);
let varbin = varbin.finish(dtype.clone());

let canonical = varbin.into_canonical().unwrap().into_varbinview().unwrap();
assert_eq!(canonical.dtype(), &dtype);

assert!(!canonical.is_valid(0));
assert!(!canonical.is_valid(1));
Expand Down

0 comments on commit c854777

Please sign in to comment.