xiedeyantu opened a new issue, #21258: URL: https://github.com/apache/datafusion/issues/21258
### Describe the bug When using `SELECT * EXCLUDE(col1, col2)` and the excluded columns cover all columns in the table, DataFusion silently executes the query and returns rows with no columns instead of raising a planning error. ### To Reproduce ``` create table t(a int, b int); insert into t values (1,2),(3,4); select * exclude(a, b) from t; ++ ++ ++ 2 row(s) fetched. ``` ### Expected behavior The query should fail at planning time with a clear error message, since the SELECT list is empty after wildcard expansion: `DataFusion error: Error during planning: SELECT list is empty after resolving * expressions, the wildcard expanded to zero columns` ### 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
