@@ -822,6 +822,22 @@ fn test_test_list_view_array<T: OffsetSizeTrait>() {
822822 test_equal ( & a, & b, true ) ;
823823}
824824
825+ fn test_list_view_sizes_and_child_nulls < T : OffsetSizeTrait > ( ) {
826+ // Same first elements but different sizes, with a null row
827+ let a = create_list_view_array :: < T , _ , _ > ( [ Some ( vec ! [ Some ( 1 ) , Some ( 2 ) ] ) , None ] ) ;
828+ let b = create_list_view_array :: < T , _ , _ > ( [ Some ( vec ! [ Some ( 1 ) , Some ( 2 ) , Some ( 3 ) ] ) , None ] ) ;
829+ test_equal ( & a, & b, false ) ;
830+
831+ // Child values that differ only in their null masks, without and with a null row
832+ let a = create_list_view_array :: < T , _ , _ > ( [ Some ( vec ! [ Some ( 1 ) , Some ( 0 ) ] ) ] ) ;
833+ let b = create_list_view_array :: < T , _ , _ > ( [ Some ( vec ! [ Some ( 1 ) , None ] ) ] ) ;
834+ test_equal ( & a, & b, false ) ;
835+
836+ let a = create_list_view_array :: < T , _ , _ > ( [ None , Some ( vec ! [ Some ( 1 ) , Some ( 0 ) ] ) ] ) ;
837+ let b = create_list_view_array :: < T , _ , _ > ( [ None , Some ( vec ! [ Some ( 1 ) , None ] ) ] ) ;
838+ test_equal ( & a, & b, false ) ;
839+ }
840+
825841// Special test for List<ListView<i32>>.
826842// This tests the equal_ranges kernel
827843fn test_sliced_list_of_list_view < T : OffsetSizeTrait > ( ) {
@@ -871,6 +887,16 @@ fn test_large_list_view_array() {
871887 test_test_list_view_array :: < i64 > ( ) ;
872888}
873889
890+ #[ test]
891+ fn test_list_view_array_sizes_and_child_nulls ( ) {
892+ test_list_view_sizes_and_child_nulls :: < i32 > ( ) ;
893+ }
894+
895+ #[ test]
896+ fn test_large_list_view_array_sizes_and_child_nulls ( ) {
897+ test_list_view_sizes_and_child_nulls :: < i64 > ( ) ;
898+ }
899+
874900#[ test]
875901fn test_nested_list_view_array ( ) {
876902 test_sliced_list_of_list_view :: < i32 > ( ) ;
0 commit comments