File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
vortex-vector/src/decimal Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -96,13 +96,17 @@ impl<D: NativeDecimalType> DVector<D> {
9696 ) ;
9797 }
9898
99- // We assert that each element is within bounds for the given precision/scale.
100- if let Some ( invalid) = elements. iter ( ) . find ( |e| !ps. is_valid ( * * e) ) {
101- vortex_bail ! (
102- "One or more elements (e.g. {invalid}) are out of bounds for precision {} and scale {}" ,
103- ps. precision( ) ,
104- ps. scale( ) ,
105- ) ;
99+ // TODO(0ax1): iteration based on mask density via threshold_iter
100+
101+ // We assert that each non-null element is within bounds for the given precision/scale.
102+ for ( element, is_valid) in elements. iter ( ) . zip ( validity. to_bit_buffer ( ) . iter ( ) ) {
103+ if is_valid && !ps. is_valid ( * element) {
104+ vortex_bail ! (
105+ "One or more elements (e.g. {element}) are out of bounds for precision {} and scale {}" ,
106+ ps. precision( ) ,
107+ ps. scale( ) ,
108+ ) ;
109+ }
106110 }
107111
108112 Ok ( Self {
You can’t perform that action at this time.
0 commit comments