goldmedal commented on code in PR #12046:
URL: https://github.com/apache/datafusion/pull/12046#discussion_r1725283288


##########
datafusion/sql/src/utils.rs:
##########
@@ -119,9 +121,34 @@ pub(crate) fn check_columns_satisfy_exprs(
             _ => check_column_satisfies_expr(columns, e, message_prefix)?,
         }
     }
+    let column_names = columns
+        .iter()
+        .map(|c| format!("{}", c.schema_name()))
+        .collect::<Vec<_>>();
+
+    wildcard_fields.into_iter().try_for_each(|(table, field)| {
+        let column_name = qualified_name(table, field.name());
+        if !column_names.iter().any(|c| c == &column_name) {

Review Comment:
   hmm ok. I added back the checking for the rules. I tried to add more 
comments to explain why we need those checks. 
   About the error message, we could enhance it in the future 🤔 .



-- 
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-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to