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


##########
datafusion/core/src/execution/session_state.rs:
##########
@@ -672,19 +673,8 @@ impl SessionState {
         statement: Statement,
     ) -> datafusion_common::Result<LogicalPlan> {
         let mut references = self.resolve_table_references(&statement)?;
-        let require_info_schema = match &statement {
-            Statement::Statement(s) => matches!(
-                s.as_ref(),
-                SQLStatement::ShowCreate { .. }
-                    | SQLStatement::ShowTables { .. }
-                    | SQLStatement::ShowColumns { .. }
-                    | SQLStatement::ShowVariable { .. }
-                    | SQLStatement::ShowFunctions { .. }
-            ),
-            _ => false,
-        };
 
-        if require_info_schema {
+        if Self::requires_information_schema(&statement) {

Review Comment:
   👍 



##########
datafusion/sql/src/resolve.rs:
##########
@@ -25,28 +25,6 @@ use crate::planner::object_name_to_table_reference;
 use datafusion_common::TableReference;
 use sqlparser::ast::*;
 
-// following constants are used in `resolve_table_references`

Review Comment:
   it is really nice to remove this stuff out of the sql module 💯  as it 
shouldn't really be in the sql parser



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