You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "timsaucer (via GitHub)" <gi...@apache.org> on 2025/11/11 13:21:46 UTC
[I] select_columns fails silently when invalid column names are passed [datafusion]
timsaucer opened a new issue, #18622:
URL: https://github.com/apache/datafusion/issues/18622
### Describe the bug
This appears to be a regression from https://github.com/apache/datafusion/pull/18236
### To Reproduce
I changed the unit test in `datafusion/core/tests/dataframe/mod.rs` as follows
```rust
#[tokio::test]
async fn select_columns() -> Result<()> {
// build plan using Table API
let t = test_table().await?;
let t2 = t.clone().select_columns(&["c1", "c2", "c11"])?;
let plan = t2.logical_plan().clone();
// build query using SQL
let sql_plan = create_plan("SELECT c1, c2, c11 FROM aggregate_test_100").await?;
// the two plans should be identical
assert_same_plan(&plan, &sql_plan);
assert!(t.select_columns(&["non_existent_column"]).is_err());
Ok(())
}
```
### Expected behavior
I would expect this to return an error as it did before when columns are selected that do not exist. Instead they are simply not present in the output dataframe.
### Additional context
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org