diff --git a/vortex-array/src/data.rs b/vortex-array/src/data.rs index e1a03be5ca..cb105c3d4d 100644 --- a/vortex-array/src/data.rs +++ b/vortex-array/src/data.rs @@ -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) } }