pub enum ExplainFormat {
Indent,
Tree,
PostgresJSON,
Graphviz,
}Expand description
Output formats for controlling for Explain plans
Variants§
Indent
Indent mode
Example:
> explain format indent select x from values (1) t(x);
+---------------+-----------------------------------------------------+
| plan_type | plan |
+---------------+-----------------------------------------------------+
| logical_plan | SubqueryAlias: t |
| | Projection: column1 AS x |
| | Values: (Int64(1)) |
| physical_plan | ProjectionExec: expr=[column1@0 as x] |
| | DataSourceExec: partitions=1, partition_sizes=[1] |
| | |
+---------------+-----------------------------------------------------+Tree
Tree mode
Example:
> explain format tree select x from values (1) t(x);
+---------------+-------------------------------+
| plan_type | plan |
+---------------+-------------------------------+
| physical_plan | ┌───────────────────────────┐ |
| | │ ProjectionExec │ |
| | │ -------------------- │ |
| | │ x: column1@0 │ |
| | └─────────────┬─────────────┘ |
| | ┌─────────────┴─────────────┐ |
| | │ DataSourceExec │ |
| | │ -------------------- │ |
| | │ bytes: 128 │ |
| | │ format: memory │ |
| | │ rows: 1 │ |
| | └───────────────────────────┘ |
| | |
+---------------+-------------------------------+PostgresJSON
Postgres Json mode
A displayable structure that produces plan in postgresql JSON format.
Users can use this format to visualize the plan in existing plan visualization tools, for example dalibo
Example:
> explain format pgjson select x from values (1) t(x);
+--------------+--------------------------------------+
| plan_type | plan |
+--------------+--------------------------------------+
| logical_plan | [ |
| | { |
| | "Plan": { |
| | "Alias": "t", |
| | "Node Type": "Subquery", |
| | "Output": [ |
| | "x" |
| | ], |
| | "Plans": [ |
| | { |
| | "Expressions": [ |
| | "column1 AS x" |
| | ], |
| | "Node Type": "Projection", |
| | "Output": [ |
| | "x" |
| | ], |
| | "Plans": [ |
| | { |
| | "Node Type": "Values", |
| | "Output": [ |
| | "column1" |
| | ], |
| | "Plans": [], |
| | "Values": "(Int64(1))" |
| | } |
| | ] |
| | } |
| | ] |
| | } |
| | } |
| | ] |
+--------------+--------------------------------------+Graphviz
Graphviz mode
Example:
> explain format graphviz select x from values (1) t(x);
+--------------+------------------------------------------------------------------------+
| plan_type | plan |
+--------------+------------------------------------------------------------------------+
| logical_plan | |
| | // Begin DataFusion GraphViz Plan, |
| | // display it online here: https://dreampuf.github.io/GraphvizOnline |
| | |
| | digraph { |
| | subgraph cluster_1 |
| | { |
| | graph[label="LogicalPlan"] |
| | 2[shape=box label="SubqueryAlias: t"] |
| | 3[shape=box label="Projection: column1 AS x"] |
| | 2 -> 3 [arrowhead=none, arrowtail=normal, dir=back] |
| | 4[shape=box label="Values: (Int64(1))"] |
| | 3 -> 4 [arrowhead=none, arrowtail=normal, dir=back] |
| | } |
| | subgraph cluster_5 |
| | { |
| | graph[label="Detailed LogicalPlan"] |
| | 6[shape=box label="SubqueryAlias: t\nSchema: [x:Int64;N]"] |
| | 7[shape=box label="Projection: column1 AS x\nSchema: [x:Int64;N]"] |
| | 6 -> 7 [arrowhead=none, arrowtail=normal, dir=back] |
| | 8[shape=box label="Values: (Int64(1))\nSchema: [column1:Int64;N]"] |
| | 7 -> 8 [arrowhead=none, arrowtail=normal, dir=back] |
| | } |
| | } |
| | // End DataFusion GraphViz Plan |
| | |
+--------------+------------------------------------------------------------------------+Trait Implementations§
Source§impl Clone for ExplainFormat
impl Clone for ExplainFormat
Source§fn clone(&self) -> ExplainFormat
fn clone(&self) -> ExplainFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConfigField for ExplainFormat
impl ConfigField for ExplainFormat
Source§impl Debug for ExplainFormat
impl Debug for ExplainFormat
Source§impl Display for ExplainFormat
impl Display for ExplainFormat
impl Eq for ExplainFormat
Source§impl FromStr for ExplainFormat
Implement parsing strings to ExplainFormat
impl FromStr for ExplainFormat
Implement parsing strings to ExplainFormat
Source§type Err = DataFusionError
type Err = DataFusionError
The associated error which can be returned from parsing.
Source§fn from_str(
format: &str,
) -> Result<ExplainFormat, <ExplainFormat as FromStr>::Err>
fn from_str( format: &str, ) -> Result<ExplainFormat, <ExplainFormat as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for ExplainFormat
impl Hash for ExplainFormat
Source§impl PartialEq for ExplainFormat
impl PartialEq for ExplainFormat
Source§fn eq(&self, other: &ExplainFormat) -> bool
fn eq(&self, other: &ExplainFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExplainFormat
Auto Trait Implementations§
impl Freeze for ExplainFormat
impl RefUnwindSafe for ExplainFormat
impl Send for ExplainFormat
impl Sync for ExplainFormat
impl Unpin for ExplainFormat
impl UnsafeUnpin for ExplainFormat
impl UnwindSafe for ExplainFormat
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> AsAny for T
impl<T> AsAny for T
Source§fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
fn any_ref(&self) -> &(dyn Any + Sync + Send + 'static)
Obtains a
dyn Any reference to the object: Read moreSource§fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ
fn as_any(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ
Obtains an
Arc<dyn Any> reference to the object: Read moreSource§fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
fn into_any(self: Box<T>) -> Box<dyn Any + Sync + Send>
Converts the object to
Box<dyn Any>: Read moreSource§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Convenient wrapper for
std::any::type_name, since Any does not provide it and
Any::type_id is useless as a debugging aid (its Debug is just a mess of hex digits).Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DynPartialEq for T
impl<T> DynPartialEq for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<KernelType, ArrowType> TryIntoArrow<ArrowType> for KernelTypewhere
ArrowType: TryFromKernel<KernelType>,
impl<KernelType, ArrowType> TryIntoArrow<ArrowType> for KernelTypewhere
ArrowType: TryFromKernel<KernelType>,
fn try_into_arrow(self) -> Result<ArrowType, ArrowError>
Source§impl<KernelType, ArrowType> TryIntoKernel<KernelType> for ArrowTypewhere
KernelType: TryFromArrow<ArrowType>,
impl<KernelType, ArrowType> TryIntoKernel<KernelType> for ArrowTypewhere
KernelType: TryFromArrow<ArrowType>,
fn try_into_kernel(self) -> Result<KernelType, ArrowError>
impl<T> Ungil for Twhere
T: Send,
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP