File tree Expand file tree Collapse file tree
datafusion-federation/src/sql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,8 +125,9 @@ impl SQLTableSource {
125125 // creates a SQLTableSource and infers the table schema
126126 pub async fn new (
127127 provider : Arc < SQLFederationProvider > ,
128- table_ref : RemoteTableRef ,
128+ table_ref : impl Into < RemoteTableRef > ,
129129 ) -> Result < Self > {
130+ let table_ref = table_ref. into ( ) ;
130131 let table_name = table_ref. to_quoted_string ( ) ;
131132 let schema = provider. executor . get_table_schema ( & table_name) . await ?;
132133 Ok ( Self :: new_with_schema ( provider, table_ref, schema) )
@@ -135,12 +136,12 @@ impl SQLTableSource {
135136 /// Create a SQLTableSource with a table reference and schema
136137 pub fn new_with_schema (
137138 provider : Arc < SQLFederationProvider > ,
138- table_ref : RemoteTableRef ,
139+ table_ref : impl Into < RemoteTableRef > ,
139140 schema : SchemaRef ,
140141 ) -> Self {
141142 Self {
142143 provider,
143- table : Arc :: new ( RemoteTable :: new ( table_ref, schema) ) ,
144+ table : Arc :: new ( RemoteTable :: new ( table_ref. into ( ) , schema) ) ,
144145 }
145146 }
146147
You can’t perform that action at this time.
0 commit comments