Skip to content

Commit f7f6a2a

Browse files
committed
change physical plan details loglevel from debug to trace for potential overflow
1 parent 5a85b7d commit f7f6a2a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

datafusion/core/src/physical_planner.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ use async_trait::async_trait;
100100
use datafusion_physical_plan::async_func::{AsyncFuncExec, AsyncMapper};
101101
use futures::{StreamExt, TryStreamExt};
102102
use itertools::{multiunzip, Itertools};
103-
use log::debug;
103+
use log::{debug, trace};
104104
use tokio::sync::Mutex;
105105

106106
/// Physical query planner that converts a `LogicalPlan` to an
@@ -2093,7 +2093,15 @@ impl DefaultPhysicalPlanner {
20932093
"Optimized physical plan:\n{}\n",
20942094
displayable(new_plan.as_ref()).indent(false)
20952095
);
2096-
debug!("Detailed optimized physical plan:\n{new_plan:?}");
2096+
2097+
// This is potentially very large, so only log at trace level,
2098+
// otherwise it can overflow the tokio runtime stack because without
2099+
// tree_maximum_render_width setting.
2100+
//
2101+
// For example:
2102+
// thread 'tokio-runtime-worker' has overflowed its stack
2103+
// fatal runtime error: stack overflow, aborting
2104+
trace!("Detailed optimized physical plan:\n{new_plan:?}");
20972105
Ok(new_plan)
20982106
}
20992107

0 commit comments

Comments
 (0)