File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
vortex-array/src/arrays/patched Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,10 @@ impl PatchedArray {
126126 ///
127127 /// # Errors
128128 ///
129- /// The `inner` array must be primitive type, and it must have the same DType as the patches.
129+ /// The `inner` array must be primitive type, and it must have the same `DType` as the patches.
130+ ///
131+ /// The patches cannot contain nulls themselves. Any nulls must be stored in the `inner` array's
132+ /// validity.
130133 pub fn from_array_and_patches (
131134 inner : ArrayRef ,
132135 patches : & Patches ,
@@ -147,6 +150,11 @@ impl PatchedArray {
147150 "PatchedArray does not support > u32::MAX patch values"
148151 ) ;
149152
153+ vortex_ensure ! (
154+ patches. values( ) . all_valid( ) ?,
155+ "PatchedArray cannot be built from Patches with nulls"
156+ ) ;
157+
150158 let values_ptype = patches. dtype ( ) . as_ptype ( ) ;
151159
152160 let TransposedPatches {
You can’t perform that action at this time.
0 commit comments