Skip to content

Commit

Permalink
fix(processor): try fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang2014 committed Sep 30, 2022
1 parent 5acc981 commit 37b86bd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/query/catalog/src/table_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,6 @@ pub trait TableContext: Send + Sync {
-> Result<Arc<dyn Table>>;
fn get_processes_info(&self) -> Vec<ProcessInfo>;
fn get_runtime(&self) -> Result<Arc<Runtime>>;

fn clone_inner(&self) -> Arc<dyn TableContext>;
}
1 change: 0 additions & 1 deletion src/query/service/src/api/rpc/exchange/exchange_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ impl FragmentCoordinator {

match &self.payload {
FragmentPayload::PlanV2(plan) => {
let ctx = QueryContext::create_from(ctx);
let pipeline_builder = PipelineBuilderV2::create(ctx);
self.pipeline_build_res = Some(pipeline_builder.finalize(plan)?);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ impl Interpreter for InsertInterpreterV2 {
_ => unreachable!(),
};

table1.get_table_info();
let catalog = self.plan.catalog.clone();
let is_distributed_plan = select_plan.is_distributed_plan();

Expand Down
4 changes: 4 additions & 0 deletions src/query/service/src/sessions/query_ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ impl TableContext for QueryContext {
fn get_runtime(&self) -> Result<Arc<Runtime>> {
self.shared.try_get_runtime()
}

fn clone_inner(&self) -> Arc<dyn TableContext> {
QueryContext::create_from_shared(self.shared.clone())
}
}

impl TrySpawn for QueryContext {
Expand Down
1 change: 1 addition & 0 deletions src/query/storages/fuse/src/operations/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ impl FuseTable {
plan: &ReadDataSourcePlan,
pipeline: &mut Pipeline,
) -> Result<()> {
let ctx = ctx.clone_inner();
let mut lazy_init_segments = Vec::with_capacity(plan.parts.len());

for part in &plan.parts {
Expand Down

0 comments on commit 37b86bd

Please sign in to comment.