Return a `format`able structure that produces a single line per node. # Example ```text Projection: employee.id Filter: employee.state Eq Utf8(\"CO\")\ CsvScan: employee projection=Some([0, 3]) ``` ``` use arrow::datatypes::{DataType, Field, Schema}; use datafusion_expr::{col, lit, logical_plan::table_scan, LogicalPlanBuilder}; let schema = Schema::new(vec![Field::new("id", DataType::Int32, fal
(&self)
| 1685 | /// assert_eq!("Filter: t1.id = Int32(5)\n TableScan: t1", display_string); |
| 1686 | /// ``` |
| 1687 | pub fn display_indent(&self) -> impl Display + '_ { |
| 1688 | // Boilerplate structure to wrap LogicalPlan with something |
| 1689 | // that that can be formatted |
| 1690 | struct Wrapper<'a>(&'a LogicalPlan); |
| 1691 | impl Display for Wrapper<'_> { |
| 1692 | fn fmt(&self, f: &mut Formatter) -> fmt::Result { |
| 1693 | let with_schema = false; |
| 1694 | let mut visitor = IndentVisitor::new(f, with_schema); |
| 1695 | match self.0.visit_with_subqueries(&mut visitor) { |
| 1696 | Ok(_) => Ok(()), |
| 1697 | Err(_) => Err(fmt::Error), |
| 1698 | } |
| 1699 | } |
| 1700 | } |
| 1701 | Wrapper(self) |
| 1702 | } |
| 1703 | |
| 1704 | /// Return a `format`able structure that produces a single line |
| 1705 | /// per node that includes the output schema. For example: |