pub fn test_array_consistency(array: &dyn Array)
Expand description
Run all consistency tests on an array.
This function executes a comprehensive suite of consistency tests that verify the correctness of compute operations on Vortex arrays.
§Test Suite Overview
§Core Operation Consistency
- Filter/Take: Verifies
filter(array, mask)
equalstake(array, true_indices)
- Mask Composition: Ensures sequential masks equal combined masks
- Slice/Filter: Checks contiguous filters equal slice operations
- Take/Slice: Validates sequential takes equal slice operations
- Cast/Slice: Ensures cast operations preserve sliced array properties
§Boolean Operations
- De Morgan’s Laws: Verifies boolean operations follow logical laws
§Comparison Operations
- Inverse Relationships: Verifies logical inverses (Eq/NotEq, Gt/Lte, Lt/Gte)
- Symmetry: Ensures proper ordering relationships when operands are swapped
§Aggregate Operations
- Slice/Aggregate: Verifies aggregates on sliced arrays match canonical
§Identity Operations
- Filter Identity: All-true mask preserves the array
- Mask Identity: All-false mask preserves values (as nullable)
- Take Identity: Taking all indices preserves the array
§Edge Cases
- Empty Operations: Empty filters, takes, and slices behave correctly
- Single Element: Operations work with single-element arrays
- Repeated Indices: Take with duplicate indices works correctly
§Null Handling
- Nullable Indices: Null indices produce null values
- Mask/Filter Interaction: Masking then filtering behaves predictably
§Large Arrays
- Performance: Operations scale correctly to large arrays (1000+ elements)