Creates the physical expression from Expr and compares the Debug expression to the expected result.
(expr: Expr, expected_expr: &str)
| 412 | /// Creates the physical expression from Expr and compares the Debug expression |
| 413 | /// to the expected result. |
| 414 | fn create_expr_test(expr: Expr, expected_expr: &str) { |
| 415 | let batch = &TEST_BATCH; |
| 416 | let df_schema = DFSchema::try_from(batch.schema()).unwrap(); |
| 417 | let physical_expr = SessionContext::new() |
| 418 | .create_physical_expr(expr, &df_schema) |
| 419 | .unwrap(); |
| 420 | |
| 421 | assert_eq!(physical_expr.to_string(), expected_expr); |
| 422 | } |
| 423 | |
| 424 | /// Creates the physical expression from Expr and runs the expr simplifier |
| 425 | fn create_simplified_expr_test(expr: Expr, expected_expr: &str) { |
no test coverage detected
searching dependent graphs…