fn plan_extension(
        &self,
        node: &dyn UserDefinedLogicalNode,
        inputs: Vec<Arc<dyn ExecutionPlan>>,
        _ctx_state: &ExecutionContextState,
    ) -> Result<Arc<dyn ExecutionPlan>> {
        if let Some(topk_node) = node.as_any().downcast_ref::<TopKPlanNode>() {
            assert_eq!(inputs.len(), 1, "Inconsistent number of inputs");
            // figure out input name
            Ok(Arc::new(TopKExec {
                input: inputs[0].clone(),
                k: topk_node.k,
            }))
        } else {
            Err(DataFusionError::Internal(format!(
                "Unknown extension node type {:?}",
                node
            )))
        }
    }
/// Create a physical plan for an extension node
Create a physical plan for an extension node
Create a physical plan for an extension node
fn plan_extension(
        &self,
        node: &dyn UserDefinedLogicalNode,
        inputs: Vec<Arc<dyn ExecutionPlan>>,
        _ctx_state: &ExecutionContextState,
    ) -> Result<Arc<dyn ExecutionPlan>> {
        if let Some(topk_node) = node.as_any().downcast_ref::<TopKPlanNode>() {
            assert_eq!(inputs.len(), 1, "Inconsistent number of inputs");
            // figure out input name
            Ok(Arc::new(TopKExec {
                input: inputs[0].clone(),
                k: topk_node.k,
            }))
        } else {
            Err(DataFusionError::Internal(format!(
                "Unknown extension node type {:?}",
                node
            )))
        }
    }
fn plan_extension ( & self , node : & dyn UserDefinedLogicalNode , inputs : Vec < Arc < dyn ExecutionPlan > > , _ctx_state : & ExecutionContextState , ) -> Result < Arc < dyn ExecutionPlan > > { if let Some ( topk_node ) = node . as_any ( ) . downcast_ref :: < TopKPlanNode > ( ) { assert_eq ! ( inputs len ( ) 1 " " ) ; // figure out input name Ok ( Arc :: new ( TopKExec { input : inputs [ 0 ] . clone ( ) , k : topk_node . k , } ) ) } else { Err ( DataFusionError :: Internal ( format ! ( " " node ) ) ) } }
Create a physical plan for an extension node
Create a physical plan for an extension node
&self
node
&dyn UserDefinedLogicalNode
inputs
Vec<Arc<dyn ExecutionPlan>>
_ctx_state
&ExecutionContextState
&self
node
&dyn UserDefinedLogicalNode
inputs
Vec<Arc<dyn ExecutionPlan>>
_ctx_state
&ExecutionContextState