pub struct ExplainStatementOptions {
pub analyze: bool,
pub verbose: bool,
pub format: Option<ExplainFormat>,
pub analyze_level: Option<MetricType>,
pub analyze_categories: Option<ExplainAnalyzeCategories>,
pub show_statistics: Option<bool>,
}Expand description
Normalized options for a single EXPLAIN statement.
This collects the knobs that can be set per-statement from either the
legacy keyword form (EXPLAIN ANALYZE VERBOSE FORMAT tree ...) or the
Postgres-style EXPLAIN (option [arg], ...) ... form supported on
dialects whose
Dialect::supports_explain_with_utility_options
returns true.
Fields that are None / false mean “not set at the statement level” —
the physical planner falls back to the corresponding session config
value.
Fields§
§analyze: boolWhether to actually execute the plan and gather metrics.
Corresponds to the ANALYZE keyword or the ANALYZE option.
verbose: boolWhether to include extra detail in the output.
Corresponds to the VERBOSE keyword or the VERBOSE option.
format: Option<ExplainFormat>Output format for the plan. When None, the session-config
default (datafusion.explain.format) is used.
analyze_level: Option<MetricType>Override for MetricType (summary / dev) when running
EXPLAIN ANALYZE.
analyze_categories: Option<ExplainAnalyzeCategories>Override for ExplainAnalyzeCategories (rows / bytes / timing
/ uncategorized) when running EXPLAIN ANALYZE.
show_statistics: Option<bool>Override for datafusion.explain.show_statistics.
Implementations§
Source§impl ExplainStatementOptions
impl ExplainStatementOptions
Sourcepub fn from_utility_options(opts: &[UtilityOption]) -> Result<Self>
Available on crate feature sql only.
pub fn from_utility_options(opts: &[UtilityOption]) -> Result<Self>
sql only.Parse a list of UtilityOption values (produced by sqlparser’s
parse_utility_options) into a normalized ExplainStatementOptions.
Argument grammar accepted:
OPTION— bare, impliesTRUEfor boolean options.OPTION TRUE/OPTION FALSEOPTION ON/OPTION OFFOPTION 1/OPTION 0OPTION <ident>orOPTION '<string>'for format / level / metrics.
Options recognized by DataFusion are: ANALYZE, VERBOSE, FORMAT,
METRICS, LEVEL, TIMING, SUMMARY, COSTS.
Postgres-only options (BUFFERS, WAL, SETTINGS, GENERIC_PLAN,
MEMORY) return a helpful “not supported” error. Any other option
name produces an unknown EXPLAIN option error.
Trait Implementations§
Source§impl Clone for ExplainStatementOptions
impl Clone for ExplainStatementOptions
Source§fn clone(&self) -> ExplainStatementOptions
fn clone(&self) -> ExplainStatementOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExplainStatementOptions
impl Debug for ExplainStatementOptions
Source§impl Default for ExplainStatementOptions
impl Default for ExplainStatementOptions
Source§fn default() -> ExplainStatementOptions
fn default() -> ExplainStatementOptions
impl Eq for ExplainStatementOptions
Source§impl Hash for ExplainStatementOptions
impl Hash for ExplainStatementOptions
Source§impl PartialEq for ExplainStatementOptions
impl PartialEq for ExplainStatementOptions
impl StructuralPartialEq for ExplainStatementOptions
Auto Trait Implementations§
impl Freeze for ExplainStatementOptions
impl RefUnwindSafe for ExplainStatementOptions
impl Send for ExplainStatementOptions
impl Sync for ExplainStatementOptions
impl Unpin for ExplainStatementOptions
impl UnsafeUnpin for ExplainStatementOptions
impl UnwindSafe for ExplainStatementOptions
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.