(array: &'a StructArray, columns: &mut Vec<&'a ArrayRef>)
| 833 | } |
| 834 | |
| 835 | fn flatten<'a>(array: &'a StructArray, columns: &mut Vec<&'a ArrayRef>) { |
| 836 | for i in 0..array.num_columns() { |
| 837 | let column = array.column(i); |
| 838 | if let Some(nested_struct) = column.as_any().downcast_ref::<StructArray>() { |
| 839 | // If it's a nested struct, recursively expand |
| 840 | flatten(nested_struct, columns); |
| 841 | } else { |
| 842 | // If it's a primitive type, add directly |
| 843 | columns.push(column); |
| 844 | } |
| 845 | } |
| 846 | } |
| 847 | |
| 848 | pub fn partial_cmp_struct(s1: &StructArray, s2: &StructArray) -> Option<Ordering> { |
| 849 | if s1.len() != s2.len() { |
no test coverage detected
searching dependent graphs…