MCPcopy Create free account
hub / github.com/apache/datafusion / test_alias_self_join

Function test_alias_self_join

datafusion/core/tests/dataframe/mod.rs:6215–6233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6213// Issue: https://github.com/apache/datafusion/issues/14112
6214#[tokio::test]
6215async fn test_alias_self_join() -> Result<()> {
6216 let left = create_test_table("t1").await?;
6217 let right = left.clone().alias("t2")?;
6218 let joined = left.join(right, JoinType::Full, &["a"], &["a"], None)?;
6219 assert_snapshot!(
6220 batches_to_sort_string(&joined.collect().await.unwrap()),
6221 @r"
6222 +-----------+-----+-----------+-----+
6223 | a | b | a | b |
6224 +-----------+-----+-----------+-----+
6225 | 123AbcDef | 100 | 123AbcDef | 100 |
6226 | CBAdef | 10 | CBAdef | 10 |
6227 | abc123 | 10 | abc123 | 10 |
6228 | abcDEF | 1 | abcDEF | 1 |
6229 +-----------+-----+-----------+-----+
6230 "
6231 );
6232 Ok(())
6233}
6234
6235#[tokio::test]
6236async fn test_alias_empty() -> Result<()> {

Callers

nothing calls this directly

Calls 4

create_test_tableFunction · 0.70
aliasMethod · 0.45
cloneMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…