Skip to content

Commit

Permalink
Child assert includes index and encoding id (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
robert3005 authored Aug 12, 2024
1 parent 06bf936 commit 7d02111
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions vortex-array/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,18 @@ impl ArrayData {
match self.children.get(index) {
None => None,
Some(child) => {
assert_eq!(child.dtype(), dtype, "Child requested with incorrect dtype");
assert_eq!(child.len(), len, "Child requested with incorrect length");
assert_eq!(
child.dtype(),
dtype,
"Child {index} requested with incorrect dtype for encoding {}",
self.encoding().id()
);
assert_eq!(
child.len(),
len,
"Child {index} requested with incorrect length for encoding {}",
self.encoding.id()
);
Some(child)
}
}
Expand Down

0 comments on commit 7d02111

Please sign in to comment.