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

Function drop_columns

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

Source from the content-addressed store, hash-verified

478
479#[tokio::test]
480async fn drop_columns() -> Result<()> {
481 // build plan using Table API
482 let t = test_table().await?;
483 let t2 = t.drop_columns(&["c2", "c11"])?;
484 let plan = t2.logical_plan().clone();
485
486 // build query using SQL
487 let sql_plan =
488 create_plan("SELECT c1,c3,c4,c5,c6,c7,c8,c9,c10,c12,c13 FROM aggregate_test_100")
489 .await?;
490
491 // the two plans should be identical
492 assert_same_plan(&plan, &sql_plan);
493
494 Ok(())
495}
496
497#[tokio::test]
498async fn drop_columns_with_duplicates() -> Result<()> {

Callers

nothing calls this directly

Calls 6

test_tableFunction · 0.85
assert_same_planFunction · 0.85
drop_columnsMethod · 0.80
create_planFunction · 0.70
cloneMethod · 0.45
logical_planMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…