Skip to content

Commit 3e01da0

Browse files
committed
chore(cubestore): Upgrade DF 46: PPOptions::show_most and pretty printing cleanup
1 parent 99b4fc0 commit 3e01da0

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use crate::queryplanner::providers::InfoSchemaQueryCacheTableProvider;
3333
use crate::queryplanner::query_executor::{
3434
ClusterSendExec, CubeTable, CubeTableExec, InlineTableProvider,
3535
};
36-
use crate::queryplanner::rolling::RollingWindowAggregate;
36+
use crate::queryplanner::rolling::{RollingWindowAggExec, RollingWindowAggregate};
3737
use crate::queryplanner::serialized_plan::{IndexSnapshot, RowRange};
3838
use crate::queryplanner::tail_limit::TailLimitExec;
3939
use crate::queryplanner::topk::SortColumn;
@@ -64,9 +64,8 @@ pub struct PPOptions {
6464
}
6565

6666
impl PPOptions {
67-
// TODO upgrade DF: Rename
6867
#[allow(unused)]
69-
pub fn show_all() -> PPOptions {
68+
pub fn show_most() -> PPOptions {
7069
PPOptions {
7170
show_filters: true,
7271
show_sort_by: true,
@@ -342,9 +341,6 @@ pub fn pp_plan_ext(p: &LogicalPlan, opts: &PPOptions) -> String {
342341
self.output += &format!("PanicWorker")
343342
} else if let Some(_) = node.as_any().downcast_ref::<RollingWindowAggregate>() {
344343
self.output += &format!("RollingWindowAggreagate");
345-
// TODO upgrade DF
346-
// } else if let Some(alias) = node.as_any().downcast_ref::<LogicalAlias>() {
347-
// self.output += &format!("LogicalAlias, alias: {}", alias.alias);
348344
} else {
349345
log::error!("unknown extension node")
350346
}
@@ -711,11 +707,8 @@ fn pp_phys_plan_indented(p: &dyn ExecutionPlan, indent: usize, o: &PPOptions, ou
711707
*out += &format!("{}", DefaultDisplay(dse));
712708
}
713709

714-
// TODO upgrade DF
715-
// } else if let Some(_) = a.downcast_ref::<SkipExec>() {
716-
// *out += "SkipRows";
717-
// } else if let Some(_) = a.downcast_ref::<RollingWindowAggExec>() {
718-
// *out += "RollingWindowAgg";
710+
} else if let Some(_) = a.downcast_ref::<RollingWindowAggExec>() {
711+
*out += "RollingWindowAgg";
719712
} else if let Some(_) = a.downcast_ref::<LastRowByUniqueKeyExec>() {
720713
*out += "LastRowByUniqueKey";
721714
} 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
@@ -458,7 +458,7 @@ impl KafkaPostProcessPlanner {
458458
) -> Result<(Arc<dyn ExecutionPlan>, Option<Arc<dyn ExecutionPlan>>), CubeError> {
459459
fn only_certain_plans_allowed_error(plan: &LogicalPlan) -> CubeError {
460460
CubeError::user(
461-
format!("Only Projection > [Filter] > TableScan plans are allowed for streaming; got plan {}", pp_plan_ext(plan, &PPOptions::show_all())),
461+
format!("Only Projection > [Filter] > TableScan plans are allowed for streaming; got plan {}", pp_plan_ext(plan, &PPOptions::show_most())),
462462
)
463463
}
464464
fn remove_subquery_alias_around_table_scan(plan: &LogicalPlan) -> &LogicalPlan {

0 commit comments

Comments
 (0)