/// Create a DataFusion `Expr` that invokes `window_bounds` with the
/// appropriate every and offset arguments at runtime
Create a DataFusion `Expr` that invokes `window_bounds` with the
appropriate every and offset arguments at runtime
Create a DataFusion ` Expr ` that invokes ` window_bounds ` with the appropriate every and offset arguments at runtime
pub fn make_window_bound_expr(
    time_arg: Expr,
    every: WindowDuration,
    offset: WindowDuration,
) -> Expr {
    let encoded_every: EncodedWindowDuration = every.into();
    let encoded_offset: EncodedWindowDuration = offset.into();
    registry()
        .udf(window::WINDOW_BOUNDS_UDF_NAME)
        .expect("WindowBounds function not registered")
        .call(vec![
            time_arg,
            lit(encoded_every.ty),
            lit(encoded_every.field1),
            lit(encoded_every.field2),
            lit(encoded_offset.ty),
            lit(encoded_offset.field1),
            lit(encoded_offset.field2),
        ])
}
pub fn make_window_bound_expr ( time_arg : Expr , every : WindowDuration , offset : WindowDuration , ) -> Expr { let encoded_every : EncodedWindowDuration = every . into ( ) ; let encoded_offset : EncodedWindowDuration = offset . into ( ) ; registry ( ) . udf ( window :: WINDOW_BOUNDS_UDF_NAME ) . expect ( " " ) . call ( vec ! [ time_arg lit ( encoded_every ty ) lit ( encoded_every field1 ) lit ( encoded_every field2 ) lit ( encoded_offset ty ) lit ( encoded_offset field1 ) lit ( encoded_offset field2 ) ] ) }
Create a DataFusion `Expr` that invokes `window_bounds` with the
appropriate every and offset arguments at runtime
Create a DataFusion ` Expr ` that invokes ` window_bounds ` with the appropriate every and offset arguments at runtime
time_arg
Expr
every
WindowDuration
offset
WindowDuration