Skip to content

Commit

Permalink
chore(cubestore): Upgrade DF: Reimplement and use PreSerializedPlan::…
Browse files Browse the repository at this point in the history
…remove_unused_tables
  • Loading branch information
srh committed Dec 17, 2024
1 parent 7956b2a commit 783c645
Show file tree
Hide file tree
Showing 3 changed files with 425 additions and 392 deletions.
10 changes: 5 additions & 5 deletions rust/cubestore/cubestore/src/queryplanner/query_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,21 +1504,21 @@ impl ClusterSendExec {
}
}

pub fn worker_plans(&self) -> Vec<(String, PreSerializedPlan)> {
pub fn worker_plans(&self) -> Result<Vec<(String, PreSerializedPlan)>, CubeError> {
let mut res = Vec::new();
for (node_name, partitions) in self.partitions.iter() {
res.push((
node_name.clone(),
self.serialized_plan_for_partitions(partitions),
self.serialized_plan_for_partitions(partitions)?,
));
}
res
Ok(res)
}

fn serialized_plan_for_partitions(
&self,
partitions: &(Vec<(u64, RowRange)>, Vec<InlineTableId>),
) -> PreSerializedPlan {
) -> Result<PreSerializedPlan, CubeError> {
let (partitions, inline_table_ids) = partitions;
let mut ps = HashMap::<_, RowFilter>::new();
for (id, range) in partitions {
Expand Down Expand Up @@ -1577,7 +1577,7 @@ impl ExecutionPlan for ClusterSendExec {
) -> Result<SendableRecordBatchStream, DataFusionError> {
let (node_name, partitions) = &self.partitions[partition];

let plan = self.serialized_plan_for_partitions(partitions);
let plan = self.serialized_plan_for_partitions(partitions)?;

let cluster = self.cluster.clone();
let schema = self.properties.eq_properties.schema().clone();
Expand Down
Loading

0 comments on commit 783c645

Please sign in to comment.