Return a DataFrame with the explanation of its plan so far. `opt` is used to specify the options for the explain operation. Details of the options can be found in [`ExplainOption`]. ``` # use datafusion::prelude::*; # use datafusion::error::Result; # #[tokio::main] # async fn main() -> Result<()> { use datafusion_expr::{Explain, ExplainOption}; let ctx = SessionContext::new(); let df = ctx .read_
(
self,
explain_option: ExplainOption,
)
| 1776 | /// # } |
| 1777 | /// ``` |
| 1778 | pub fn explain_with_options( |
| 1779 | self, |
| 1780 | explain_option: ExplainOption, |
| 1781 | ) -> Result<DataFrame> { |
| 1782 | if matches!(self.plan, LogicalPlan::Explain(_)) { |
| 1783 | return plan_err!("Nested EXPLAINs are not supported"); |
| 1784 | } |
| 1785 | let plan = LogicalPlanBuilder::from(self.plan) |
| 1786 | .explain_option_format(explain_option)? |
| 1787 | .build()?; |
| 1788 | Ok(DataFrame { |
| 1789 | session_state: self.session_state, |
| 1790 | plan, |
| 1791 | projection_requires_validation: self.projection_requires_validation, |
| 1792 | }) |
| 1793 | } |
| 1794 | |
| 1795 | /// Return a `FunctionRegistry` used to plan udf's calls |
| 1796 | /// |
no test coverage detected