File tree 5 files changed +9
-3
lines changed
storages/fuse/src/operations
5 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -108,4 +108,6 @@ pub trait TableContext: Send + Sync {
108
108
-> Result < Arc < dyn Table > > ;
109
109
fn get_processes_info ( & self ) -> Vec < ProcessInfo > ;
110
110
fn get_runtime ( & self ) -> Result < Arc < Runtime > > ;
111
+
112
+ fn clone_inner ( & self ) -> Arc < dyn TableContext > ;
111
113
}
Original file line number Diff line number Diff line change @@ -668,7 +668,6 @@ impl FragmentCoordinator {
668
668
669
669
match & self . payload {
670
670
FragmentPayload :: PlanV2 ( plan) => {
671
- let ctx = QueryContext :: create_from ( ctx) ;
672
671
let pipeline_builder = PipelineBuilderV2 :: create ( ctx) ;
673
672
self . pipeline_build_res = Some ( pipeline_builder. finalize ( plan) ?) ;
674
673
}
Original file line number Diff line number Diff line change @@ -164,7 +164,6 @@ impl Interpreter for InsertInterpreterV2 {
164
164
_ => unreachable ! ( ) ,
165
165
} ;
166
166
167
- table1. get_table_info ( ) ;
168
167
let catalog = self . plan . catalog . clone ( ) ;
169
168
let is_distributed_plan = select_plan. is_distributed_plan ( ) ;
170
169
Original file line number Diff line number Diff line change @@ -386,6 +386,10 @@ impl TableContext for QueryContext {
386
386
fn get_runtime ( & self ) -> Result < Arc < Runtime > > {
387
387
self . shared . try_get_runtime ( )
388
388
}
389
+
390
+ fn clone_inner ( & self ) -> Arc < dyn TableContext > {
391
+ QueryContext :: create_from_shared ( self . shared . clone ( ) )
392
+ }
389
393
}
390
394
391
395
impl TrySpawn for QueryContext {
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ impl FuseTable {
74
74
#[ inline]
75
75
pub fn do_read2 (
76
76
& self ,
77
- ctx : Arc < dyn TableContext > ,
77
+ mut ctx : Arc < dyn TableContext > ,
78
78
plan : & ReadDataSourcePlan ,
79
79
pipeline : & mut Pipeline ,
80
80
) -> Result < ( ) > {
@@ -87,6 +87,8 @@ impl FuseTable {
87
87
}
88
88
89
89
if !lazy_init_segments. is_empty ( ) {
90
+ ctx = ctx. clone_inner ( ) ;
91
+
90
92
let table_info = self . table_info . clone ( ) ;
91
93
let push_downs = plan. push_downs . clone ( ) ;
92
94
let query_ctx = ctx. clone ( ) ;
You can’t perform that action at this time.
0 commit comments