(
l: Vec<&str>,
r: &IndexMap<Column, Option<Vec<ColumnUnnestList>>>,
)
| 712 | use indexmap::IndexMap; |
| 713 | |
| 714 | fn column_unnests_eq( |
| 715 | l: Vec<&str>, |
| 716 | r: &IndexMap<Column, Option<Vec<ColumnUnnestList>>>, |
| 717 | ) { |
| 718 | let r_formatted: Vec<String> = r |
| 719 | .iter() |
| 720 | .map(|i| match i.1 { |
| 721 | None => format!("{}", i.0), |
| 722 | Some(vec) => format!( |
| 723 | "{}=>[{}]", |
| 724 | i.0, |
| 725 | vec.iter() |
| 726 | .map(|i| format!("{i}")) |
| 727 | .collect::<Vec<String>>() |
| 728 | .join(", ") |
| 729 | ), |
| 730 | }) |
| 731 | .collect(); |
| 732 | let l_formatted: Vec<String> = l.iter().map(|i| (*i).to_string()).collect(); |
| 733 | assert_eq!(l_formatted, r_formatted); |
| 734 | } |
| 735 | |
| 736 | #[test] |
| 737 | fn test_transform_bottom_unnest_recursive() -> Result<()> { |
searching dependent graphs…