()
| 472 | |
| 473 | #[test] |
| 474 | fn normalize_cols_non_exist() { |
| 475 | // test normalizing columns when the name doesn't exist |
| 476 | let expr = col("a") + col("b"); |
| 477 | let schema_a = |
| 478 | make_schema_with_empty_metadata(vec![Some("\"tableA\"".into())], vec!["a"]); |
| 479 | let schemas = [schema_a]; |
| 480 | let schemas = schemas.iter().collect::<Vec<_>>(); |
| 481 | |
| 482 | let error = |
| 483 | normalize_col_with_schemas_and_ambiguity_check(expr, &[&schemas], &[]) |
| 484 | .unwrap_err() |
| 485 | .strip_backtrace(); |
| 486 | let expected = "Schema error: No field named b. \ |
| 487 | Valid fields are \"tableA\".a."; |
| 488 | assert_eq!(error, expected); |
| 489 | } |
| 490 | |
| 491 | #[test] |
| 492 | fn unnormalize_cols() { |
nothing calls this directly
no test coverage detected
searching dependent graphs…