Skip to content

Commit f2cbf9d

Browse files
committed
mark deprecated rather than remove
1 parent a83ec4e commit f2cbf9d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

datafusion/physical-plan/src/display.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::fmt::Formatter;
2424

2525
use arrow::datatypes::SchemaRef;
2626

27-
use datafusion_common::display::GraphvizBuilder;
27+
use datafusion_common::display::{GraphvizBuilder, PlanType, StringifiedPlan};
2828
use datafusion_expr::display_schema;
2929
use datafusion_physical_expr::LexOrdering;
3030

@@ -312,6 +312,21 @@ impl<'a> DisplayableExecutionPlan<'a> {
312312
show_schema: self.show_schema,
313313
}
314314
}
315+
316+
#[deprecated(since = "47.0.0", note = "indent() or tree_render() instead")]
317+
pub fn to_stringified(
318+
&self,
319+
verbose: bool,
320+
plan_type: PlanType,
321+
explain_format: DisplayFormatType,
322+
) -> StringifiedPlan {
323+
match (&explain_format, &plan_type) {
324+
(DisplayFormatType::TreeRender, PlanType::FinalPhysicalPlan) => {
325+
StringifiedPlan::new(plan_type, self.tree_render().to_string())
326+
}
327+
_ => StringifiedPlan::new(plan_type, self.indent(verbose).to_string()),
328+
}
329+
}
315330
}
316331

317332
/// Enum representing the different levels of metrics to display

0 commit comments

Comments
 (0)