From c709cb49245fa824478edfc5283d90195527a45e Mon Sep 17 00:00:00 2001 From: Dylan Chen Date: Wed, 7 Feb 2024 11:58:03 +0800 Subject: [PATCH] add comments --- .../optimizer/rule/pull_up_correlated_predicate_agg_rule.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/optimizer/rule/pull_up_correlated_predicate_agg_rule.rs b/src/frontend/src/optimizer/rule/pull_up_correlated_predicate_agg_rule.rs index 6a34dd8621e22..d4c5403bba14f 100644 --- a/src/frontend/src/optimizer/rule/pull_up_correlated_predicate_agg_rule.rs +++ b/src/frontend/src/optimizer/rule/pull_up_correlated_predicate_agg_rule.rs @@ -44,7 +44,7 @@ use crate::utils::{Condition, IndexSet}; /// After: /// /// ```text -/// LogicalApply [yyy = xxx] +/// LogicalJoin [yyy = xxx] /// / \ /// LHS Project /// | @@ -144,6 +144,7 @@ impl Rule for PullUpCorrelatedPredicateAggRule { let new_bottom_proj: PlanRef = LogicalProject::new(filter, bottom_proj_exprs).into(); // If there is a count aggregate, bail out and leave for general subquery unnesting to deal. + // When group by is empty, count would return 0 instead of null. if agg_calls .iter() .any(|agg_call| agg_call.agg_kind == AggKind::Count)