()
| 1496 | |
| 1497 | #[tokio::test] |
| 1498 | async fn join_coercion_unnamed() -> Result<()> { |
| 1499 | let ctx = SessionContext::new(); |
| 1500 | |
| 1501 | // Test that join will coerce column types when necessary |
| 1502 | // even when the relations don't have unique names |
| 1503 | let left = ctx.read_batch(record_batch!( |
| 1504 | ("id", Int32, [1, 2, 3]), |
| 1505 | ("name", Utf8, ["a", "b", "c"]) |
| 1506 | )?)?; |
| 1507 | let right = ctx.read_batch(record_batch!( |
| 1508 | ("id", Int32, [10, 3]), |
| 1509 | ("name", Utf8View, ["d", "c"]) // Utf8View is a different type |
| 1510 | )?)?; |
| 1511 | let cols = vec!["name", "id"]; |
| 1512 | |
| 1513 | let filter = None; |
| 1514 | let join = right.join(left, JoinType::LeftAnti, &cols, &cols, filter)?; |
| 1515 | let results = join.collect().await?; |
| 1516 | |
| 1517 | assert_snapshot!( |
| 1518 | batches_to_sort_string(&results), |
| 1519 | @r" |
| 1520 | +----+------+ |
| 1521 | | id | name | |
| 1522 | +----+------+ |
| 1523 | | 10 | d | |
| 1524 | +----+------+ |
| 1525 | " |
| 1526 | ); |
| 1527 | Ok(()) |
| 1528 | } |
| 1529 | |
| 1530 | #[tokio::test] |
| 1531 | async fn join_on() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…