pepijnve commented on code in PR #25887:
URL: https://github.com/apache/datafusion/pull/25887#discussion_r4192312974


##########
datafusion/sql/src/statement.rs:
##########
@@ -3171,14 +3172,31 @@ FROM (
     }
 
     /// Return true if there is a table provider available for "schema.table"
-    fn has_table(&self, schema: &str, table: &str) -> bool {
-        let tables_reference = TableReference::Partial {
-            schema: schema.into(),
-            table: table.into(),
+    fn resolve_info_table(&self, table: &str) -> Option<TableReference> {
+        let table_reference = if let Some(system_catalog) =
+            &self.context_provider.options().catalog.system_catalog
+        {
+            TableReference::Full {
+                catalog: system_catalog.deref().into(),
+                schema: "information_schema".into(),

Review Comment:
   In this PR and more importantly in `main`, the references to  
`information_schema`, the various tables and their columns all exist here. As 
an example, see the `show_tables_to_plan` function on `main`.
   
   I agree with you that the hardcoding of the `information_schema` table 
schema in the `sql` crate feels wrong. Getting rid of that is something I'm 
trying in followup PR #26057. This one is smaller in scope and only tries to 
land the work done in PR #24200 which seems to have stalled.



-- 
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]

Reply via email to