Skip to content

Commit 1825235

Browse files
committed
chore(cubestore): Upgrade DF: PPOptions::show_most and pretty printing cleanup
1 parent 345a134 commit 1825235

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

rust/cubestore/cubestore/src/queryplanner/pretty_printers.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ use crate::queryplanner::providers::InfoSchemaQueryCacheTableProvider;
3434
use crate::queryplanner::query_executor::{
3535
ClusterSendExec, CubeTable, CubeTableExec, InlineTableProvider,
3636
};
37-
use crate::queryplanner::rolling::RollingWindowAggregate;
37+
use crate::queryplanner::rolling::{RollingWindowAggExec, RollingWindowAggregate};
3838
use crate::queryplanner::serialized_plan::{IndexSnapshot, RowRange};
3939
use crate::queryplanner::tail_limit::TailLimitExec;
4040
use crate::queryplanner::topk::SortColumn;
@@ -67,9 +67,8 @@ pub struct PPOptions {
6767
}
6868

6969
impl PPOptions {
70-
// TODO upgrade DF: Rename
7170
#[allow(unused)]
72-
pub fn show_all() -> PPOptions {
71+
pub fn show_most() -> PPOptions {
7372
PPOptions {
7473
show_filters: true,
7574
show_sort_by: true,
@@ -361,9 +360,6 @@ pub fn pp_plan_ext(p: &LogicalPlan, opts: &PPOptions) -> String {
361360
self.output += &format!("PanicWorker")
362361
} else if let Some(_) = node.as_any().downcast_ref::<RollingWindowAggregate>() {
363362
self.output += &format!("RollingWindowAggreagate");
364-
// TODO upgrade DF
365-
// } else if let Some(alias) = node.as_any().downcast_ref::<LogicalAlias>() {
366-
// self.output += &format!("LogicalAlias, alias: {}", alias.alias);
367363
} else {
368364
log::error!("unknown extension node")
369365
}
@@ -732,12 +728,8 @@ fn pp_phys_plan_indented(p: &dyn ExecutionPlan, indent: usize, o: &PPOptions, ou
732728
} else {
733729
*out += &format!("{}", DefaultDisplay(dse));
734730
}
735-
736-
// TODO upgrade DF
737-
// } else if let Some(_) = a.downcast_ref::<SkipExec>() {
738-
// *out += "SkipRows";
739-
// } else if let Some(_) = a.downcast_ref::<RollingWindowAggExec>() {
740-
// *out += "RollingWindowAgg";
731+
} else if let Some(_) = a.downcast_ref::<RollingWindowAggExec>() {
732+
*out += "RollingWindowAgg";
741733
} else if let Some(_) = a.downcast_ref::<LastRowByUniqueKeyExec>() {
742734
*out += "LastRowByUniqueKey";
743735
} else if a.is::<MemoryExec>() {

rust/cubestore/cubestore/src/streaming/kafka_post_processing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ impl KafkaPostProcessPlanner {
456456
) -> Result<(Arc<dyn ExecutionPlan>, Option<Arc<dyn ExecutionPlan>>), CubeError> {
457457
fn only_certain_plans_allowed_error(plan: &LogicalPlan) -> CubeError {
458458
CubeError::user(
459-
format!("Only Projection > [Filter] > TableScan plans are allowed for streaming; got plan {}", pp_plan_ext(plan, &PPOptions::show_all())),
459+
format!("Only Projection > [Filter] > TableScan plans are allowed for streaming; got plan {}", pp_plan_ext(plan, &PPOptions::show_most())),
460460
)
461461
}
462462
fn remove_subquery_alias_around_table_scan(plan: &LogicalPlan) -> &LogicalPlan {

0 commit comments

Comments
 (0)