pub fn create_window_expr(
        &self,
        e: &Expr,
        logical_input_schema: &DFSchema,
        physical_input_schema: &Schema,
        ctx_state: &ExecutionContextState,
    ) -> Result<Arc<dyn WindowExpr>> {
        // unpack aliased logical expressions, e.g. "sum(col) over () as total"
        let (name, e) = match e {
            Expr::Alias(sub_expr, alias) => (alias.clone(), sub_expr.as_ref()),
            _ => (e.name(logical_input_schema)?, e),
        };

        match e {
            Expr::WindowFunction { fun, args, .. } => {
                let args = args
                    .iter()
                    .map(|e| {
                        self.create_physical_expr(e, physical_input_schema, ctx_state)
                    })
                    .collect::<Result<Vec<_>>>()?;
                // if !order_by.is_empty() {
                //     return Err(DataFusionError::NotImplemented(
                //         "Window function with order by is not yet implemented".to_owned(),
                //     ));
                // }
                windows::create_window_expr(fun, &args, physical_input_schema, name)
            }
            other => Err(DataFusionError::Internal(format!(
                "Invalid window expression '{:?}'",
                other
            ))),
        }
    }
/// Create a window expression from a logical expression
Create a window expression from a logical expression
Create a window expression from a logical expression
pub fn create_window_expr(
        &self,
        e: &Expr,
        logical_input_schema: &DFSchema,
        physical_input_schema: &Schema,
        ctx_state: &ExecutionContextState,
    ) -> Result<Arc<dyn WindowExpr>> {
        // unpack aliased logical expressions, e.g. "sum(col) over () as total"
        let (name, e) = match e {
            Expr::Alias(sub_expr, alias) => (alias.clone(), sub_expr.as_ref()),
            _ => (e.name(logical_input_schema)?, e),
        };
        match e {
            Expr::WindowFunction { fun, args, .. } => {
                let args = args
                    .iter()
                    .map(|e| {
                        self.create_physical_expr(e, physical_input_schema, ctx_state)
                    })
                    .collect::<Result<Vec<_>>>()?;
                // if !order_by.is_empty() {
                //     return Err(DataFusionError::NotImplemented(
                //         "Window function with order by is not yet implemented".to_owned(),
                //     ));
                // }
                windows::create_window_expr(fun, &args, physical_input_schema, name)
            }
            other => Err(DataFusionError::Internal(format!(
                "Invalid window expression '{:?}'",
                other
            ))),
        }
    }
pub fn create_window_expr ( & self , e : & Expr , logical_input_schema : & DFSchema , physical_input_schema : & Schema , ctx_state : & ExecutionContextState , ) -> Result < Arc < dyn WindowExpr > > { // unpack aliased logical expressions, e.g. "sum(col) over () as total" let ( name , e ) = match e { Expr :: Alias ( sub_expr , alias ) => ( alias . clone ( ) , sub_expr . as_ref ( ) ) , _ => ( e . name ( logical_input_schema ) ? , e ) , } ; match e { Expr :: WindowFunction { fun , args , .. } => { let args = args . iter ( ) . map ( | e | { self . create_physical_expr ( e , physical_input_schema , ctx_state ) } ) . collect :: < Result < Vec < _ > > > ( ) ? ; // if !order_by.is_empty() { //     return Err(DataFusionError::NotImplemented( //         "Window function with order by is not yet implemented".to_owned(), //     )); // } windows :: create_window_expr ( fun , & args , physical_input_schema , name ) } other => Err ( DataFusionError :: Internal ( format ! ( " " other ) ) ) , } }
Create a window expression from a logical expression
Create a window expression from a logical expression
&self
e
&Expr
logical_input_schema
&DFSchema
physical_input_schema
&Schema
ctx_state
&ExecutionContextState
&self
e
&Expr
logical_input_schema
&DFSchema
physical_input_schema
&Schema
ctx_state
&ExecutionContextState