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

Function select_columns

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

Source from the content-addressed store, hash-verified

291
292#[tokio::test]
293async fn select_columns() -> Result<()> {
294 // build plan using Table API
295
296 let t = test_table().await?;
297 let t2 = t.select_columns(&["c1", "c2", "c11"])?;
298 let plan = t2.logical_plan().clone();
299
300 // build query using SQL
301 let sql_plan = create_plan("SELECT c1, c2, c11 FROM aggregate_test_100").await?;
302
303 // the two plans should be identical
304 assert_same_plan(&plan, &sql_plan);
305
306 Ok(())
307}
308
309#[tokio::test]
310async fn select_columns_with_nonexistent_columns() -> Result<()> {

Callers

nothing calls this directly

Calls 6

test_tableFunction · 0.85
assert_same_planFunction · 0.85
select_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…