@@ -125,22 +125,6 @@ impl QueryContext {
125125 StageTable :: try_create ( table_info. clone ( ) )
126126 }
127127
128- /// Fetch a Table by db and table name.
129- ///
130- /// It guaranteed to return a consistent result for multiple calls, in a same query.
131- /// E.g.:
132- /// ```sql
133- /// SELECT * FROM (SELECT * FROM db.table_name) as subquery_1, (SELECT * FROM db.table_name) AS subquery_2
134- /// ```
135- pub async fn get_table (
136- & self ,
137- catalog : & str ,
138- database : & str ,
139- table : & str ,
140- ) -> Result < Arc < dyn Table > > {
141- self . shared . get_table ( catalog, database, table) . await
142- }
143-
144128 pub async fn set_current_database ( & self , new_database_name : String ) -> Result < ( ) > {
145129 let tenant_id = self . get_tenant ( ) ;
146130 let catalog = self . get_catalog ( self . get_current_catalog ( ) . as_str ( ) ) ?;
@@ -418,6 +402,22 @@ impl TableContext for QueryContext {
418402 self . shared . get_cluster ( )
419403 }
420404
405+ /// Fetch a Table by db and table name.
406+ ///
407+ /// It guaranteed to return a consistent result for multiple calls, in a same query.
408+ /// E.g.:
409+ /// ```sql
410+ /// SELECT * FROM (SELECT * FROM db.table_name) as subquery_1, (SELECT * FROM db.table_name) AS subquery_2
411+ /// ```
412+ async fn get_table (
413+ & self ,
414+ catalog : & str ,
415+ database : & str ,
416+ table : & str ,
417+ ) -> Result < Arc < dyn Table > > {
418+ self . shared . get_table ( catalog, database, table) . await
419+ }
420+
421421 // Get all the processes list info.
422422 async fn get_processes_info ( & self ) -> Vec < ProcessInfo > {
423423 SessionManager :: instance ( ) . processes_info ( ) . await
0 commit comments