File tree 2 files changed +27
-1
lines changed
2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change
1
+ // Licensed to the Apache Software Foundation (ASF) under one
2
+ // or more contributor license agreements. See the NOTICE file
3
+ // distributed with this work for additional information
4
+ // regarding copyright ownership. The ASF licenses this file
5
+ // to you under the Apache License, Version 2.0 (the
6
+ // "License"); you may not use this file except in compliance
7
+ // with the License. You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing,
12
+ // software distributed under the License is distributed on an
13
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ // KIND, either express or implied. See the License for the
15
+ // specific language governing permissions and limitations
16
+ // under the License.
17
+
1
18
use crate :: datasource:: TableProvider ;
2
19
use crate :: execution:: context:: SessionState ;
3
20
use crate :: physical_plan:: ExecutionPlan ;
Original file line number Diff line number Diff line change @@ -405,13 +405,22 @@ impl TableProviderFactory for TestTableFactory {
405
405
async fn create ( & self , _name : & str , _url : & str ) -> Result < Arc < dyn TableProvider > > {
406
406
Ok ( Arc :: new ( TestTableProvider { } ) )
407
407
}
408
+
409
+ fn with_schema (
410
+ & self ,
411
+ _schema : SchemaRef ,
412
+ _table_type : & str ,
413
+ _url : & str ,
414
+ ) -> Result < Arc < dyn TableProvider > > {
415
+ Ok ( Arc :: new ( TestTableProvider { } ) )
416
+ }
408
417
}
409
418
410
419
#[ tokio:: test]
411
420
async fn create_custom_table ( ) -> Result < ( ) > {
412
421
let mut table_factories: HashMap < String , Arc < dyn TableProviderFactory > > =
413
422
HashMap :: new ( ) ;
414
- table_factories. insert ( "DELTATABLE " . to_string ( ) , Arc :: new ( TestTableFactory { } ) ) ;
423
+ table_factories. insert ( "deltatable " . to_string ( ) , Arc :: new ( TestTableFactory { } ) ) ;
415
424
let cfg = RuntimeConfig :: new ( ) . with_table_factories ( table_factories) ;
416
425
let env = RuntimeEnv :: new ( cfg) . unwrap ( ) ;
417
426
let ses = SessionConfig :: new ( ) ;
You can’t perform that action at this time.
0 commit comments