()
| 337 | |
| 338 | #[test] |
| 339 | fn test_fmt_sql() -> Result<()> { |
| 340 | let schema = schema(); |
| 341 | |
| 342 | let expr = not(col("a", &schema)?)?; |
| 343 | |
| 344 | let display_string = expr.to_string(); |
| 345 | assert_eq!(display_string, "NOT a@0"); |
| 346 | |
| 347 | let sql_string = fmt_sql(expr.as_ref()).to_string(); |
| 348 | assert_eq!(sql_string, "NOT a"); |
| 349 | |
| 350 | Ok(()) |
| 351 | } |
| 352 | |
| 353 | fn schema() -> SchemaRef { |
| 354 | static SCHEMA: LazyLock<SchemaRef> = LazyLock::new(|| { |