From 57706c675b78a4653c3515532dbddd1506763392 Mon Sep 17 00:00:00 2001 From: Noel Kwan Date: Mon, 22 Jul 2024 22:23:09 +0800 Subject: [PATCH] resolve comments --- src/frontend/src/optimizer/plan_node/logical_agg.rs | 1 + src/frontend/src/optimizer/plan_node/stream_keyed_merge.rs | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/frontend/src/optimizer/plan_node/logical_agg.rs b/src/frontend/src/optimizer/plan_node/logical_agg.rs index 74834ed3824b5..8e645ab4b4aa9 100644 --- a/src/frontend/src/optimizer/plan_node/logical_agg.rs +++ b/src/frontend/src/optimizer/plan_node/logical_agg.rs @@ -645,6 +645,7 @@ impl LogicalAggBuilder { } AggKind::ApproxPercentile => { if agg_call.order_by.sort_exprs[0].order_type == OrderType::descending() { + // Rewrite DESC into 1.0-percentile for approx_percentile. let prev_percentile = agg_call.direct_args[0].clone(); let new_percentile = 1.0 - prev_percentile diff --git a/src/frontend/src/optimizer/plan_node/stream_keyed_merge.rs b/src/frontend/src/optimizer/plan_node/stream_keyed_merge.rs index 6e6826ef6a44e..2df7d3eafa575 100644 --- a/src/frontend/src/optimizer/plan_node/stream_keyed_merge.rs +++ b/src/frontend/src/optimizer/plan_node/stream_keyed_merge.rs @@ -74,7 +74,6 @@ impl StreamKeyedMerge { let schema = Schema::new(schema_fields); let watermark_columns = FixedBitSet::with_capacity(schema.fields.len()); - // FIXME: schema is wrong. let base = PlanBase::new_stream( lhs_input.ctx(), schema, @@ -99,8 +98,6 @@ impl StreamKeyedMerge { impl Distill for StreamKeyedMerge { fn distill<'a>(&self) -> XmlNode<'a> { let mut out = Vec::with_capacity(1); - // out.push(("lhs_col_mapping", Pretty::debug(&self.lhs_mapping))); - // out.push(("rhs_col_mapping", Pretty::debug(&self.rhs_mapping))); if self.base.ctx().is_explain_verbose() { let f = |t| Pretty::debug(&t);