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

Function test_alias_empty

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

Source from the content-addressed store, hash-verified

6234
6235#[tokio::test]
6236async fn test_alias_empty() -> Result<()> {
6237 let df = create_test_table("test").await?.alias("")?;
6238 let plan = df
6239 .clone()
6240 .into_unoptimized_plan()
6241 .display_indent_schema()
6242 .to_string();
6243 assert_snapshot!(plan, @r"
6244 SubqueryAlias: [a:Utf8, b:Int32]
6245 TableScan: test [a:Utf8, b:Int32]
6246 ");
6247
6248 assert_snapshot!(
6249 batches_to_sort_string(&df.select(vec![col("a"), col("b")])?.collect().await.unwrap()),
6250 @r"
6251 +-----------+-----+
6252 | a | b |
6253 +-----------+-----+
6254 | 123AbcDef | 100 |
6255 | CBAdef | 10 |
6256 | abc123 | 10 |
6257 | abcDEF | 1 |
6258 +-----------+-----+
6259 "
6260 );
6261
6262 Ok(())
6263}
6264
6265#[tokio::test]
6266async fn test_alias_nested() -> Result<()> {

Callers

nothing calls this directly

Calls 6

display_indent_schemaMethod · 0.80
into_unoptimized_planMethod · 0.80
create_test_tableFunction · 0.70
aliasMethod · 0.45
to_stringMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…