use datafusion::physical_plan::ExecutionPlan;
use query_planning::admission::AttemptCapabilityEvidence;
use super::native_node::native_node;
use crate::{
error::{Error, Result},
native_exec::SealedAttemptMetricsTarget,
};
pub(crate) trait GraphExecutionPlan: Send + Sync {
fn graph_execution_capability_evidence(&self) -> Result<AttemptCapabilityEvidence>;
fn sealed_attempt_metrics_target(&self) -> SealedAttemptMetricsTarget;
fn gpu_resident_output_rejection(&self) -> Option<Error> {
None
}
}
pub(crate) fn graph_execution_plan(plan: &dyn ExecutionPlan) -> Option<&dyn GraphExecutionPlan> {
native_node(plan).and_then(|node| node.graph_execution_plan())
}