Skip to content

Commit 98b7618

Browse files
committed
fix logging and fragmenter
Signed-off-by: Bugen Zhao <[email protected]>
1 parent 7d5fea1 commit 98b7618

File tree

2 files changed

+181
-173
lines changed
  • src/frontend/src

2 files changed

+181
-173
lines changed

src/frontend/src/optimizer/plan_node/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -696,9 +696,9 @@ impl dyn PlanNode {
696696
}
697697
}
698698

699-
const PLAN_DEPTH_THRESHOLD: usize = 256;
699+
const PLAN_DEPTH_THRESHOLD: usize = 30;
700700
const PLAN_TOO_DEEP_NOTICE: &str = "The plan is too deep. \
701-
Consider rewriting the query to simplify it if you encounter any issues.";
701+
Consider simplifying or splitting the query if you encounter any issues.";
702702

703703
impl dyn PlanNode {
704704
/// Serialize the plan node and its children to a stream plan proto.
@@ -710,7 +710,7 @@ impl dyn PlanNode {
710710
state: &mut BuildFragmentGraphState,
711711
) -> SchedulerResult<StreamPlanPb> {
712712
recursive::tracker!().recurse(|t| {
713-
if t.depth() > PLAN_DEPTH_THRESHOLD {
713+
if t.depth() == PLAN_DEPTH_THRESHOLD {
714714
notice_to_user(PLAN_TOO_DEEP_NOTICE);
715715
}
716716

@@ -762,7 +762,7 @@ impl dyn PlanNode {
762762
/// (for testing).
763763
pub fn to_batch_prost_identity(&self, identity: bool) -> SchedulerResult<BatchPlanPb> {
764764
recursive::tracker!().recurse(|t| {
765-
if t.depth() > PLAN_DEPTH_THRESHOLD {
765+
if t.depth() == PLAN_DEPTH_THRESHOLD {
766766
notice_to_user(PLAN_TOO_DEEP_NOTICE);
767767
}
768768

0 commit comments

Comments
 (0)