()
| 2889 | |
| 2890 | #[test] |
| 2891 | fn test_join_metadata() -> Result<()> { |
| 2892 | let left_schema = DFSchema::new_with_metadata( |
| 2893 | vec![(None, Arc::new(Field::new("a", DataType::Int32, false)))], |
| 2894 | HashMap::from([("key".to_string(), "left".to_string())]), |
| 2895 | )?; |
| 2896 | let right_schema = DFSchema::new_with_metadata( |
| 2897 | vec![(None, Arc::new(Field::new("b", DataType::Int32, false)))], |
| 2898 | HashMap::from([("key".to_string(), "right".to_string())]), |
| 2899 | )?; |
| 2900 | |
| 2901 | let join_schema = |
| 2902 | build_join_schema(&left_schema, &right_schema, &JoinType::Left)?; |
| 2903 | assert_eq!( |
| 2904 | join_schema.metadata(), |
| 2905 | &HashMap::from([("key".to_string(), "left".to_string())]) |
| 2906 | ); |
| 2907 | let join_schema = |
| 2908 | build_join_schema(&left_schema, &right_schema, &JoinType::Right)?; |
| 2909 | assert_eq!( |
| 2910 | join_schema.metadata(), |
| 2911 | &HashMap::from([("key".to_string(), "right".to_string())]) |
| 2912 | ); |
| 2913 | |
| 2914 | Ok(()) |
| 2915 | } |
| 2916 | |
| 2917 | #[test] |
| 2918 | fn test_values_metadata() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…