Format physical plan as tree
(&self, node: &PhysicalNode, indent: usize)
| 787 | |
| 788 | /// Format physical plan as tree |
| 789 | fn format_physical_plan(&self, node: &PhysicalNode, indent: usize) -> String { |
| 790 | let prefix = " ".repeat(indent); |
| 791 | let mut output = String::new(); |
| 792 | |
| 793 | match node { |
| 794 | PhysicalNode::NodeSeqScan { |
| 795 | variable, |
| 796 | labels, |
| 797 | estimated_rows, |
| 798 | estimated_cost, |
| 799 | .. |
| 800 | } => { |
| 801 | output.push_str(&format!( |
| 802 | "{}NodeSeqScan({}:{}) [rows={}, cost={:.2}]\n", |
| 803 | prefix, |
| 804 | variable, |
| 805 | labels.join("|"), |
| 806 | estimated_rows, |
| 807 | estimated_cost |
| 808 | )); |
| 809 | } |
| 810 | PhysicalNode::NodeIndexScan { |
| 811 | variable, |
| 812 | labels, |
| 813 | estimated_rows, |
| 814 | estimated_cost, |
| 815 | .. |
| 816 | } => { |
| 817 | output.push_str(&format!( |
| 818 | "{}NodeIndexScan({}:{}) [rows={}, cost={:.2}]\n", |
| 819 | prefix, |
| 820 | variable, |
| 821 | labels.join("|"), |
| 822 | estimated_rows, |
| 823 | estimated_cost |
| 824 | )); |
| 825 | } |
| 826 | PhysicalNode::EdgeSeqScan { |
| 827 | variable, |
| 828 | labels, |
| 829 | estimated_rows, |
| 830 | estimated_cost, |
| 831 | .. |
| 832 | } => { |
| 833 | output.push_str(&format!( |
| 834 | "{}EdgeSeqScan({}:{}) [rows={}, cost={:.2}]\n", |
| 835 | prefix, |
| 836 | variable, |
| 837 | labels.join("|"), |
| 838 | estimated_rows, |
| 839 | estimated_cost |
| 840 | )); |
| 841 | } |
| 842 | PhysicalNode::IndexedExpand { |
| 843 | from_variable, |
| 844 | to_variable, |
| 845 | edge_labels, |
| 846 | input, |