@@ -152,7 +152,8 @@ impl SeafowlContext {
152152 & self ,
153153 table_name : impl Into < TableReference > ,
154154 ) -> Result < LakehouseTableProvider > {
155- let table_provider = self . inner . table_provider ( table_name) . await ?;
155+ let table_ref = table_name. into ( ) ;
156+ let table_provider = self . inner . table_provider ( table_ref. clone ( ) ) . await ?;
156157 let table_provider_any = table_provider. as_any ( ) ;
157158
158159 if let Some ( a) = table_provider_any. downcast_ref :: < DeltaTable > ( ) {
@@ -163,7 +164,7 @@ impl SeafowlContext {
163164 }
164165
165166 Err ( DataFusionError :: Execution (
166- "Table {table_name } not found" . to_string ( ) ,
167+ format ! ( "Table {table_ref } not found" ) . to_string ( ) ,
167168 ) )
168169 }
169170
@@ -172,10 +173,11 @@ impl SeafowlContext {
172173 & self ,
173174 table_name : impl Into < TableReference > ,
174175 ) -> Result < DeltaTable > {
175- match self . get_lakehouse_table_provider ( table_name) . await ? {
176+ let table_ref = table_name. into ( ) ;
177+ match self . get_lakehouse_table_provider ( table_ref. clone ( ) ) . await ? {
176178 LakehouseTableProvider :: Delta ( delta_table) => Ok ( delta_table) ,
177179 _ => Err ( DataFusionError :: Execution (
178- "Delta table {table_name } not found" . to_string ( ) ,
180+ format ! ( "Delta table {table_ref } not found" ) . to_string ( ) ,
179181 ) ) ,
180182 }
181183 }
0 commit comments