()
| 3914 | |
| 3915 | #[test] |
| 3916 | fn format_cast() -> Result<()> { |
| 3917 | let expr = Expr::Cast(Cast { |
| 3918 | expr: Box::new(Expr::Literal(ScalarValue::Float32(Some(1.23)), None)), |
| 3919 | field: DataType::Utf8.into_nullable_field_ref(), |
| 3920 | }); |
| 3921 | let expected_canonical = "CAST(Float32(1.23) AS Utf8)"; |
| 3922 | assert_eq!(expected_canonical, format!("{expr}")); |
| 3923 | // Note that CAST intentionally has a name that is different from its `Display` |
| 3924 | // representation. CAST does not change the name of expressions. |
| 3925 | assert_eq!("Float32(1.23)", expr.schema_name().to_string()); |
| 3926 | Ok(()) |
| 3927 | } |
| 3928 | |
| 3929 | #[test] |
| 3930 | fn test_partial_ord() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…